Badges Backup Requires "Include Enrolled Users"?

Badges Backup Requires "Include Enrolled Users"?

by Joshua Bragg -
Number of replies: 3

During Backup and Restore, why is it required to select "Include Enrolled Users"?  Is there some reason that I'm missing on this?

To start my new semester's classes, I typically restore a new copy of the course without enrolled users.  Am I stuck with changing my procedure to a backup with users and then a course reset to clear them?

Average of ratings: -
In reply to Joshua Bragg

Re: Badges Backup Requires "Include Enrolled Users"?

by Yuliya Bozhko -

Hi Joshua,

There are several reasons for that. First of all some badge criteria can include roles. Backup is designed the way that doesn't allow backing up/restoring roles without backing up users. Another reason is that we cannot backup/restore issued badges as that would involve baking badge images during restore which can be time/resource consuming. So, after badges are restored, all issued ones can be issued again to all the users who previously had them on the next cron run.

Maybe there can be some kind of an additional setting that would allow to specify not to restore user badges. That would remove one of the constraints. But I am still not sure what to do with roles that depend on enrolled users...

Please let me know if you have any suggestions or further questions. There is always room for improvements ;)

Yuliya

Average of ratings: Useful (1)
In reply to Yuliya Bozhko

Re: Badges Backup Requires "Include Enrolled Users"?

by Joshua Bragg -

Not restoring user's badges seems like a great place to start.  I don't have any idea why someone would think that would work without user data involved.

I'm not sure why having role requirements in the badge definition would limit backups.  I assume you're talking about badges that must be awarded by a particular role (say a teacher).  Why would that be tied to specific users?  Isn't that a role based rather than user based?

I'm starting a new semester right now and facing the music of having to recreate about 15 badges from my prior class.  Its not a huge number but it will be a significant chunk of my time.

In reply to Joshua Bragg

Re: Badges Backup Requires "Include Enrolled Users"?

by Yuliya Bozhko -

Roles depending on users is not something done by badges functionality, this is how Moodle course backup works. I am just using it. You cannot backup a role without backing up users.

Also, initially, there was no plan of restoring issued badges, but this came up in code review that there should be a way of restoring issued badges as well. This is the only way I can do that.

I could think about an additional option not to restore issued badges when backing up course, but I can't do anything with the role backup issue. I will still require to have enrolled users backup.

Yuliya