MDL-15358 negative data between () and MDL-14979 - Remove the obsolete quizfile.php

merge from 1.9 as this file is no more in HEAD
This commit is contained in:
pichetp
2008-09-20 14:30:05 +00:00
parent c5f0168382
commit 0455e362ae
@@ -83,29 +83,15 @@ class question_dataset_dependent_questiontype extends default_questiontype {
function substitute_variables($str, $dataset) {
foreach ($dataset as $name => $value) {
if($value < 0 ){
$str = str_replace('{'.$name.'}', '('.$value.')', $str);
} else {
$str = str_replace('{'.$name.'}', $value, $str);
}
return $str;
}
function uses_quizfile($question, $relativefilepath) {
// Check whether the specified file is available by any
// dataset item on this question...
global $CFG;
if (get_record_sql(" SELECT *
FROM {$CFG->prefix}question_dataset_items i,
{$CFG->prefix}question_dataset_definitions d,
{$CFG->prefix}question_datasets q
WHERE i.value = '$relativefilepath'
AND d.id = i.definition AND d.type = 2
AND d.id = q.datasetdefinition
AND q.question = $question->id ")) {
return true;
} else {
// Make the check of the parent:
return parent::uses_quizfile($question, $relativefilepath);
}
return $str;
}
function finished_edit_wizard(&$form) {