Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,19 @@ sub displaySets ($c) {
my $set;
my $vNum = 0;

# For versioned tests we might be displaying the test date and test time.
# For versioned tests we might be displaying the test date and test time,
# and we need to know if the test is proctored or not.
my $dateOfTest = '';
my $testTime = '';
my $timeLeft = '';
my $proctored = 0;

if ($setIsVersioned) {
($setName, $vNum) = ($setName =~ /(.+),v(\d+)$/);
# Information from the set is needed to set up the display below. So get the merged user set as well.
$set = $db->getMergedSetVersion($studentRecord->user_id, $setName, $vNum);
$dateOfTest = localtime($set->version_creation_time());
$proctored = $set->assignment_type =~ /proctored/;
if ($set->version_last_attempt_time) {
$testTime = ($set->version_last_attempt_time - $set->open_date) / 60;
my $timeLimit = $set->version_time_limit / 60;
Expand Down Expand Up @@ -173,6 +176,7 @@ sub displaySets ($c) {

my $version_data = {
version => $vNum,
proctored => $proctored,
score => $score,
total => $total,
date => $dateOfTest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@
% if ($rec->{total} != -1) {
% # Make a versioned set name format nicer and link to the test version.
% my $versionLink = link_to "version $rec->{version}" => $c->systemLink(
% url_for('gateway_quiz', setID => "$setID,v$rec->{version}"),
% url_for(
% $rec->{proctored} ? 'proctored_gateway_quiz' : 'gateway_quiz',
% setID => "$setID,v$rec->{version}",
% ),
% params => { effectiveUser => $rec->{record}{user_id} }
% );
%
Expand Down