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

Calculated questions should allow more than one unit with multiplier equal to 1

    Details

    • Type: Bug
    • Status: Development in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.2.1, 2.6.1
    • Fix Version/s: STABLE backlog
    • Component/s: Questions
    • Labels:
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_26_STABLE

      Description

      See http://moodle.org/mod/forum/discuss.php?d=195449
      the
      public function comment_on_datasetitems($qtypeobj, $questionid, $questiontext,
      $answers, $data, $number) {
      global $DB;
      $comment = new stdClass();
      $comment->stranswers = array();
      $comment->outsidelimit = false;
      $comment->answers = array();
      // Find a default unit:
      if (!empty($questionid) && $unit = $DB->get_record('question_numerical_units',
      array('question' => $questionid, 'multiplier' => 1.0))) {
      $unit = $unit->unit;
      should use another $DB function call to allow for more than one record.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  2 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated: