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

Completion system should not restore completion data for users who are excluded from restore

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Backup
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      If you backup a course with a lot of users, but you choose to include only the 'teacher' role assignments, then you restore it, the system restores completion data for all users - even though the ex-students cannot even access the course. This mostly doesn't do any harm but causes problems here under specific conditions, and is anyway a bit unnecessary, so I decided to make it exclude from the restored data any users who do not have access to view the course after restore.

      (note: I originally wanted to exclude them from backup, however this proved very difficult because there is no way to do something like get_users_by_capability_assuming_that_they_don't_have_these_specific_roles_on_this_context_that_we_aren't_backing_up.)

        Attachments

          Activity

            People

            • Assignee:
              quen Sam Marshall
              Reporter:
              quen Sam Marshall
              Participants:
              Component watchers:
              Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10