Skip to content
Snippets Groups Projects
Commit 367dc8df authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

drop obsolete function, re #160

parent 3bfb278b
No related branches found
No related tags found
No related merge requests found
...@@ -331,23 +331,6 @@ class qtype_algebra_question { ...@@ -331,23 +331,6 @@ class qtype_algebra_question {
// Use the parser's equivalent method to see if the response is the same as the answer. // Use the parser's equivalent method to see if the response is the same as the answer.
return $response->equivalent($answer); return $response->equivalent($answer);
} }
public function check_file_access($qa, $options, $component, $filearea,
$args, $forcedownload) {
if ($component == 'question' && $filearea == 'answerfeedback') {
$currentanswer = $qa->get_last_qt_var('answer');
$answer = $this->get_matching_answer(['answer' => $currentanswer]);
$answerid = reset($args); // Parameter itemid is answer id.
return $options->feedback && $answerid == $answer->id;
} else if ($component == 'question' && $filearea == 'hint') {
return $this->check_hint_file_access($qa, $options, $args);
} else {
return parent::check_file_access($qa, $options, $component, $filearea,
$args, $forcedownload);
}
}
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment