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

Importing from 1.9 multichoices questions fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.2
    • Backup
    • None
    • MOODLE_22_STABLE

      We're restoring from 1.9.9+ that contains multichoices
      After submitting the second step of the restore the process dies with:

      Debug info: Argument 1 passed to moodle1_qtype_multichoice_handler::write_multichoice() must be an array, null given, called in .../moodle/question/type/multichoice/backup/moodle1/lib.php on line 53 and defined

      The problem is that when calling:

      $this->write_multichoice($data['multichoice'], $data['oldquestiontextformat']);

      $data['multichoice'] is null

      The header of the function is
      protected function write_multichoice(array $multichoices, $oldquestiontextformat) {

      We've got two solutions
      1) Call the function only if $data['multichoice'] is not null
      2) Declaring first parameter not as as array (this is not tested)

            moodle.com Moodle HQ
            pferre22 Pau Ferrer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.