I don't think I completely solved the problem (I mean, my problem), but at least I managed to get rid of those scores that are shown right after the attempt. It seems that this (at least in version 1.5) is due to the following check in /mod/quiz/review.php
// If not even responses are to be shown in review then we
// don't allow any review
if (!($quiz->review & QUIZ_REVIEW_RESPONSES)) {
redirect('view.php?q='.$quiz->id);
}
This means that, if no responses must be shown, control is transferred to view.php. But in view.php there is no check of QUIZ_REVIEW_SCORES. So, to add this check, I did the following.
I added a new function at the end of view.php (after function quiz_review_allowed):
function quiz_scores_allowed($quiz) {
// If not even responses are to be shown in review then we
// don't allow any review
if (!($quiz->review & QUIZ_REVIEW_SCORES)) {
return false;
}
if ((time() < $quiz->timeclose) and !($quiz->review & QUIZ_REVIEW_OPEN)) {
return false;
}
if ((time() > $quiz->timeclose) and !($quiz->review & QUIZ_REVIEW_CLOSED)) {
return false;
}
return true;
}
Then I changed line 171 from
if ($numattempts) {
to
if (quiz_scores_allowed($quiz) && $numattempts) {
and line 302 from
if ($quiz->grade and $quiz->sumgrades) {
to
if (quiz_scores_allowed($quiz) && $quiz->grade and $quiz->sumgrades) {
Hope file content and line numbers are not so different from 1.6.
Can I ask a favor? Could someone send me the file mod/quiz/report.php from 1.6 so that I can regrade my quizzies? Thanks.