Issue Details (XML | Word | Printable)

Key: MDL-6831
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Yu Zhang
Reporter: Eloy Lafuente (stronk7)
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

No "teachers" (or corresponding role) after restore...

Created: 05/Oct/06 01:51 AM   Updated: 23/Jul/07 09:59 AM
Component/s: Backup
Affects Version/s: 1.7
Fix Version/s: 1.7

Environment: Any

Database: Any
Participants: A. T. Wyatt, Eloy Lafuente (stronk7), Martin Dougiamas and Yu Zhang
Security Level: None
Resolved date: 10/Oct/06
Affected Branches: MOODLE_17_STABLE
Fixed Branches: MOODLE_17_STABLE


 Description  « Hide
Hi,

After fixing MDL-6084 (for 1.6.x) I've taken a look to the corresponding code under 1.7, just to see that the expected functionality is currently deleted, so, if the user restoring the course isn't in the restore file itself, he isn't able to handle the restored course! (originally this was MDL-2381 some months ago).

So I think that something like this must be provided:

If the user restoring the course isn't a global admin (able to edit any course, not sure if this is legacy:admin or legacy:teacher at site level...) ==> assign to him editing rights on course (legacy:teacher?), obviously ONLY if such user hasn't that role yet.

Else we'll have a lot of courses restored by people that, after restore, won't be able to edit it and that seems to be a wrong behaviour.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) added a comment - 06/Oct/06 06:23 AM
Ops, I forgot to assign this bug yesterday...

Martin Dougiamas added a comment - 10/Oct/06 10:06 AM
ie

if (and only if) they don't already have course:update on that new course then find a legacy:editingteacher role and assign that role to them in the course context.


Yu Zhang added a comment - 10/Oct/06 11:21 AM
Hi,

Fixed this in HEAD now. Users with restore capabilities but no manageactivities capability will be assigned a legacy:edittingteacher role upon successful restore of a course.


A. T. Wyatt added a comment - 21/Jul/07 03:37 AM
I just installed 1.8.2+ (2007021250). As an editing teacher (course:update is allow), I tried to restore a course, deleting it first.

At the bottom where roles are mapped, I did not have the option of keeping the teacher (to which role I already was assigned) = to editingteacher. What I had was to make the teacher = new role, non-editing teacher, student, or guest.

So I chose new role. This left me with instructor rights, but it created a copy of the editingteacher role in the admin area of define roles AND I no longer showed up as instructor in the participants list.

This doesn't seem quite right.


Yu Zhang added a comment - 23/Jul/07 09:59 AM
Hi A.T.

I think this is the case because users doing restore can only map users to roles that they themselves can assign, defined in the "Allow Role Assignment" interface (Users->Permissions->Define Roles->Allow role assignment (tab)). This is to prevent say a teacher mapping students etc to Admin role or so on. The default is a bit restrictive as it does not allow editing teachers to assign other editing teachers, but you can set it to allow them to do so.

Cheers,

Yu