Issue Details (XML | Word | Printable)

Key: MDL-17499
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: moodle.com
Reporter: Tim Hunt
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

Horrible hack in can_delete_course in course/lib.php

Created: 03/Dec/08 04:29 PM   Updated: 03/Dec/08 04:29 PM
Return to search
Component/s: Lib, Roles
Affects Version/s: 1.8.7, 1.9.3, 2.0
Fix Version/s: None

Participants: moodle.com and Tim Hunt
Security Level: None
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE


 Description  « Hide
This is all the fault of MDL-7796. That was supposed to be about restoring features that had gone away in the 1.7 roles upgrade. However, following this comment http://tracker.moodle.org/browse/MDL-7796?focusedCommentId=24645#action_24645, Vy implemented the new feature that course creators can delete 'their own' courses in the only way possible, via a nasty hack, since there is no way of knowing who created which course.

I have checked and this was not the case in Moodle 1.6. Before roles, deleting courses was protected by a big fat isadmin() check.

I would really like to change back to just using has_capability('moodle/course:delete');

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
No changes have yet been made on this issue.