From fa0f94c085dab31d499173ccfc61676d31de7cfa Mon Sep 17 00:00:00 2001 From: pichetp Date: Wed, 13 Feb 2008 02:19:54 +0000 Subject: [PATCH] MDL-12421 removing the change done and not correcting already saved values --- question/type/datasetdependent/abstractqtype.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/question/type/datasetdependent/abstractqtype.php b/question/type/datasetdependent/abstractqtype.php index c20daf72ac..54edd15fc0 100644 --- a/question/type/datasetdependent/abstractqtype.php +++ b/question/type/datasetdependent/abstractqtype.php @@ -623,10 +623,9 @@ class question_dataset_dependent_questiontype extends default_questiontype { // Select a dataset in the following format: // An array indexed by the variable names (d.name) pointing to the value // to be substituted - //the value is rounded following the decimals setting global $CFG; if (!$dataset = get_records_sql( - "SELECT d.name, i.value, d.options + "SELECT d.name, i.value FROM {$CFG->prefix}question_dataset_definitions d, {$CFG->prefix}question_dataset_items i, {$CFG->prefix}question_datasets q @@ -638,14 +637,6 @@ class question_dataset_dependent_questiontype extends default_questiontype { "question! (question: {$question->id}, " . "datasetitem: {$datasetitem})"); } - foreach($dataset as $dset ){ - list($distribution, $min, $max,$dec) = explode(':', $dset->options, 4); - if ($dec == "") { - $dec = 0 ; - } - unset($dset->options); - } - $dset->value = sprintf("%.".$dec."f",$dset->value); array_walk($dataset, create_function('&$val', '$val = $val->value;')); return $dataset; } -- 2.39.5