--- loncom/homework/bridgetask.pm 2005/06/04 08:17:06 1.37 +++ loncom/homework/bridgetask.pm 2005/08/09 07:34:51 1.38 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.37 2005/06/04 08:17:06 albertel Exp $ +# $Id: bridgetask.pm,v 1.38 2005/08/09 07:34:51 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -165,25 +165,30 @@ sub add_grading_button { } sub add_request_another_attempt_button { + my ($text)=@_; + if (!$text) { $text="Request another attempt"; } my $result; my $symb=&Apache::lonnet::symbread(); my ($slot_name,$slot)=&Apache::slotrequest::check_for_reservation($symb); + my $action='get_reservation'; if ($slot_name) { + $text="Change reservation."; + $action='change_reservation'; my $description=&Apache::slotrequest::get_description($slot_name, $slot); $result.=(< Will be next available: $description

STUFF - - } else { - if ($env{'request.enc'}) { $symb=&Apache::lonenc::encrypted($symb); } - $symb=&Apache::lonnet::escape($symb); - $result.='
'. - ''. - ''. - '
'; } + + if ($env{'request.enc'}) { $symb=&Apache::lonenc::encrypted($symb); } + $symb=&Apache::lonnet::escape($symb); + $result.='
'. + ''. + ''. + ''. + '
'; return $result; } @@ -219,6 +224,14 @@ sub start_Task { my $uri=$env{'request.uri'}; if ($env{'request.enc'}) { $uri=&Apache::lonenc::encrypted($uri); } $body_tag_start.=$uri.'">'.&add_grading_button().""; + my $symb=&Apache::lonnet::symbread(); + $body_tag_start.='
'. + ''. + ''. + ''. + '
'; + } } if ($target eq 'web' || ($target eq 'grade' && !$env{'form.webgrade'}) || $target eq 'answer' || @@ -249,6 +262,7 @@ sub start_Task { $msg.='

'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'

'; } elsif ($status eq 'NOT_IN_A_SLOT') { $msg.='

'.&mt('You are not currently signed up to work at this time and/or place.').'

'; + $msg.=&add_request_another_attempt_button("Sign up for time to work."); } elsif ($status eq 'NEEDS_CHECKIN') { $msg.='

'.&mt('You need the Proctor to validate you.'). '

'.&proctor_validation_screen($slot);