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

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

      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)){

            ppichet Pierre Pichet (Inactive)
            ppichet Pierre Pichet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.