--- loncom/homework/bridgetask.pm 2007/03/26 22:37:42 1.229 +++ 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.229 2007/03/26 22:37:42 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,13 +3014,35 @@ 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 = ""; + } else { + undef($url); + } + my $name=&Apache::loncommon::plainname($user,$domain); my $msg; if ($env{'form.proctorpassword'}) { - $msg='

'.&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,'<>&"'); @@ -3045,7 +3066,7 @@ sub proctor_validation_screen { Name:$name Student ID:$env{'environment.id'} Usename$user:$domain - + $url