Customizing Backup code

Customizing Backup code

by Ângelo Rigo -
Number of replies: 10
Hi

I need customize the backup options so we prevent from users from creating a backup with user data

I search in the capabilities but just found moodle/site:backup and restore

I
try to erase from the code the backup_user_info_ checkbox fields and just display the option NO in the select box for users.

It still does not work because still the second backup page shows that users are coming in the backup.

How can i prevent user from getting users and user files in the backup ?

I am using moodle 1.8.2.

Thank´s in advance.
Average of ratings: -
In reply to Ângelo Rigo

Re: Customizing Backup code

by Ângelo Rigo -
this atached picture shows what i need to prevent
Attachment nousers2.gif
In reply to Ângelo Rigo

Re: Customizing Backup code

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I think you need to edit backup/backup_form.html, around line 215 (I am looking at the Moodle 1.9 code) where it outputs the menubackup_users form field. Just change this to output a hidden form field instead. The other options you want to remove will be elsewhere in this file.
In reply to Tim Hunt

Re: Customizing Backup code

by Ângelo Rigo -
Thank´s Tim Hunt

I am trying also where i found the backup_user_info_*** checkboxes
In reply to Tim Hunt

Re: Customizing Backup code

by Tammy Belgarde -
I have an unusual request. I need to change the backup so that the student has the ability to backup their course work. They are the only student in the course. This is what I would like to do. Please let me know if it is workable and if you could give me some direction.
  • I will take away the ability to do course backups.
  • The student is given backup abilities under permissions.
  • The student will see only the option to do user backups.
Your assistance is appreciated and needed.

Thank you.
In reply to Tammy Belgarde

Re: Customizing Backup code

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
  1. Go into that particular course while logged in as administrator.
  2. Click on the Assign roles link in the Administration block.
  3. Click on the Override permissions tab.
  4. Click on 'Student'
  5. Find the row for the course backup capability, whatever it is called.
  6. Set that to allow.
  7. Save changes.
Students should then be able to backup that one course, but no others.
In reply to Tim Hunt

Re: Customizing Backup code

by Michael Penney -
Without the code modification you mentioned above, seems like this would let the student get all the other users on the site (including the user files)?

In reply to Michael Penney

Re: Customizing Backup code

by Tammy Belgarde -
This is for a laptop Moodle system. There will only be one user in the system. We are using Bitnami.
In reply to Tim Hunt

Re: Customizing Backup code

by Andy Braden -
This will work with the addition of having to override the Manage files capability as well, otherwise the student will have the ability to make the backup but not to get the file.

Two cautions:
1) As noted above in standard Moodle 1.9 this means that the student will be able to backup, in full detail, all users on the site and the user details will be essentially plain readable in the XML mainfest in the backup.

2) Adding the override for Manage files means that they can access all files in the course. Now in the Standard Moodle 1.9 scenario they would be able to add them all to the backup of the course anyway, but if you do go down the path of editing the form html for backup to block the files from being added to the backup, they can still access the all the files when they access the backup file.