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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.7, 2.2.4, 2.3.1, 2.4
    • 2.2.5, 2.3.2
    • Choice
    • MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • master_MDL-34994
    • 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.

    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.

      Attachments

        Issue Links

          Activity

            People

              danmarsden Dan Marsden
              ciceidev CICEI ULPGC
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Ankit Agarwal Ankit Agarwal
              Dan Marsden, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Sep/12