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

Calculated question should handle more than one unit with a value of 1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.3.2
    • Fix Version/s: None
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      in calculated/questiontype.php line 1049
      // Find a default unit:
      if (!empty($questionid) && $unit = $DB->get_record('question_numerical_units',
      array('question' => $questionid, 'multiplier' => 1.0)))

      { $unit = $unit->unit; }

      else

      { $unit = ''; }

      should be corrected to handle the more than one record with a multiplier value == 1,0.
      see http://moodle.org/mod/forum/discuss.php?d=211619

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                timhunt Tim Hunt
                Reporter:
                ppichet Pierre Pichet
                Participants:
                Component watchers:
                Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: