XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Major Major
    • 1.9.5, 2.0
    • 1.9
    • Gradebook
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE

      I know that I am starting to be what my students call a PITA on the gradebook issues. But like many of my previous reports, I am not coming to you as a programmer, but as a teacher who uses Moodle all day long and also codes. And I must tell you that in our world, grades can go over 100% or what was set for the maximum grade. This was workable with previous versions (we long ago allowed teachers to enter any decimal grade into 1.6 assignments and the gradebook worked.). Now there are a bunch of checks in 1.9, so here is how I patched it to get back to how it is done. A more permanent solution for core is to set a maximum override factor, and to use a style in the grader reports to highlight activities that go over 100%.

      For our purposes, I let grades be up to 200% of the maximum grade.

      Here is how to change 1.9 to allow grades to go up to 200% of the maximum grade:

      /lib/grade/grade_category.php
      change
      grade->finalgrade = (float)bounded_number($this->grade_item->grademin, $finalgrade, $this->grade_item->grademax);
      to
      grade->finalgrade = (float)bounded_number($this->grade_item->grademin, $finalgrade, $this->grade_item->grademax*2);

      /lib/grade/grade_item.php
      change
      $grade->finalgrade = (float)bounded_number($this->grademin, $finalgrade, $this->grademax);
      to
      $grade->finalgrade = (float)bounded_number($this->grademin, $finalgrade, $this->grademax*2);

      /lib/gradelib.php
      change
      $value = bounded_number($min, $value, $max);
      to
      $value = bounded_number($min, $value, $max *2);

      /lib/grade/grade_item.php
      change
      $result = bounded_number($this->grademin, $result, $this->grademax
      to
      $result = bounded_number($this->grademin, $result, $this->grademax*2);

      /lib/grade/grade_grade.php function
      change
      $finalgrade = bounded_number($grade_items[$do]>grademin, $finalgrade, $grade_items[$do]>grademax);
      to
      $finalgrade = bounded_number($grade_items[$do]>grademin, $finalgrade, $grade_items[$do]>grademax*2);

      /lib/grade/grade_category.php
      change
      $grade->finalgrade = (float)bounded_number($this->grade_item->grademin, $sum, $this->grade_item->grademax);
      to
      $grade->finalgrade = (float)bounded_number($this->grade_item->grademin, $sum, $this->grade_item->grademax*2);

      /lib/grade/grade_item.php
      change
      return bounded_number($this->grademin, $rawgrade, $this->grademax);
      to
      return bounded_number($this->grademin, $rawgrade, $this->grademax*2);

      --Gary
      Gary Anderson
      Math Department Chair
      Seattle Academy

            Votes:
            14 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.