--- loncom/homework/bridgetask.pm 2006/04/10 18:08:11 1.139 +++ loncom/homework/bridgetask.pm 2006/05/12 05:18:34 1.149 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.139 2006/04/10 18:08:11 albertel Exp $ +# $Id: bridgetask.pm,v 1.149 2006/05/12 05:18:34 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -170,8 +170,8 @@ sub add_grading_button { my (undef,$cid)=&Apache::lonxml::whichuser(); my $cnum=$env{'course.'.$cid.'.num'}; my $cdom=$env{'course.'.$cid.'.domain'}; - my %sections; - my $numsections=&Apache::loncommon::get_sections($cdom,$cnum,\%sections); + my %sections = &Apache::loncommon::get_sections($cdom,$cnum); + my $size=5; if (scalar(keys(%sections)) < 3) { $size=scalar(keys(%sections))+2; @@ -214,7 +214,7 @@ sub add_grading_button { 'gradingdomain'); $result.=&Apache::loncommon::studentbrowser_javascript(); $result.= '
'; - } + } return $result; } @@ -223,6 +223,12 @@ sub add_request_another_attempt_button { if (!$text) { $text="Request another attempt"; } my $result; my $symb=&Apache::lonnet::symbread(); + # not a slot access based resource + my $useslots = &Apache::lonnet::EXT("resource.0.useslots",$symb); + if ($useslots =~ /^\s*no\s*$/i) { + return ''; + } + my ($slot_name,$slot)=&Apache::slotrequest::check_for_reservation($symb); my $action='get_reservation'; if ($slot_name) { @@ -349,12 +355,15 @@ sub webgrade_standard_info { my %lt=&Apache::lonlocal::texthash('done' => 'Next Item', 'stop' => 'Quit Grading', + 'fail' => 'Fail Rest', ); my $result=<