Fatal error: Call to undefined function: quiz_get_feedback() in /home/mycoursesite/public_html/moodle/mod/quiz/index.php on line 127

Fatal error: Call to undefined function: quiz_get_feedback() in /home/mycoursesite/public_html/moodle/mod/quiz/index.php on line 127

Maureen O'Halloran -
Number of replies: 8

I get this message in moodle 1.7

Fatal error: Call to undefined function: quiz_get_feedback() in /home/mycoursesite/public_html/moodle/mod/quiz/index.php on line 127

when clicking on the Quizzes link in the upper right corner (where the links to resources and activities are)

I just upgraded a couple of days ago from 1.5.3  (clean install)

I am using it in a student alias and there is one quiz completed and 7 more blank.

I get the same thing if I backtrack to quizzes from

Site > Coursename > quizzes > quiz1

Thanks for any help - I need this feature in my course

Վարկանիշների միջին թիվը. -
In reply to Maureen O'Halloran

Re: Fatal error: Call to undefined function: quiz_get_feedback() in /home/mycoursesite/public_html/moodle/mod/quiz/index.php on line 127

Maureen O'Halloran -

I did a temporary fix by commenting out line 127 and making that entry a blank line

     //$feedbackcol = quiz_get_feedback($quiz, $bestgrade);
     $feedbackcol = " ";

it would be nice if there was a better fix.

In reply to Maureen O'Halloran

Re: Fatal error: Call to undefined function: quiz_get_feedback() in /home/mycoursesite/public_html/moodle/mod/quiz/index.php on line 127

Matt Gibson -
My students get this error too. If I apply this fix, does it mean they don't get their grades?
In reply to Matt Gibson

Re: Fatal error: Call to undefined function: quiz_get_feedback() in /home/mycoursesite/public_html/moodle/mod/quiz/index.php on line 127

Tim Hunt -
Core developers Նկարը Documentation writers Նկարը Particularly helpful Moodlers Նկարը Peer reviewers Նկարը Plugin developers Նկարը
Oops, silly error in function name. It's actually called quiz_feedback_for_grade(). Fix checked in to 1.7+ and 1.8dev.

The error only affected the display of information on that particular page, it does not cause any more serious problems.
In reply to Tim Hunt

Re: Fatal error: Call to undefined function: quiz_get_feedback() in /home/mycoursesite/public_html/moodle/mod/quiz/index.php on line 127

Manish Verma -
That fixes it. Maureen, thanks for pointing out.
In reply to Manish Verma

Re: Fatal error: Call to undefined function: quiz_get_feedback() in /home/mycoursesite/public_html/moodle/mod/quiz/index.php on line 127

Maureen O'Halloran -
I have replaced line 127 by

$feedbackcol = quiz_feedback_for_grade($quiz, $bestgrade);

Looking at the funtion in locallib.php in mod/quiz

* @param float $grade a grade on this quiz.
* @param integer $quizid the id of the quiz object.
function quiz_feedback_for_grade($grade, $quizid)


The parameters are backwards in the original line 127, it should be

$feedbackcol = quiz_feedback_for_grade($bestgrade, $quiz);

The works - I can see feedback now.


In reply to Maureen O'Halloran

Re: Fatal error: Call to undefined function: quiz_get_feedback() in /home/mycoursesite/public_html/moodle/mod/quiz/index.php on line 127

Tim Hunt -
Core developers Նկարը Documentation writers Նկարը Particularly helpful Moodlers Նկարը Peer reviewers Նկարը Plugin developers Նկարը
Surely that should be $feedbackcol = quiz_feedback_for_grade($bestgrade, $quiz->id);?
In reply to Tim Hunt

Re: Fatal error: Call to undefined function: quiz_get_feedback() in /home/mycoursesite/public_html/moodle/mod/quiz/index.php on line 127

Maureen O'Halloran -
I have no idea (whether it should be $quiz -> id)  all I know is what I put in worked.  I am not an expert at PHP by any means.
In reply to Maureen O'Halloran

Re: Fatal error: Call to undefined function: quiz_get_feedback() in /home/mycoursesite/public_html/moodle/mod/quiz/index.php on line 127

Tim Hunt -
Core developers Նկարը Documentation writers Նկարը Particularly helpful Moodlers Նկարը Peer reviewers Նկարը Plugin developers Նկարը
Don't worry. It is my responsibility to have an idea how the quiz works. I must have been rambling when I typed that last reply.

What I meant to say was: Thank you very much for pointing out the problem so clearly, and supplying the fix. It is contributors like you that make my job as quiz module maintainer much easier.