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

Restore ROLE_ASSIGNMENTS does not match backup ROLES_ASSIGNMENTS - extra S!

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.7.2, 1.8
    • Component/s: Backup
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE

      Description

      Patch to fix cvs:/backup/restorelib.php - function endElementUsers

      We were getting "Trying to get property of non-object" warnings here,
      " case "ROLE":
      //We've finalized a role, get it
      $this->info->tempuser->roles[$this->info->temprole->type] = $this->info->temprole;
      "
      It turned out that the backup produces elements ROLES_ASSIGNMENTS, ROLES_OVERRIDES - extra S on 'role' not matching the DB schema. Restorelib meanwhile has both ROLE_ASSIGNMENTS and ROLES_ASSIGMENTS etc.!! The patch makes restore match backup.
      Cheers Nick

      (OU Bugzilla Bug 2532)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                30/Mar/07