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

Restoring a course with users will not preserve the time their roles were assigned

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.7, 1.8
    • 1.7.3, 1.8.3, 1.9
    • Backup, Roles / Access
    • None
    • MOODLE_17_STABLE, MOODLE_18_STABLE
    • MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

    Description

      When restoring a course from a backup, the API call role_assign() (/lib/accesslib.php) is called from the restore_write_roleassignments() (/backup/restorelib.php) function. The problem here is that the 'timemodified' field is always set to the current time. This means that you will never know how long students have been enrolled in a course for as their erolment (role assignment) timestamp is always the time that the restore was executed.

      If a new argument to the role_assign() function is added (something like ", $timemodified = 0") this value can be overridden when restoring a backup, otherwise the default action (taking the value from PHP's time() function) can be performed.

      Attachments

        Activity

          People

            lazyfish Yu Zhang
            jfilip Justin Filip
            Nobody Nobody
            Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Oct/07