Issue Details (XML | Word | Printable)

Key: CONTRIB-71
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Anthony Borrow
Reporter: A. T. Wyatt
Votes: 1
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Non-core contributed modules

Cannot exclude grades from any but first assignment; cannot exclude from multiple assignments

Created: 10/Aug/07 10:44 PM   Updated: 04/Dec/07 03:44 AM
Component/s: Patch: Gradebook Plus
Affects Version/s: 1.8.2
Fix Version/s: None

File Attachments: 1. HTML File exceptions.html (7 kB)

Environment: n/a

Participants: A. T. Wyatt, Anthony Borrow, Chris Ament, JD and John
Security Level: None
QA Assignee: A. T. Wyatt
Resolved date: 14/Sep/07
Affected Branches: MOODLE_18_STABLE


 Description  « Hide
Problem with grade exceptions, Moodle 1.8.2 GBv2

I am using the patch uploaded around July 23, 2007 on this system (1.8.1 system)

I have a class with 5 students and 44 assignments.

First problem:

when I go to the grade exceptions screen, I
select a student who is third in the list
select the third assignment in the list
click "exclude from grading" and the third student is excluded from the first assignment in the list.

Second problem:
when I exclude a student from a single assignment (which works only when it is the FIRST assignment!), I can't get the screen to refresh so that I can exclude students from a different assignment. Even if I click on a different tab and come back, I can not start excluding for a second assignment.

Big trouble!

Related discussion:
http://moodle.org/mod/forum/discuss.php?d=71428

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
John added a comment - 11/Aug/07 11:51 AM
I believe I may have fixed it. I'd like for other testers please. In exceptions.html, I changed the javascript code for these functions. It may not be the best way to reference the controls on the page, but it works. The page does not like the getElementById references. I have left a couple in comments so you can see what I mean:

function updategrade_item() {
// getElementById('form1').grade_itemid.value = getElementById('form2').grade_items.value;
document.forms[0].elements[1].value = document.forms[1].elements[3].value;

// getElementById('form3').grade_itemid.value = getElementById('form2').grade_items.value;
document.forms[2].elements[1].value = document.forms[1].elements[3].value;
}

function updateMembers(selectgrade_item) {
eval('grade_item=grade_item'+selectgrade_item.value);

username = grade_item.username;
userid = grade_item.userid;

document.forms[2].elements[4].length = username.length;

for (i=0;i<username.length;i++) { document.forms[2].elements[4].options[i].value = userid[i]; document.forms[2].elements[4].options[i].text = username[i]; }

eval('grade_item_inc=grade_item_inc'+selectgrade_item.value);

username = grade_item_inc.username;
userid = grade_item_inc.userid;

document.forms[0].elements[4].length = username.length;

for (i=0;i<username.length;i++) { document.forms[0].elements[4].options[i].value = userid[i]; document.forms[0].elements[4].options[i].text = username[i]; }

updategrade_item();
}

http://moodle.org/mod/forum/discuss.php?d=71428

I believe this is the same issue.


Chris Ament added a comment - 13/Sep/07 05:06 AM
getElementById is a method provided by the document object. The fix for this is trivial - add replace getElementById with document.getElementById. Attached file has this change applied and seems to work fine.

Anthony Borrow added a comment - 14/Sep/07 02:48 PM
I have added the document. prefix to fix the getElementById code and hopefully resolve this issue. I followed Yu's lead on this on MDL-10904. I've marked this as resolved; however, if someone could test this and make sure it is resolved before I close it I would appreciate it. If it is still problematic just let me know. Peace - Anthony

JD added a comment - 04/Dec/07 03:44 AM
To confirm: I replaced all 'getElementById' with 'document.getElementById' in moodle\grade\exceptions.html on our 1.8.2 server.
Worked great. Thanks - JD