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

Prevent course logs from being deleted when course is reset

XMLWordPrintable

    • MOODLE_24_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • MOODLE_27_STABLE
    • MDL-43274-master
    • Hide

      Test 2.7 and master

      1. In the administration block, select Site administration>Plugins>Logging>Manage log stores.
      2. Enable standard log, if it is not already
      3. Create a course with data
      4. Go to the course
      5. In the administration block, select Course administration>Reset
      6. Verify that no option to delete the course logs is available
      7. Reset the course with all options selected
      8. Go to Course administration>Reports>Logs
      9. Verify that all logs for that course are still present
      1. In the administration block, select Site administration>Plugins>Logging>Manage log stores.
      2. Disable standard log and enable legacy log
      3. Click settings on legacy log
      4. Tick "Log legacy data"
      5. Create another course with data
      6. Reset the course with all options selected
      7. View the PREFIX_log table
      8. Verify that all logs for that course are still present
      Show
      Test 2.7 and master In the administration block, select Site administration>Plugins>Logging>Manage log stores. Enable standard log, if it is not already Create a course with data Go to the course In the administration block, select Course administration>Reset Verify that no option to delete the course logs is available Reset the course with all options selected Go to Course administration>Reports>Logs Verify that all logs for that course are still present In the administration block, select Site administration>Plugins>Logging>Manage log stores. Disable standard log and enable legacy log Click settings on legacy log Tick "Log legacy data" Create another course with data Reset the course with all options selected View the PREFIX_log table Verify that all logs for that course are still present
    • 8
    • BACKEND Sprint 13

      We have a scenario:

      A number of course activities disappeared, and there are no logs at all in the class from before the 22nd November.

      where the most plausible explanation is that:

      The activites were deleted and (only) the course logs reset

      From my reading of the reset_course_userdata() function the logs from mdl_log are hard deleted, using the $DB->delete_records() function.

      This makes trying to answer what actually happened very difficult from a forensic position.

      It would be preferable if either the log table rows were treated by Moodle as being immutable or if the reset function did something else.

      This may be an issue specific to us since we have a centralised service and we have to be able to explain to our teachers what it is they may have done.

            johno John Okely
            mhughes2k Michael Hughes
            Petr Skoda Petr Skoda
            Marina Glancy Marina Glancy
            Frédéric Massart Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.