Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-18353

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.9
    • Fix Version/s: None
    • Component/s: Gradebook, Usability
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              chuang Wen Hao Chuang
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Barbara Ramiro, Bas Brands
              Votes:
              8 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated: