Moodle

Can't set grademax, grademin and gradepass to zero while editing a grade category

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.5
  • Fix Version/s: 1.9.6, 2.0
  • Component/s: Accessibility, Gradebook
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE

Description

There is a problem with some validation of item fields on grade category editing, because the php function "empty($var)" return true if we have the string "0". This patch corrects this problem, adding an extra test, "AND $var != '0'".
This patch also affects the way grademin and grademax are validated, correcting the behaviour in the scenario that both values are zero.

Activity

Hide
Nicolas Connault added a comment -

Thanks for the report and the solution, Daniel!

Show
Nicolas Connault added a comment - Thanks for the report and the solution, Daniel!
Hide
Andrew Davis added a comment -

closing

Show
Andrew Davis added a comment - closing

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: