--- loncom/interface/lonsource.pm 2004/07/07 20:01:02 1.6 +++ loncom/interface/lonsource.pm 2004/07/08 20:17:59 1.8 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Souce Code handler # -# $Id: lonsource.pm,v 1.6 2004/07/07 20:01:02 taceyjo1 Exp $ +# $Id: lonsource.pm,v 1.8 2004/07/08 20:17:59 taceyjo1 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -212,11 +212,13 @@ sub handler { if ($source ne 'open') { $ENV{'user.error.msg'}="$filename:cre:1:1:Source code not available"; return HTTP_NOT_ACCEPTABLE; - } if ((!&Apache::lonnet::allowed('cre',$filename)) || + } + if ((!&Apache::lonnet::allowed('cre',$filename)) || (!&Apache::lonnet::allowed('bre',$filename))) { $ENV{'user.error.msg'}="$filename:bre:1:1:Access to resource denied"; return HTTP_NOT_ACCEPTABLE; - } if ($ENV{'form.action'} eq 'stage2') { + } + if ($ENV{'form.action'} eq 'stage2') { my $author = &Apache::lonnet::metadata($filename,'authorspace'); $author =~ m|@|; $author = $`; #This just tells who the author name is for later processing.