Issue Details (XML | Word | Printable)

Key: MDL-17501
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Tim Hunt
Reporter: Tim Hunt
Votes: 0
Watchers: 1
Operations

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

moodle/course:visibility capability ignored on the course settings page

Created: 03/Dec/08 05:24 PM   Updated: 09/Dec/08 01:49 PM
Return to search
Component/s: Roles
Affects Version/s: 1.9.3
Fix Version/s: 1.9.4

Participants: Petr Skoda and Tim Hunt
Security Level: None
Resolved date: 09/Dec/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
Need to:

Give that capability to teachers by default.
Add the capability check in the settings form.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
tjhunt committed 4 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 08/Dec/08 11:30 AM
course settings: MDL-17501 check for moodle/course:visibility in the course settings form.

1. If a user does not have that capability, don't let them change whether the course is visible.
2. Give teachers that capability by default.
3. To avoid regressions, on upgrade, give moodle/course:visibility to any role that has moodle/course:update.
MODIFY version.php   Rev. 1.563.2.337    (+1 -1 lines)
MODIFY lib/db/access.php   Rev. 1.75.2.16    (+2 -1 lines)
MODIFY course/edit_form.php   Rev. 1.37.2.15    (+5 -1 lines)
MODIFY lib/db/upgrade.php   Rev. 1.154.2.43    (+20 -1 lines)
tjhunt committed 4 files to 'Moodle CVS' - 08/Dec/08 11:31 AM
course settings: MDL-17501 check for moodle/course:visibility in the course settings form.

1. If a user does not have that capability, don't let them change whether the course is visible.
2. Give teachers that capability by default.
3. To avoid regressions, on upgrade, give moodle/course:visibility to any role that has moodle/course:update.
MODIFY lib/db/upgrade.php   Rev. 1.253    (+20 -2 lines)
MODIFY lib/db/access.php   Rev. 1.97    (+2 -1 lines)
MODIFY version.php   Rev. 1.911    (+1 -1 lines)
MODIFY course/edit_form.php   Rev. 1.63    (+5 -1 lines)
Tim Hunt made changes - 08/Dec/08 11:33 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Petr Skoda added a comment - 09/Dec/08 05:10 AM
if ($result && $oldversion < 2007101532.10) {

I think it should verify that roles are already configured
if (!empty($CFG->rolesactive)) {
becasue it might fail when upgrading from 1.6.x, right?


Petr Skoda made changes - 09/Dec/08 05:10 AM
Status Resolved [ 5 ] Reopened [ 4 ]
Resolution Fixed [ 1 ]
tjhunt committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 09/Dec/08 01:49 PM
course settings: MDL-17501 fix potential problem for people upgrading 1.6 -> 1.9.4.

I am amazed that Petr spotted this. Great catch.
MODIFY lib/db/upgrade.php   Rev. 1.154.2.44    (+14 -12 lines)
Tim Hunt added a comment - 09/Dec/08 01:49 PM
Wow! Well noticed Petr.

Tim Hunt made changes - 09/Dec/08 01:49 PM
Status Reopened [ 4 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]