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

Restoring process for choice module use incorrect id mapping for choice answer optionid

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.7, 2.2.4, 2.3.1, 2.4
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Choice
    • Labels:
    • Testing Instructions:
      Hide

      Create a choice with some options.
      Log in as a few different students and submit some answers.
      Backup the course including user data
      restore the course into a new course including user data
      login as a teacher and check to make sure the responses look exactly the same in both courses.

      Show
      Create a choice with some options. Log in as a few different students and submit some answers. Backup the course including user data restore the course into a new course including user data login as a teacher and check to make sure the responses look exactly the same in both courses.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:
      master_MDL-34994

      Description

      In function process_choice_answer in file restore_choice_stepslib.php, this line:

      $data->optionid = $this->get_mappingid('choice_option', $oldid);

      Should be changed by:

      $data->optionid = $this->get_mappingid('choice_option', $data->optionid);

      To correctly assign new optionid.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Sep/12