Issue Details (XML | Word | Printable)

Key: MDL-20200
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Nobody
Reporter: Antonio Piedras Morente
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

Role unassignself not all implemented

Created: 02/Sep/09 03:28 PM   Updated: 02/Sep/09 03:28 PM
Component/s: Enrolments
Affects Version/s: 1.9.5
Fix Version/s: None

Environment: 1.9.5 moodle with a 8.2.4 postgres installed in a SUSE Linux Enterprise Server 10 SP1

Database: PostgreSQL
Participants: Antonio Piedras Morente and Nobody
Security Level: None
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
If in the definition rol the admin make that teacher can't unenrol self from course, the "Unenrol me from...." link is not displayed, but the teacher can unenrol self using Assign roles module, and pressing "Remove" button.
For avoid this should modify the script:
moodle/admin/roles/assign.php

line: 230
where the code says this:
if ($topleveladmin && ($removeuser == $USER->id)) { // Prevent unassigning oneself from being admin continue; }
by this:
if (($topleveladmin && ($removeuser == $USER->id)) ||
(($removeuser == $USER->id) && !has_capability('moodle/role:unassignself', $context, $removeuser, false))
) { // Prevent unassigning oneself from being admin continue; } }

Cheers



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.