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

Rubric level validator should check empty string explicitely

    XMLWordPrintable

    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
      }

        Attachments

          Activity

            People

            Assignee:
            marina Marina Glancy
            Reporter:
            mudrd8mz David Mudrák (@mudrd8mz)
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: