"cannotfindassignablerole" warning when restoring backup without any user

"cannotfindassignablerole" warning when restoring backup without any user

by Susana L. -
Number of replies: 2



Hi,

We are experiencing the following problem when restoring courses:

Teachers are restoring course backups on moodle3.1 that were done automatically without users on moodle 2.7. Under certain circunstancies (that we couldn't figure out which yet) on the last step of the restore process it is displayed the warning "The role in the backup file cannot be mapped to any of the roles that you are allowed to assign." (4x) and 4 dropdown menus with "Empty" string. Pressing continue the restore proceeds and apparently there are no errors....

Facts: 

  • We always set teachers not allowed to assign any role on moodle;
  • The backups don't have any users nor users' information;
  • The warning setence is incomplete because it is missing "$role->name". Ex: "The [role->name] role in the backup file cannot..."

Why is this warning appearing to teachers? It seems not critical but... this interface does not make any sense. We are starting to restore more than 2000 courses and we get a bit worried when we find something behaving weird. Did anyone have this problem before?

Thank you!
susana

Average of ratings: -
In reply to Susana L.

Re: "cannotfindassignablerole" warning when restoring backup without any user

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Normally this happens when a role has been created in the site that the backup was made but does not exist on the site you are restoring too.  Despite the lack of users, Moodle will still restore roles.  It is not a big deal - should not mess anything up on the new site.  

Average of ratings: Useful (1)
In reply to Emma Richardson

Re: "cannotfindassignablerole" warning when restoring backup without any user

by Susana L. -

I confirm that we have roles in the site where the backup was made that were not created on the restore site. Thank you Emma!