From James Miller (yositune at yahoo.com) Wednesday, 26 March 2003, 11:11 PM:
I know that Postgresql supports triggers; maybe implemented a trigger to hold the old total values for each attempt when the total question gets touched?
Additionally, I wonder if this is fixed by this bug I filed last week? http://moodle.org/bugs/bug.php?op=show&bugid=316
From Martin Dougiamas (martin at moodle.com) Thursday, 27 March 2003, 10:28 AM:
No, this is not related to MDL-316. You can't regrade questions that haven't been answered yet.
Basically, I think quizzes should not allow addition of new questions at all once students have already made attempts. Teachers can just make a new quiz if they want to do that.
From Bernard Boucher (bernard.boucher at cjonquiere.qc.ca) Saturday, 15 May 2004, 11:19 PM:
I think we can't stop teacher admin editing quiz. Sometimes quiz are used only as self formative evaluation with a grade that will not be accounted in gradebook, or teacher test and modify his test.
I suggest a strong indication when editing a quiz:
For that add these lines in :
moodle/mod/quiz/edit.php around line 210 just before
print_simple_box_end();
if($attemptcount = count_records_select(quiz_attempts, quiz = '$modform->instance' AND timefinish > 0)) {
$strattemptexist = get_string(attemptexist,quiz);
$usercount = count_records(quiz_grades, quiz, $modform->instance);
$strusers = get_string(users);
$strviewallanswers = get_string(viewallanswers,quiz,$attemptcount);
echo <p align=left><a href=\report.php?id=$modform->instance\><font color=#FF0000 ><blink>$strattemptexist $strviewallanswers ($usercount $strusers)</blink></a></p>;
}
That require a new stringname in moodle/lang/en/quiz.php
$string['attemptexist'] = 'Attention: quiz already attempted :';
I hope it may help.
If so I will try others bugs.
Bye,
Bernard
From Bernard Boucher (bernard.boucher at cjonquiere.qc.ca) Sunday, 16 May 2004, 12:39 AM:
Hi again,
after re-reading your comment I see that you prefer to totally restrict questions addiditon to attempted quiz.
I will suggest code for that too if you prefer.
Bye,
Bernard
From Martin Dougiamas (martin at moodle.com) Wednesday, 19 May 2004, 11:49 AM:
No, your way is better, I've just checked it in.
Thanks, Bernard!
From James Miller (yositune at yahoo.com) Wednesday, 26 March 2003, 11:11 PM:
I know that Postgresql supports triggers; maybe implemented a trigger to hold the old total values for each attempt when the total question gets touched?
Additionally, I wonder if this is fixed by this bug I filed last week? http://moodle.org/bugs/bug.php?op=show&bugid=316
From Martin Dougiamas (martin at moodle.com) Thursday, 27 March 2003, 10:28 AM:
No, this is not related to
MDL-316. You can't regrade questions that haven't been answered yet.Basically, I think quizzes should not allow addition of new questions at all once students have already made attempts. Teachers can just make a new quiz if they want to do that.
From Bernard Boucher (bernard.boucher at cjonquiere.qc.ca) Saturday, 15 May 2004, 11:19 PM:
I think we can't stop teacher admin editing quiz. Sometimes quiz are used only as self formative evaluation with a grade that will not be accounted in gradebook, or teacher test and modify his test.
I suggest a strong indication when editing a quiz:
For that add these lines in :
moodle/mod/quiz/edit.php around line 210 just before
print_simple_box_end();
if($attemptcount = count_records_select(quiz_attempts, quiz = '$modform->instance' AND timefinish > 0)) { $strattemptexist = get_string(attemptexist,quiz); $usercount = count_records(quiz_grades, quiz, $modform->instance); $strusers = get_string(users); $strviewallanswers = get_string(viewallanswers,quiz,$attemptcount); echo <p align=left><a href=\report.php?id=$modform->instance\><font color=#FF0000 ><blink>$strattemptexist $strviewallanswers ($usercount $strusers)</blink></a></p>; }
That require a new stringname in moodle/lang/en/quiz.php
$string['attemptexist'] = 'Attention: quiz already attempted :';
I hope it may help.
If so I will try others bugs.
Bye,
Bernard
From Bernard Boucher (bernard.boucher at cjonquiere.qc.ca) Sunday, 16 May 2004, 12:39 AM:
Hi again,
after re-reading your comment I see that you prefer to totally restrict questions addiditon to attempted quiz.
I will suggest code for that too if you prefer.
Bye,
Bernard
From Martin Dougiamas (martin at moodle.com) Wednesday, 19 May 2004, 11:49 AM:
No, your way is better, I've just checked it in.
Thanks, Bernard!
MDL-316. You can't regrade questions that haven't been answered yet. Basically, I think quizzes should not allow addition of new questions at all once students have already made attempts. Teachers can just make a new quiz if they want to do that. From Bernard Boucher (bernard.boucher at cjonquiere.qc.ca) Saturday, 15 May 2004, 11:19 PM: I think we can't stop teacher admin editing quiz. Sometimes quiz are used only as self formative evaluation with a grade that will not be accounted in gradebook, or teacher test and modify his test. I suggest a strong indication when editing a quiz: For that add these lines in : moodle/mod/quiz/edit.php around line 210 just before print_simple_box_end(); if($attemptcount = count_records_select(quiz_attempts, quiz = '$modform->instance' AND timefinish > 0)) { $strattemptexist = get_string(attemptexist,quiz); $usercount = count_records(quiz_grades, quiz, $modform->instance); $strusers = get_string(users); $strviewallanswers = get_string(viewallanswers,quiz,$attemptcount); echo <p align=left><a href=\report.php?id=$modform->instance\><font color=#FF0000 ><blink>$strattemptexist $strviewallanswers ($usercount $strusers)</blink></a></p>; } That require a new stringname in moodle/lang/en/quiz.php $string['attemptexist'] = 'Attention: quiz already attempted :'; I hope it may help. If so I will try others bugs. Bye, Bernard From Bernard Boucher (bernard.boucher at cjonquiere.qc.ca) Sunday, 16 May 2004, 12:39 AM: Hi again, after re-reading your comment I see that you prefer to totally restrict questions addiditon to attempted quiz. I will suggest code for that too if you prefer. Bye, Bernard From Martin Dougiamas (martin at moodle.com) Wednesday, 19 May 2004, 11:49 AM: No, your way is better, I've just checked it in. Thanks, Bernard!