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

Loading questions can cause fatal errors in unfortunate places

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.4.3, 3.5
    • None
    • Questions
    • None
    • 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

              Unassigned Unassigned
              timhunt Tim Hunt
              Safat Shahin, Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: