WeBWorK Main Forum

Proctored vs non-proctored gateway quiz -- about user and class settings

Re: Proctored vs non-proctored gateway quiz -- about user and class settings

by Joseph Lo -
Number of replies: 0
Thanks very much for the reply. I agree that it is dangerous to bulk-change quiz settings without understanding exactly what the consequences are.

Randomizing question orders is an important one and should not be altered. I actually played with this setting before and it did mess up students' answers (good that it was not a real test). This setting, unfortunately, was not overridden for unproctored quizzes.

On the other hand, the settings for "number of problems per page", "show scores on finished assignments" and "show problems on finished tests" shouldn't cause too much trouble if changed. Since the answer date are different for each student, we will need to control these settings manually to release the scores and the tests for viewing all at the same time. These settings were not allowed to be bulk-changed for proctored quizzes.

I did some code-digging and found something relevant in GatewayQuiz.pm and LoginProctor.pm. These are the changes I made:

For GatewayQuiz.pm, inside "sub pre_header_initialize", before the line
$db->putSetVersion($cleanSet);
I added
$cleanSet->problem_randorder($set->problem_randorder);

For LoginProctor.pm, inside "sub body", before the line
$db->putSetVersion($UserSet);
I added
$UserSet->problems_per_page('');
$UserSet->hide_score('');
$UserSet->hide_score_by_problem('');
$UserSet->hide_work('');

So far this seems to work OK but there could be some problems that I might have failed to foresee.

To determine whether the test is open or closed, I was thinking instead of using $set->due_date, use $closeTime, where

$closeTime = ($set->version_time_limit > 0) ? $set->open_date + $set->version_time_limit : $set->due_date;
if ($set->time_limit_cap && $closeTime > $set->due_date) {$closeTime = $set->due_date;}

This way the time can be extended by the same amount for every student. I was tempted to try this but there must be a lot of places to change and I am sure I will break something.