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 *\n FROM {$CFG->prefix}question_dataset_items i,\n {$CFG->prefix}question_dataset_definitions d,\n {$CFG->prefix}question_datasets q\n WHERE i.value = '{$relativefilepath}'\n AND d.id = i.definition AND d.type = 2\n AND d.id = q.datasetdefinition\n AND q.question = {$question->id} ")) { return true; } else { // Make the check of the parent: return parent::uses_quizfile($question, $relativefilepath); } }