From: jamiesensei Date: Mon, 26 May 2008 13:18:46 +0000 (+0000) Subject: MDL-12824 "Essay type of quiz questions needs to color mark which students have been... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a76a131ab57051e88a67215433b7780c1499f321;p=moodle.git MDL-12824 "Essay type of quiz questions needs to color mark which students have been graded and which have NOT" Fixing notices introduced by the changes for this bug in grading report when no question is selected. --- diff --git a/mod/quiz/report/grading/report.php b/mod/quiz/report/grading/report.php index b7cfeb81dd..641d80cde8 100644 --- a/mod/quiz/report/grading/report.php +++ b/mod/quiz/report/grading/report.php @@ -181,16 +181,18 @@ class quiz_report extends quiz_default_report { $menu = popup_form(($qurl->out()).'&questionid=',$qmenu, 'questionid', $questionid, 'choose', '', '', true); echo '
'.$menu.'
'; } - if ($questionid){ - $a= new object(); - $a->number = $question->number; - $a->name = $question->name; - $a->gradedattempts =$qattempts[$question->id]->gradedattempts; - $a->totalattempts =$qattempts[$question->id]->totalattempts; - $a->openspan =''; - $a->closespan =''; - print_heading(get_string('questiontitle', 'quiz_grading', $a)); + if (!$questionid){ + return true; } + $a= new object(); + $a->number = $question->number; + $a->name = $question->name; + $a->gradedattempts =$qattempts[$question->id]->gradedattempts; + $a->totalattempts =$qattempts[$question->id]->totalattempts; + $a->openspan =''; + $a->closespan =''; + print_heading(get_string('questiontitle', 'quiz_grading', $a)); + // our 3 different views // the first one displays all of the manually graded questions in the quiz // with the number of ungraded attempts for each question @@ -204,7 +206,7 @@ class quiz_report extends quiz_default_report { $ungraded = $qattempts[$questionid]->totalattempts- $qattempts[$questionid]->gradedattempts; if ($gradeungraded || $gradeall || $userid || $attemptid){ $this->print_questions_and_form($quiz, $question, $userid, $attemptid, $gradeungraded, $ungraded); - } else if ($questionid){ + } else { $this->view_question($quiz, $question, $qattempts[$questionid]->totalattempts, $ungraded); } return true;