Diff for /loncom/homework/bridgetask.pm between versions 1.229 and 1.230

version 1.229, 2007/03/26 22:37:42 version 1.230, 2007/04/06 21:22:24
Line 38  use Apache::lonlocal; Line 38  use Apache::lonlocal;
 use Apache::lonxml;  use Apache::lonxml;
 use Apache::slotrequest();  use Apache::slotrequest();
 use Time::HiRes qw( gettimeofday tv_interval );  use Time::HiRes qw( gettimeofday tv_interval );
 use lib '/home/httpd/lib/perl/';  
 use LONCAPA;  use LONCAPA;
     
   
Line 3015  sub proctor_validation_screen { Line 3014  sub proctor_validation_screen {
     my ($slot) = @_;      my ($slot) = @_;
     my (undef,undef,$domain,$user) = &Apache::lonnet::whichuser();      my (undef,undef,$domain,$user) = &Apache::lonnet::whichuser();
     my $url=&Apache::lonnet::studentphoto($domain,$user,'jpg');      my $url=&Apache::lonnet::studentphoto($domain,$user,'jpg');
       if ($url ne '/adm/lonKaputt/lonlogo_broken.gif') {
    $url = "<tr><td colspan=\"2\"><img src=\"$url\" /></td></tr>";
       } else {
    undef($url);
       }
   
     my $name=&Apache::loncommon::plainname($user,$domain);      my $name=&Apache::loncommon::plainname($user,$domain);
           
     my $msg;      my $msg;
     if ($env{'form.proctorpassword'}) {      if ($env{'form.proctorpassword'}) {
  $msg='<p><font color="red">'.&mt("Failed to authenticate the proctor.")   $msg.='<p><span class="LC_warning">'
     .'</font></p>';      .&mt("Failed to authenticate the proctor.")
       .'</span></p>';
     }      }
   
       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.='<p><span class="LC_error">'
       .&mt("No valid poctors are defined.")
       .'</span></p>';
       }
       
     if (!$env{'form.proctordomain'}) { $env{'form.proctordomain'}=$domain; }      if (!$env{'form.proctordomain'}) { $env{'form.proctordomain'}=$domain; }
     my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'});      my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'});
     $uri = &HTML::Entities::encode($uri,'<>&"');      $uri = &HTML::Entities::encode($uri,'<>&"');
Line 3045  sub proctor_validation_screen { Line 3066  sub proctor_validation_screen {
       <tr><td>Name:</td><td>$name</td></tr>        <tr><td>Name:</td><td>$name</td></tr>
       <tr><td>Student ID:</td><td>$env{'environment.id'}</td></tr>        <tr><td>Student ID:</td><td>$env{'environment.id'}</td></tr>
       <tr><td>Usename</td><td>$user:$domain</td></tr>        <tr><td>Usename</td><td>$user:$domain</td></tr>
       <tr><td colspan="2"><img src="$url" /></td></tr>        $url
     </table>      </table>
   </tr></td>    </tr></td>
 </table>  </table>

Removed from v.1.229  
changed lines
  Added in v.1.230


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>