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

par Maureen O'Halloran,
Nombre de réponses : 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

Moyenne des évaluations: -
En réponse à 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

par 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.

En réponse à 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

par Matt Gibson,
My students get this error too. If I apply this fix, does it mean they don't get their grades?
En réponse à 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

par Tim Hunt,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar 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.
En réponse à 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

par Manish Verma,
That fixes it. Maureen, thanks for pointing out.
En réponse à 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

par 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.


En réponse à 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

par Tim Hunt,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers
Surely that should be $feedbackcol = quiz_feedback_for_grade($bestgrade, $quiz->id);?
En réponse à 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

par 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.
En réponse à 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

par Tim Hunt,
Avatar Core developers Avatar Documentation writers Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar 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.