You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
1.3 KiB

#!/usr/bin/perl
#
# $Id: tclock.pl,v 1.3 2006/01/23 21:39:30 ddoughty Exp $
#
# Source File: tclock.pl
# Get config
require 'sitecfg.pl';
require 'testlib.pl';
&app_initialize;
print "Content-Type: text/html\n\n";
if (&get_session($FORM{'tid'})) {
$TEST{'id'} = $FORM{'tstid'};
&get_client_profile($SESSION{'clid'});
## v support for wilcard login
# (replaced) &get_candidate_profile( $SESSION{'clid'}, $SESSION{'uid'});
# (with)
if ($SESSION{'taclid'} eq '') {
&get_candidate_profile( $SESSION{'clid'}, $SESSION{'uid'});
} else {
&get_tacl_profile();
}
## ^ support for wilcard login
&get_test_profile( $SESSION{'clid'}, $TEST{'id'});
&get_test_sequence( $SESSION{'clid'}, $SESSION{'uid'}, $TEST{'id'});
($tstate,$tsubtest,$tqno) = split(/\./, $TEST_SESSION{'state'});
if ($tstate eq $TEST_STATES{'_PAUSED_BY_USER'} || $tstate eq $TEST_STATES{'_IN_PROGRESS'}) {
@stqids = split(/&/, $SUBTEST_QUESTIONS{$tsubtest});
$TEST_SESSION{'noq'} = $#stqids;
$TEST{'noq'} = $#stqids;
($trash, $tmreset) = split(/&/, $SUBTEST_SUMMARY{$tsubtest});
($hrs, $mins, $secs) = split(/:/, $tmreset);
$tmremaining = ($hrs * 60) + $mins;
$TEST{'maxtm'} = $tmremaining;
$thrs = sprintf( "%02d", eval($TEST{'maxtm'} / 60));
$tmin = $TEST{'maxtm'} - $thrs * 60;
$TEST{'maxtmfmt'} = sprintf("%02d:%02d:%02d", $thrs,$tmin, $secs);
}
&show_template("tstclock");
}