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

Investigate and fix xxx_update_events() behavior with group override events

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9.6, 3.10.3, 3.11, 4.0
    • Fix Version/s: None
    • Component/s: Assignment, Calendar, Quiz
    • Labels:
      None
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE

      Description

      While working on MDL-71156, reported by various people running the CLI created there.. it was noticed that, after executing (lesson|assing|quiz)_update_events(), some of the regenerated group-override calendar events were missing userid.

      So, in the cli, we implemented an extra update for those records which userid was zero after the regeneration.

      Locally, in the testing site used to develop that CLI solution... I was unable to reproduce the problem and all the regenerated events (note that they are completely new events because before calling to the functions we first delete them from the event table) always had userid.

      I tried to trace the code execution to see if there was any obvious place/condition causing the userid to remain = 0, but was unable to find it.

      Note that the reported cases were always about quiz and assign.

      So this issue is about to:

      1) find in which case those methods are leading to group (only group, not user!) override events having userid = 0 (they should have the userid of the teacher creating them).
      2) fix that case and ensure that they always end with the teacher userid.

      Ciao

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: