-
Bug
-
Resolution: Fixed
-
Minor
-
2.2.1, 2.6.1, 3.3.3, 3.4
-
MOODLE_22_STABLE, MOODLE_26_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
-
MOODLE_33_STABLE, MOODLE_34_STABLE
-
MDL-31521-master -
Allow me to rephrase the full steps to reproduce.
- Go to a course.
- Open question bank import and do "Import questions from file" taking the attached file "questions-Physics-Default for zzz-20120206-1453.xml" in file formet "Moodle XML format".
- Stay in question bank but go to questions.
- Select category "Default for zzz".
- Edit the question "zzz Force of two 1 kg masses..." (clicking on the gear).
- At the bottom of the following page, click "Save changes".
- In the next page, leave "Synchronise the data from shared datasets with other questions in a quiz" to "Do not synchronise", click "Next page".
What you expect:
- You're going to continue to edit the question.
What actually happens:
- Error: mdb->get_record() found more than one record! errors are shown.
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.
- is duplicated by
-
MDL-35496 Calculated question should handle more than one unit with a value of 1
- Closed