Issue Details (XML | Word | Printable)

Key: MDL-16431
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Petr Skoda
Reporter: Kenneth Newquist
Votes: 5
Watchers: 5
Operations

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

Custom scales displaying instead of site-wide scales when creating "Grade Items" in 1.9

Created: 10/Sep/08 04:01 AM   Updated: 03/Jun/09 05:08 PM
Return to search
Component/s: Gradebook
Affects Version/s: 1.9.2
Fix Version/s: 1.9.5

Environment: Moodle 1.9.2

Participants: Kenneth Newquist, Paul Grzesina, Petr Skoda, Sam Hemelryk and Steven Breiner
Security Level: None
QA Assignee: Sam Hemelryk
Resolved date: 10/May/09
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
By default, individual course scales should not be accessible to other users on the site unless they've been designated a site-wide "standard" scale, which is something only admins can do.

However, we've discovered that if you create a Grade Item (via Grades > Choose an Action > Categories & Items > Add Grade Item) and click on the "Scale" drop down menu, you see all the custom scales available on the site.

The steps to recreate are:

1) Create a custom scale for Course A as Teacher A
2) Assign that scale to a grade item in Course A.
3) Create a grade item in Course B as Teacher B
4) Add a grade item, and look at the scale menu; if the bug is there, then you'll be able to see the custom scale that should have been limited to to just Course A.

In looking through the code, I discovered the problem lies on line 60:

if ($scales = get_records('scale')) {

This query returns *every* scale in Moodle, both custom and site-wide, rather than just those for the course.



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda made changes - 10/May/09 04:29 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 1.9.5 [ 10320 ]
Resolution Fixed [ 1 ]
Sam Hemelryk made changes - 03/Jun/09 05:08 PM
Status Resolved [ 5 ] Closed [ 6 ]
QA Assignee samhemelryk