Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-27926

Random Short Answer Question in Moodle 2.1 generates an error page

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Testing Instructions:
      Hide

      Create a random short answer question in Moodle 2.1 and try to save it and preview it.

      Show
      Create a random short answer question in Moodle 2.1 and try to save it and preview it.
    • URL:
      qa.moodle.net
    • Affected Branches:
      MOODLE_21_STABLE

      Description

      When creating a random short answer question in Moodle 2.1, I seem to always get the following error page:

      Invalid get_string() identifier: 'randomsamatchnumber' or component 'quiz'
      line 5910 of /lib/moodlelib.php: call to debugging()
      line 6500 of /lib/moodlelib.php: call to core_string_manager->get_string()
      line 44 of /question/type/randomsamatch/edit_randomsamatch_form.php: call to get_string()
      line 165 of /question/type/edit_question_form.php: call to qtype_randomsamatch_edit_form->definition_inner()
      line 152 of /lib/formslib.php: call to question_edit_form->definition()
      line 80 of /question/type/edit_question_form.php: call to moodleform->moodleform()
      line 231 of /question/type/questiontypebase.php: call to question_edit_form->__construct()
      line 197 of /question/question.php: call to question_type->create_editing_form()
      Skip to main content

      It does create a question, but when I try to preview it I get the following error:

      Coding error detected, it must be fixed by a programmer: Unknown question type (no definition) randomsamatch

      More information about this error

      Stack trace:
      line 234 of /question/engine/bank.php: coding_exception thrown
      line 671 of /question/type/questiontypebase.php: call to question_bank::load_question_definition_classes()
      line 658 of /question/type/questiontypebase.php: call to question_type->make_question_instance()
      line 275 of /question/engine/bank.php: call to question_type->make_question()
      line 265 of /question/engine/bank.php: call to question_bank::make_question()
      line 39 of /question/preview.php: call to question_bank::load_question()

      (this was a reason I failed QA test MDLQA-1032)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                timhunt Tim Hunt
                Reporter:
                rsturley Steve Turley
                Participants:
                Component watchers:
                Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: