--- loncom/homework/bridgetask.pm 2007/02/23 01:04:05 1.227 +++ loncom/homework/bridgetask.pm 2007/05/03 16:51:47 1.233 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.227 2007/02/23 01:04:05 albertel Exp $ +# $Id: bridgetask.pm,v 1.233 2007/05/03 16:51:47 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,7 +38,6 @@ use Apache::lonlocal; use Apache::lonxml; use Apache::slotrequest(); use Time::HiRes qw( gettimeofday tv_interval ); -use lib '/home/httpd/lib/perl/'; use LONCAPA; @@ -488,6 +487,7 @@ sub webgrade_standard_info { 'stop' => 'Quit Grading', 'fail' => 'Fail Rest', 'cancel' => 'Cancel', + 'submit' => 'Submit Grades', ); %lt=&Apache::lonlocal::texthash(%lt); @@ -495,26 +495,35 @@ sub webgrade_standard_info {
Found '. - &Apache::lonnet::gettitle($symb).' for '.$uname.' at '.$udom.' |
'. + &mt('Grading [_1] for [_2] at [_3]', + &Apache::lonnet::gettitle($symb),$uname,$udom).'
'; $form_tag_start.= ''; @@ -800,6 +813,12 @@ sub start_Task { } } if ($webgrade eq 'yes') { $result.=&webgrade_standard_info(); } + } elsif ($target eq 'webgrade' + && $env{'request.state'} eq 'construct') { + $result.=$form_tag_start; + $result.=''; + $result.=&webgrade_standard_info(); } if ($target eq 'webgrade') { $result.="\n".''.&mt("Failed to authenticate the proctor.") - .'
'; + $msg.='' + .&mt("Failed to authenticate the proctor.") + .'
'; } + + my $valid; + my @possible_proctors=split(",",$slot->{'proctor'}); + foreach my $proctor (@possible_proctors) { + if ($proctor =~ /$LONCAPA::username_re:$LONCAPA::domain_re/) { + $valid = 1; + last; + } + } + if (!$valid) { + $msg.='' + .&mt("No valid poctors are defined.") + .'
'; + } + if (!$env{'form.proctordomain'}) { $env{'form.proctordomain'}=$domain; } + my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'}); + $uri = &HTML::Entities::encode($uri,'<>&"'); my $result= (<Your room's proctor needs to validate your access to this resource.
$msg -