version 1.70, 2005/10/14 16:23:39
|
version 1.72, 2005/10/14 20:00:23
|
Line 68 sub proctor_check_auth {
|
Line 68 sub proctor_check_auth {
|
foreach my $possible (@allowed) { |
foreach my $possible (@allowed) { |
my ($puser,$pdom)=(split('@',$possible)); |
my ($puser,$pdom)=(split('@',$possible)); |
if ($puser eq $user && $pdom eq $domain) { |
if ($puser eq $user && $pdom eq $domain) { |
my $authhost=&Apache::lonnet::authenticate($puser,$env{'form.proctorpassword'},$pdom); |
my $authenticated=0; |
if ($authhost ne 'no_host') { |
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= |
my $version= |
$Apache::lonhomework::results{'resource.version'}= |
$Apache::lonhomework::results{'resource.version'}= |
++$Apache::lonhomework::history{'resource.version'}; |
++$Apache::lonhomework::history{'resource.version'}; |
Line 317 sub submission_time_stamp {
|
Line 327 sub submission_time_stamp {
|
my $slot_name=$Apache::lonhomework::history{'resource.'.$version.'.checkedin.slot'}; |
my $slot_name=$Apache::lonhomework::history{'resource.'.$version.'.checkedin.slot'}; |
my %slot=&Apache::lonnet::get_slot($slot_name); |
my %slot=&Apache::lonnet::get_slot($slot_name); |
my $diff = $slot{'endtime'} - $submissiontime; |
my $diff = $slot{'endtime'} - $submissiontime; |
my ($color,$when)=('red','after'); |
my ($color,$when)=('#FF6666','after'); |
if ($diff > 0) { ($color,$when)=('green','before'); } |
if ($diff > 0) { ($color,$when)=('#336600','before'); } |
my $info; |
my $info; |
if ($diff%60) { $info=($diff%60).' seconds'; } |
if ($diff%60) { $info=($diff%60).' seconds'; } |
$diff=int($diff/60); |
$diff=int($diff/60); |