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

          Issue Links

            Activity

            Hide
            mudrd8mz David Mudrak added a comment -

            I have a patch for this ready for peer review and testing. For an overview of the change, see:

            https://github.com/mudrd8mz/moodle/compare/master...wip_MDL-26312-workshop-upgrade

            Show
            mudrd8mz David Mudrak added a comment - I have a patch for this ready for peer review and testing. For an overview of the change, see: https://github.com/mudrd8mz/moodle/compare/master...wip_MDL-26312-workshop-upgrade
            Hide
            tsala Helen Foster added a comment -

            Thanks workshop wonder-guy!

            Show
            tsala Helen Foster added a comment - Thanks workshop wonder-guy!

              People

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

                Dates

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