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

Loading questions can cause fatal errors in unfortunate places

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.4.3, 3.5
    • Fix Version/s: None
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE

      Description

      This follows on from MDL-62811.

      When you load a question (e.g. using question_bank::load_question_data()), this goes via questionlib.php/_tidy_question to call question_bank::get_qtype($question->qtype)->get_question_options($question);

      Since that is code in (potenitally third-party) question types plugins, it is risky to assume that it will always work.

      At the moment, if an exception is thrown there, then it cases a fatal error - which might be a good thing. It ensures that bugs are found and fixed. On the other hand, it is a bit unrobust. Perhpas we should have a try-catch there, but then we would have to decide what to do to handle the error.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              timhunt Tim Hunt
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: