--- loncom/homework/bridgetask.pm 2005/05/24 19:33:28 1.30 +++ loncom/homework/bridgetask.pm 2005/11/04 15:31:53 1.76 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.30 2005/05/24 19:33:28 albertel Exp $ +# $Id: bridgetask.pm,v 1.76 2005/11/04 15:31:53 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.='