Quiz

[2.8] Getting a 500 error when I try to start or continue a quiz

 
Picture of Laura M
[2.8] Getting a 500 error when I try to start or continue a quiz
 

I'm using Moodle 2.8, and I can't get any quizzes to load. They aren't expired, and it doesn't matter whether they've been attempted yet.

How can I fix this?

 
Average of ratings: -
Picture of Emma Richardson
Re: [2.8] Getting a 500 error when I try to start or continue a quiz
Documentation writersParticularly helpful Moodlers

Can you turn debugging on and post the full error message?

 
Average of ratings: Useful (1)
Picture of Laura M
Re: [2.8] Getting a 500 error when I try to start or continue a quiz
 

Fatal error: Call to undefined method atto_texteditor::set_text() in /public_html/elearning/question/type/essay/renderer.php on line 239

Line 239 is $editor->set_text($response);

I have Atto version 2014111000, and it works elsewhere on the site.

I tried switching to the plain text editor and got a message saying "Fatal error: Call to undefined method textarea_texteditor::set_text() in /public_html/elearning/question/type/essay/renderer.php on line 239".

class qtype_essay_format_editor_renderer extends plugin_renderer_base {
    ...

    public function response_area_input($name, $qa, $step, $lines, $context) {
        global $CFG;
        require_once($CFG->dirroot . '/repository/lib.php');

        $inputname = $qa->get_qt_field_name($name);
        $responseformat = $step->get_qt_var($name . 'format');
        $id = $inputname . '_id';

        $editor = editors_get_preferred_editor($responseformat);
        $strformats = format_text_menu();
        $formats = $editor->get_supported_formats();
        foreach ($formats as $fid) {
            $formats[$fid] = $strformats[$fid];
        }

        list($draftitemid, $response) = $this->prepare_response_for_editing(
                $name, $step, $context);

        $editor->set_text($response);
        ...
    }
    ...
}
 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: [2.8] Getting a 500 error when I try to start or continue a quiz
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

Moodle 2.8 is no longer supported.

Still, I don't remember this ever being broken. Are you sure that all the Moodle code files on your sever are present and correct? It is most likely some code that should be there is missing.

But, really, you should update to a more recent version.

 
Average of ratings: Useful (1)