--- loncom/homework/bridgetask.pm 2007/02/23 17:14:20 1.228 +++ loncom/homework/bridgetask.pm 2007/04/06 21:22:24 1.230 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.228 2007/02/23 17:14:20 albertel Exp $ +# $Id: bridgetask.pm,v 1.230 2007/04/06 21:22:24 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; @@ -3015,19 +3014,43 @@ sub proctor_validation_screen { my ($slot) = @_; my (undef,undef,$domain,$user) = &Apache::lonnet::whichuser(); my $url=&Apache::lonnet::studentphoto($domain,$user,'jpg'); + if ($url ne '/adm/lonKaputt/lonlogo_broken.gif') { + $url = "
'.&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 -