Non-core contributed modules

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.2
  • Fix Version/s: None
  • Component/s: Patch: Gradebook Plus
  • Labels:
    None
  • Environment:
    n/a
  • Affected Branches:
    MOODLE_18_STABLE

Description

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

Activity

Hide
John added a comment -

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.

Show
John added a comment - 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.
Hide
Chris Ament added a comment -

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.

Show
Chris Ament added a comment - 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.
Hide
Anthony Borrow added a comment -

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

Show
Anthony Borrow added a comment - 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
Hide
JD added a comment -

To confirm: I replaced all 'getElementById' with 'document.getElementById' in moodle\grade\exceptions.html on our 1.8.2 server.
Worked great. Thanks - JD

Show
JD added a comment - To confirm: I replaced all 'getElementById' with 'document.getElementById' in moodle\grade\exceptions.html on our 1.8.2 server. Worked great. Thanks - JD
Hide
Anthony Borrow added a comment -

Closing all of my resolved issues. Peace - Anthony

Show
Anthony Borrow added a comment - Closing all of my resolved issues. Peace - Anthony

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: