From 69ec22f23dc0e5032463920f2f3a94a69c181556 Mon Sep 17 00:00:00 2001 From: Jaimos Skriletz Date: Sun, 8 Dec 2024 10:17:54 -0700 Subject: [PATCH] Updates from review. Don't show the quiz timer for instructors who can submit student answers after the due date. Update the help language to try to better describe how dangerous it is to leave the record_answers_when_acting_as_student permission on. --- lib/WeBWorK/ConfigValues.pm | 8 ++++---- templates/ContentGenerator/GatewayQuiz.html.ep | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/WeBWorK/ConfigValues.pm b/lib/WeBWorK/ConfigValues.pm index 29c820cce1..d8c563174a 100644 --- a/lib/WeBWorK/ConfigValues.pm +++ b/lib/WeBWorK/ConfigValues.pm @@ -532,10 +532,10 @@ sub getConfigValues ($ce) { 'When acting as a student, this permission level and higher can submit answers for that student, ' . 'which includes starting and grading test versions. This permission should only be turned ' . 'on temporarily and set back to "nobody" after you are done submitting answers for a ' - . 'student, as it can interfere with tests. If you have this permission and are viewing a ' - . 'test version for a student that is also working on that version, your answers will be ' - . 'saved for that student when moving between pages, which could reset or change the answers ' - . 'entered in by the student.' + . 'student. Leaving this permission on is dangerous, as you could unintentionally submit ' + . 'answers for a student, which can use up their total number of attempts. Further, if you ' + . 'are viewing an open test version, your answers on each page will be saved when you move ' + . q/between pages, which will overwrite the student's saved answers./ ), type => 'permission' }, diff --git a/templates/ContentGenerator/GatewayQuiz.html.ep b/templates/ContentGenerator/GatewayQuiz.html.ep index 997e818a3e..8cfccc8de1 100644 --- a/templates/ContentGenerator/GatewayQuiz.html.ep +++ b/templates/ContentGenerator/GatewayQuiz.html.ep @@ -233,7 +233,7 @@ % # Remaining output of test headers. % # Display timer or information about elapsed time, output link, and information about any recorded score if not % # submitAnswers or checkAnswers. -% if ($c->{can}{recordAnswersNextTime} || $c->{can}{gradeUnsubmittedTest}) { +% if ($c->{can}{recordAnswersNextTime} && before($c->{set}->due_date, $submitTime)) { % my $timeLeft = $c->{set}->due_date - int($submitTime); # This is in seconds % % # Print the timer if there is less than 24 hours left. @@ -657,7 +657,7 @@ % && (!$c->{can}{recordAnswersNextTime} || $c->{can}{showProblemGrader})) { <%= submit_button maketext('Check Test'), name => 'checkAnswers', class => 'btn btn-primary mb-1' =%> % } - % if ($c->{can}{recordAnswersNextTime} || $c->{can}{gradeUnsubmittedTest}) { + % if ($c->{can}{recordAnswersNextTime}) { <%= tag('input', type => 'submit', name => 'submitAnswers',