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

de Maureen O'Halloran -
Número de respuestas: 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

Promedio de valoraciones: -
En respuesta a 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

de 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 respuesta a 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

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

de Tim Hunt -
Imagen de Core developers Imagen de Documentation writers Imagen de Particularly helpful Moodlers Imagen de Peer reviewers Imagen de 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 respuesta a 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

de Manish Verma -
That fixes it. Maureen, thanks for pointing out.
En respuesta a 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

de 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 respuesta a 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

de Tim Hunt -
Imagen de Core developers Imagen de Documentation writers Imagen de Particularly helpful Moodlers Imagen de Peer reviewers Imagen de Plugin developers
Surely that should be $feedbackcol = quiz_feedback_for_grade($bestgrade, $quiz->id);?
En respuesta a 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

de 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 respuesta a 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

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