Moodle

If you create a graded activity and later changed it to a non-graded activity (no grade), this activity still appears as an item in the gradebook

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.9
  • Fix Version/s: 2.0.10
  • Component/s: Gradebook, Usability
  • Labels:
    None
  • Database:
    Any
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

Because of the current architecture of the gradebook, whenever a graded activity is created and then changed to a non-graded activity, it still appears as an item in the gradebook.

We changed the gradebook to ignore activities that are "not graded." If data was entered for a graded activity and then the activity is modified to "no grade", then the data will be retained should the activity switch back to a graded activity, but the item will not be displayed in the gradebook. Please see the attached diff file for more details.

Basically it changed the:

$items = get_records('grade_items', 'courseid', $this->courseid);

to

$items = get_records_select('grade_items', "courseid = $this->courseid AND gradetype <> 0");

I also tested with the latest 1.9.4+ codes (build 20090223), still behave the same. So I'm sure that this problem also exist in all major 1.9.x builds right now. Not sure if this is something that we should maintain in our own customization or people would be interested to see this in the core. The fixed behavior would make better sense though, IMHO.

Would love to hear some comments about this fix, and if Martin OK'ed with it I could go ahead to commit it into MOODLE19_STABLE and HEAD

Issue Links

Activity

Hide
Gary Anderson added a comment -

Wen:

I agree with you that items that have no grade should not be in the gradebook and we have also patched it locally.

When we reported the problem, the fix was to allow for removal, but I would agree that this manual maintenance should not be needed.

--Gary

Show
Gary Anderson added a comment - Wen: I agree with you that items that have no grade should not be in the gradebook and we have also patched it locally. When we reported the problem, the fix was to allow for removal, but I would agree that this manual maintenance should not be needed. --Gary
Hide
Petr Škoda (skodak) added a comment -

yes, this is intentional and will be fixed once we rewrite the module-gradebook integration in 2.0

Show
Petr Škoda (skodak) added a comment - yes, this is intentional and will be fixed once we rewrite the module-gradebook integration in 2.0

People

Vote (7)
Watch (6)

Dates

  • Created:
    Updated: