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

Can't edit grade item if grade_report_showmin is false and item has grades

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.2, 3.1.3
    • Fix Version/s: 3.1.4, 3.2.1
    • Component/s: Gradebook
    • Labels:
    • Testing Instructions:
      Hide
      1. Under Site administration -> Grades -> General Settings, uncheck "Show minimum grade".
      2. In a class with students, create an assignment.
      3. Enter grades for at least one student.
      4. Go to grades, then Setup -> Gradebook setup.
      5. Under edit for the assignment, pick Edit settings.
      6. Change the value for extra credit, i.e., check or uncheck.
      7. Save changes.
      8. Go back to edit grade item for that assignment and make sure changes happened.
      9. Repeat the above test with 'show minimum grade' set to true. Confirm no errors.
      Show
      Under Site administration -> Grades -> General Settings, uncheck "Show minimum grade". In a class with students, create an assignment. Enter grades for at least one student. Go to grades, then Setup -> Gradebook setup. Under edit for the assignment, pick Edit settings. Change the value for extra credit, i.e., check or uncheck. Save changes. Go back to edit grade item for that assignment and make sure changes happened. Repeat the above test with 'show minimum grade' set to true. Confirm no errors.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-56893-MOODLE_master-edit-grade-item-bug

      Description

      If in admin settings "Grades -> General Settings" grade_report_showmin is false and a grade item has grades, you can't edit the grade item. For example, you can't change whether it is extra credit or the grade items offset.

      In /grade/edit/tree/item_form.php line 466 it checks $data['grademin'], which doesn't exist if grade_report_showmin is false, to see if it matches $grade_item->grademin and throws an error.

        Attachments

          Activity

            People

            Assignee:
            mspall Michael Spall
            Reporter:
            mspall Michael Spall
            Peer reviewer:
            Jake Dallimore
            Integrator:
            Andrew Nicols
            Tester:
            Adrian Greeve
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            8 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Jan/17