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

Rubric level validator should check empty string explicitely

    Details

    • Testing Instructions:
      Hide

      Try to define a rubric with level set to
      a) the character "0" (zero) - should pass the validation check
      b) the character " " (space) - should not pass the validation check

      Show
      Try to define a rubric with level set to a) the character "0" (zero) - should pass the validation check b) the character " " (space) - should not pass the validation check
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      When defining the rubric, it is impossible to define the level as "0". Apparently the function empty() is used to validate the level. It should check something like

      $definition = trim($definition);
      if ($definition === '') {
          // fail validation
      }

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            marina Marina Glancy added a comment -

            Thanks for pointing this David, issue was fixed before rubric was integrated into master

            Show
            marina Marina Glancy added a comment - Thanks for pointing this David, issue was fixed before rubric was integrated into master

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: