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

The \core\event\course_restored event is triggered on any restore, not just courses.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.3, 2.7, 2.8
    • 2.6.4, 2.7.1
    • Events API
    • MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • MDL-45721_master
    • Hide
      Test 1
      1. Run the unit tests in course/tests/courselib_test.php.
      Test 2 (For 2.7 and master only!)

      The logging API which lists events in the log report was only introduced in 2.7. There was no original add_to_log call in the place of this event being fired, instead we were replacing an existing event which is not shown anywhere in Moodle. This is why these steps can not be applied to 2.6.

      1. Create a course.
      2. Open one tab on report/log/index.php and view the 'Site logs'.
      3. Create an activity.
      4. Duplicate this activity.
      5. View the report tab and ensure there is no 'Course restored' log.
      6. Backup and restore the course.
      7. View the report and ensure there is a 'Course restored' log entry under the restored course
      8. Restore course into the existing course
      9. View the report and ensure there is a 'Course restored' log entry under this course
      Show
      Test 1 Run the unit tests in course/tests/courselib_test.php. Test 2 (For 2.7 and master only!) The logging API which lists events in the log report was only introduced in 2.7. There was no original add_to_log call in the place of this event being fired, instead we were replacing an existing event which is not shown anywhere in Moodle. This is why these steps can not be applied to 2.6. Create a course. Open one tab on report/log/index.php and view the 'Site logs'. Create an activity. Duplicate this activity. View the report tab and ensure there is no 'Course restored' log. Backup and restore the course. View the report and ensure there is a 'Course restored' log entry under the restored course Restore course into the existing course View the report and ensure there is a 'Course restored' log entry under this course
    • 5
    • BACKEND Sprint 13

    Description

      1. Visit a course.
      2. Duplicate an activity.
      3. Notice there is a 'course restored' event.

      Attachments

        Issue Links

          Activity

            People

              markn Mark Nelson
              markn Mark Nelson
              Adrian Greeve Adrian Greeve
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Andrew Lyons Andrew Lyons
              David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Jul/14