--- loncom/homework/bridgetask.pm 2005/10/14 16:23:39 1.70 +++ loncom/homework/bridgetask.pm 2005/10/24 18:40:21 1.73 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.70 2005/10/14 16:23:39 albertel Exp $ +# $Id: bridgetask.pm,v 1.73 2005/10/24 18:40:21 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -68,8 +68,18 @@ sub proctor_check_auth { foreach my $possible (@allowed) { my ($puser,$pdom)=(split('@',$possible)); if ($puser eq $user && $pdom eq $domain) { - my $authhost=&Apache::lonnet::authenticate($puser,$env{'form.proctorpassword'},$pdom); - if ($authhost ne 'no_host') { + my $authenticated=0; + if ( $slot->{'secret'} =~ /\S/ && + $env{'form.proctorpassword'} eq $slot->{'secret'} ) { + $authenticated=1; + } else { + + my $authhost=&Apache::lonnet::authenticate($puser,$env{'form.proctorpassword'},$pdom); + if ($authhost ne 'no_host') { + $authenticated=1; + } + } + if ($authenticated) { my $version= $Apache::lonhomework::results{'resource.version'}= ++$Apache::lonhomework::history{'resource.version'}; @@ -317,8 +327,8 @@ sub submission_time_stamp { my $slot_name=$Apache::lonhomework::history{'resource.'.$version.'.checkedin.slot'}; my %slot=&Apache::lonnet::get_slot($slot_name); my $diff = $slot{'endtime'} - $submissiontime; - my ($color,$when)=('red','after'); - if ($diff > 0) { ($color,$when)=('green','before'); } + my ($color,$when)=('#FF6666','after'); + if ($diff > 0) { ($color,$when)=('#336600','before'); } my $info; if ($diff%60) { $info=($diff%60).' seconds'; } $diff=int($diff/60); @@ -344,7 +354,7 @@ sub webgrade_standard_info { my $file=$file_url.$partial_file; $file=~s|/+|/|g; &Apache::lonnet::allowuploaded('/adm/bridgetask',$file); - $file_list.='
  • '.$file. '
  • '."\n"; }