--- loncom/homework/lonhomework.pm 2002/09/24 12:39:42 1.90 +++ loncom/homework/lonhomework.pm 2002/10/14 16:43:58 1.93 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Homework handler # -# $Id: lonhomework.pm,v 1.90 2002/09/24 12:39:42 sakharuk Exp $ +# $Id: lonhomework.pm,v 1.93 2002/10/14 16:43:58 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -125,7 +125,7 @@ sub createmenu { my ($which,$request)=@_; if ($which eq 'grade') { $request->print(''); } @@ -139,6 +139,8 @@ sub send_footer { $Apache::lonxml::browse=''; +# JB, 9/24/2002: Any changes in this function may require a change +# in lonnavmaps::resource::getDateStatus. sub check_access { my ($id) = @_; my $date =''; @@ -204,7 +206,7 @@ sub check_access { &Apache::lonxml::debug("sending back :$status:$datemsg:"); if (($Apache::lonhomework::browse eq 'F') && ($status eq 'CLOSED')) { - &Apache::lonxml::debug("should be allowed to browse a resource when closed"); + &Apache::lonxml::debug("should be allowed to browse a resource when closed"); $status='CAN_ANSWER'; $datemsg='is closed but you are allowed to view it'; } @@ -393,9 +395,9 @@ sub renderpage { if ($target eq 'answer') { &showhash(%Apache::lonhomework::history); } if ($target eq 'web') {&Apache::lonhomework::showhashsubset(\%ENV,'^form');} -my $default=&Apache::lonnet::getfile('/home/httpd/html/res/adm/includes/default_homework.lcpm'); + my $default=&Apache::lonnet::getfile('/home/httpd/html/res/adm/includes/default_homework.lcpm'); if ($default == -1) { - &Apache::lonxml::error("Unable to find default_homework.lcpm"); + &Apache::lonxml::error("Unable to find default_homework.lcpm"); $default=''; } &Apache::lonxml::debug("Should be parsing now"); @@ -429,8 +431,7 @@ sub get_template_list { my $result; my @allnames; &Apache::lonxml::debug("Looking for :$extension:"); - foreach my $file () - { + foreach my $file () { my $name=&Apache::lonnet::metadata($file,'title'); if ($namewanted && ($name eq $namewanted)) { $result=$file; @@ -505,7 +506,7 @@ sub handler { #my $t0 = [&gettimeofday()]; my $request=$_[0]; -# if ( $ENV{'user.name'} eq 'physnet' ) {$Apache::lonxml::debug=1;} + if ( $ENV{'user.name'} eq 'albertel' ) {$Apache::lonxml::debug=1;} if (&setupheader($request)) { return OK; } $ENV{'request.uri'}=$request->uri;