--- loncom/homework/bridgetask.pm 2005/05/27 17:08:03 1.32 +++ loncom/homework/bridgetask.pm 2005/11/03 21:29:57 1.74 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.32 2005/05/27 17:08:03 albertel Exp $ +# $Id: bridgetask.pm,v 1.74 2005/11/03 21:29:57 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,6 +36,7 @@ use Apache::File(); use Apache::lonmenu; use Apache::lonlocal; use Apache::lonxml; +use Apache::slotrequest(); use Time::HiRes qw( gettimeofday tv_interval ); BEGIN { @@ -67,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'}; @@ -91,6 +102,7 @@ sub proctor_check_auth { sub get_version { my ($version,$previous); if ($env{'form.previousversion'} && + $env{'form.previousversion'} ne 'current' && defined($Apache::lonhomework::history{'resource.'.$env{'form.previousversion'}.'.status'})) { $version=$env{'form.previousversion'}; $previous=1; @@ -129,6 +141,7 @@ sub add_previous_version_button { my $list='\n\n"; + $list.=''; $result.='