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

Moving multiple_choice questions between contexts breaks them

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      In question_multichoice_qtype::replace_file_links it does an update_records on 'question_multichoice'. However, in question_multichoice_qtype::get_question_options where this data is loaded, it changes $question->options->answers from a comma-separated list of ids to an array of answer objects.

      So question_multichoice_qtype::replace_file_links ends up writing 'Array' to the DB, which breaks these questions.

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            timhunt Tim Hunt
            Tester:
            Nobody
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08