Moodle

No role assigned after restoring into existing course when erasing old data

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.8
  • Fix Version/s: 1.7.2, 1.8, 1.9
  • Component/s: Backup
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

Description

I am not sure about this one, it might be a problem with capability reloading after deleting of old role assignments.

To replicate (did not test it now, just what I remember from testing creator role):
1/ backup course
2/ restore into existing course - overriding data
3/ no roles assigned at all - though there is a test that should assign legacy editing teacher

My +1 to remember the old role of the user that is restoring the course and reassign it if he/she does not have role assign capability in restored course. I would not use the $CFG->creatornewroleid for this case.

Activity

Hide
Yu Zhang added a comment -

This is a duplicate of MDL-9016 which should be fixed =)

Show
Yu Zhang added a comment - This is a duplicate of MDL-9016 which should be fixed =)
Hide
A. T. Wyatt added a comment -

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. (also reported for MDL-6831)

Show
A. T. Wyatt added a comment - 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. (also reported for MDL-6831)
Hide
A. T. Wyatt added a comment - - edited

Additional info:
When, as admin, I deleted the new copy of the editing teacher role, it was reported that 0 users were assigned to this role. Then, my instructor account was automatically returned to the editingteacher role in the restored course and became visible again in the participants list.

I think this might be reopened. . .

Show
A. T. Wyatt added a comment - - edited Additional info: When, as admin, I deleted the new copy of the editing teacher role, it was reported that 0 users were assigned to this role. Then, my instructor account was automatically returned to the editingteacher role in the restored course and became visible again in the participants list. I think this might be reopened. . .

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: