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

Moving multiple_choice questions between contexts breaks them

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.9
    • 1.9
    • Questions
    • None
    • MOODLE_19_STABLE
    • 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

            timhunt Tim Hunt
            timhunt Tim Hunt
            Nobody Nobody
            Safat Shahin, Tim Hunt, Andrew Lyons, 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:
              3/Mar/08