Moodle
  1. Moodle
  2. MDL-29662

quiz_reset_userdata does not shift dates in user/group overrides

    Details

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

      1. In a course with some enrolled users and groups.
      2. Create a quiz with a close date, and some user and group overrides and change that date.
      3. Do a course reset that leaves the users enrolled, but changes the dates. Make sure all the dates in the quiz are updated.
      4. Do a course reset that removes all enrolments. Make sure the quiz overrides are removed.

      Show
      1. In a course with some enrolled users and groups. 2. Create a quiz with a close date, and some user and group overrides and change that date. 3. Do a course reset that leaves the users enrolled, but changes the dates. Make sure all the dates in the quiz are updated. 4. Do a course reset that removes all enrolments. Make sure the quiz overrides are removed.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      It only shifts the dates in the mdl_quiz table.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Eloy Lafuente (stronk7) added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Integrated (22, 23 & master), thanks!

            Offtopic: !=, !=, !=, !=

            Show
            Eloy Lafuente (stronk7) added a comment - Integrated (22, 23 & master), thanks! Offtopic: !=, !=, !=, !=
            Hide
            Rossiani Wijaya added a comment -

            Hi Tim,

            I get this error message when trying to add groupoverride:

            Notice: Undefined variable: courseid in /master/mod/quiz/lib.php on line 1156
            

            Could you create a quick patch for this?

            Show
            Rossiani Wijaya added a comment - Hi Tim, I get this error message when trying to add groupoverride: Notice: Undefined variable: courseid in /master/mod/quiz/lib.php on line 1156 Could you create a quick patch for this?
            Hide
            Rossiani Wijaya added a comment -

            Failing this issue to get some attention.

            Show
            Rossiani Wijaya added a comment - Failing this issue to get some attention.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Added new commit to all branches changing undefined $courseid to available $quiz->course. I could have left out the param because it's optional but finally went that way.

            Notices should be out now, plz, retest.

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Added new commit to all branches changing undefined $courseid to available $quiz->course. I could have left out the param because it's optional but finally went that way. Notices should be out now, plz, retest. Ciao
            Hide
            Rossiani Wijaya added a comment -

            Hi Tim,

            Regarding step 4, I selected all roles from Unenrol user selection and reset the course. It didn't seem to remove the group and user overrides. In user override, the list of students still there in greyout font color. In group overrides, the list of group are still available. I'm not sure if there's any other settings need to be selected to do step 4.

            Show
            Rossiani Wijaya added a comment - Hi Tim, Regarding step 4, I selected all roles from Unenrol user selection and reset the course. It didn't seem to remove the group and user overrides. In user override, the list of students still there in greyout font color. In group overrides, the list of group are still available. I'm not sure if there's any other settings need to be selected to do step 4.
            Hide
            Aparup Banerjee added a comment -

            i got the same as Rosie here, reset with 'Delete all overrides in course'

            Show
            Aparup Banerjee added a comment - i got the same as Rosie here, reset with 'Delete all overrides in course'
            Hide
            Eloy Lafuente (stronk7) added a comment - - edited

            Yeah, while shift dates seems to be working perfectly (point 3 of testing and this issue's goal), it seems that user overrides are not deleted on unenrol (point 4). Group overrides are deleted ok on group deletion.

            I'd recommend creating a new issue (testing of this discovered the new one) about user overrides not being deleted on course reset with unenrolments happening.

            And consider this (shift dates of overrides) passed. Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - - edited Yeah, while shift dates seems to be working perfectly (point 3 of testing and this issue's goal), it seems that user overrides are not deleted on unenrol (point 4). Group overrides are deleted ok on group deletion. I'd recommend creating a new issue (testing of this discovered the new one) about user overrides not being deleted on course reset with unenrolments happening. And consider this (shift dates of overrides) passed. Ciao
            Hide
            Rossiani Wijaya added a comment -

            Thanks Eloy for your feedback.

            I will pass this issue and create new issue to fix "step 4"

            Test passed.

            Show
            Rossiani Wijaya added a comment - Thanks Eloy for your feedback. I will pass this issue and create new issue to fix "step 4" Test passed.
            Hide
            Rossiani Wijaya added a comment -

            Create MDL-35280 to remove user/groups overrides (step4).

            Show
            Rossiani Wijaya added a comment - Create MDL-35280 to remove user/groups overrides (step4).
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Many thanks for the hard work.

            These changes have been spread upstream and are already available in the git and cvs repositories.

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Many thanks for the hard work. These changes have been spread upstream and are already available in the git and cvs repositories. Ciao
            Hide
            Tim Hunt added a comment -

            Thanks for the new issue. That problem is indeed a separate problem to this one, so it was correct to close this one fixed.

            Show
            Tim Hunt added a comment - Thanks for the new issue. That problem is indeed a separate problem to this one, so it was correct to close this one fixed.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: