Moodle

Exclude not working in gradebook 1.8.2

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.2
  • Fix Version/s: 1.8.3
  • Component/s: Gradebook
  • Labels:
    None
  • Environment:
    all--testing on WIMP and LAMP. Same behavior
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

This was filed in the contrib area as
http://tracker.moodle.org/browse/CONTRIB-71

However, upon further testing, this doesn't seem to be working in any of my moodle instances. Therefore, I believe the problem is in core.

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.

No matter which assignment I select, the exclusion is reported to the first assignment in the list.

Issue Links

Activity

Hide
A. T. Wyatt added a comment -

moodle 2007021520

Show
A. T. Wyatt added a comment - moodle 2007021520
Hide
Steve Hannah added a comment - - edited

We have been able to replicate this issue in several courses on 1.8.2. It appears that Exceptions can only be created for the first Grade Item, even if a different Grade Item is selected. In one course, we can create an exclusion for all students for the first Grade Item, in another course we can only create an exclusion for the first student for the first Grade Item.

Show
Steve Hannah added a comment - - edited We have been able to replicate this issue in several courses on 1.8.2. It appears that Exceptions can only be created for the first Grade Item, even if a different Grade Item is selected. In one course, we can create an exclusion for all students for the first Grade Item, in another course we can only create an exclusion for the first student for the first Grade Item.
Hide
David DeLauro added a comment -

It appears to be an issue with the javascript or at least that might be a good place to start. I get an error of an undefined variable grade_item in the updateMembers function just loading the page. If I try to highlight an assignment I get an error of getElementById being undefined.

grade_item undefined is not defined
http://moodle.saintjoe.edu/moodle/grade/exceptions.php?id=176&action=excepts
eval('grade_item=grade_item'+selectgrade_item.value);
Line 149

getElementById is not defined
http://moodle.saintjoe.edu/moodle/grade/exceptions.php?id=176&action=excepts
getElementById('form3')['members[]'].length = username.length;
Line 154

Show
David DeLauro added a comment - It appears to be an issue with the javascript or at least that might be a good place to start. I get an error of an undefined variable grade_item in the updateMembers function just loading the page. If I try to highlight an assignment I get an error of getElementById being undefined. grade_item undefined is not defined http://moodle.saintjoe.edu/moodle/grade/exceptions.php?id=176&action=excepts eval('grade_item=grade_item'+selectgrade_item.value); Line 149 getElementById is not defined http://moodle.saintjoe.edu/moodle/grade/exceptions.php?id=176&action=excepts getElementById('form3')['members[]'].length = username.length; Line 154
Hide
Anthony Borrow added a comment -

The discussion at: http://moodle.org/mod/forum/discuss.php?d=71428 may be helpful.

Show
Anthony Borrow added a comment - The discussion at: http://moodle.org/mod/forum/discuss.php?d=71428 may be helpful.
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
Yu Zhang added a comment -

Thanks guys, changed all instances of getElementById to document.getElementById() as suggest. Please let me know if this can be closed. Thanks.

Show
Yu Zhang added a comment - Thanks guys, changed all instances of getElementById to document.getElementById() as suggest. Please let me know if this can be closed. Thanks.
Hide
Kenneth Newquist added a comment -

This fix worked for me; I think this can be closed and added to core.

Show
Kenneth Newquist added a comment - This fix worked for me; I think this can be closed and added to core.
Hide
Steve Hannah added a comment -

We have not had any problems with Exclude from Grading since this fix. I believe it can be closed.

Show
Steve Hannah added a comment - We have not had any problems with Exclude from Grading since this fix. I believe it can be closed.
Hide
Yu Zhang added a comment -

Thanks guys, closing.

Show
Yu Zhang added a comment - Thanks guys, closing.

People

Vote (8)
Watch (7)

Dates

  • Created:
    Updated:
    Resolved: