From: pichetp Date: Sun, 24 May 2009 02:02:31 +0000 (+0000) Subject: MDL-19210 using the get_database_dataset_items() function X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=66d0a55c56c52b10bc0838a3cd1d7a0f3355a3e0;p=moodle.git MDL-19210 using the get_database_dataset_items() function --- diff --git a/question/type/calculated/datasetitems_form.php b/question/type/calculated/datasetitems_form.php index 1fc61eae6e..84e65c4abc 100644 --- a/question/type/calculated/datasetitems_form.php +++ b/question/type/calculated/datasetitems_form.php @@ -55,10 +55,7 @@ class question_dataset_dependent_items_form extends moodleform { } foreach ($this->datasetdefs as $defid => $datasetdef) { if (isset($datasetdef->id)) { - $this->datasetdefs[$defid]->items = $DB->get_records_sql( // Use number as key!! - " SELECT itemnumber, definition, id, value - FROM {question_dataset_items} - WHERE definition = ? ", array($datasetdef->id)); + $this->datasetdefs[$defid]->items = $this->qtypeobj->get_database_dataset_items($datasetdef->id); } } parent::moodleform($submiturl);