Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-8389 Calculated question: user interface when creating or editing a question
  3. MDL-8432

The checking that there is at least one dataset item to allow back to quiz when editing calculated question is not working properly

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8
    • None
    • Questions
    • None
    • MOODLE_18_STABLE

    Description

      In datasetitems_form.php there is a validation so back to quiz is not allowed if there is no items
      function validation($data){
      $errors = array();
      if (isset($data['backtoquiz']) && ($this->noofitems===0))

      { $errors['addbutton'] = get_string('youmustaddatleastoneitem', 'qtype_datasetdependent'); }

      return $errors;
      }
      line 204 is written
      if (isset($data['backtoquiz']) && ($this->noofitems===0)){
      the test is not working properly with the identity === but works correctly with equal ==
      if (isset($data['backtoquiz']) && ($this->noofitems==0)){

      Attachments

        Activity

          People

            ppichet Pierre Pichet
            ppichet Pierre Pichet
            Safat Shahin, Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: