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

Workshop 1.9 > 2.0 upgrade code may easily produce mismatched course_module records

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.9.10, 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: Workshop
    • Labels:
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Several users at http://moodle.org/mod/forum/discuss.php?d=166860 reported buggy behaviour of Workshop 1.9 > 2.0 upgrade code. During the code review, a bug was detected in workshop_upgrade_module_instances() function. It tries to update the instance value in course_modules. But it is not able to detect whether the current instance value mean newid or oldid so it can link multiple course_module records to single workshop instance.

      Because there is no easy way how to keep an information on which course_module record already contains newid, it was decided to use import_record() that preserves record's id when migrating workshop instances from workshop_old to workshop table.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    21/Feb/11