aboutsummaryrefslogtreecommitdiff
path: root/questiontype.php
diff options
context:
space:
mode:
authorJean-Michel Vedrine <vedrine@vedrine.org>2014-06-19 14:08:36 +0200
committerJean-Michel Vedrine <vedrine@vedrine.org>2014-06-19 14:10:07 +0200
commita7171d6dacb463ce0cc45beb23a31fe2c1684141 (patch)
treec22952d52d7b1e00ad6389d2c2c35080029e170a /questiontype.php
parent8055f6eddd71cf562d5fb7b6528bc082ef508085 (diff)
CONTRIB-5128 hints not working
Diffstat (limited to 'questiontype.php')
-rw-r--r--questiontype.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/questiontype.php b/questiontype.php
index 9311964..f755ce8 100644
--- a/questiontype.php
+++ b/questiontype.php
@@ -61,11 +61,13 @@ class qtype_algebra extends question_type {
public function move_files($questionid, $oldcontextid, $newcontextid) {
parent::move_files($questionid, $oldcontextid, $newcontextid);
$this->move_files_in_answers($questionid, $oldcontextid, $newcontextid);
+ $this->move_files_in_hints($questionid, $oldcontextid, $newcontextid);
}
protected function delete_files($questionid, $contextid) {
parent::delete_files($questionid, $contextid);
$this->delete_files_in_answers($questionid, $contextid);
+ $this->delete_files_in_hints($questionid, $contextid);
}
public function delete_question($questionid, $contextid) {
@@ -272,16 +274,8 @@ class qtype_algebra extends question_type {
$question->allowedfuncs=implode(',', array_keys($question->allowedfuncs));
}
- // Call the parent method to write the extensions fields to the database. This either returns null
- // or an error object so if we get anything then return it otherwise return our existing.
- $parentresult = parent::save_question_options($question);
- if ($parentresult !== null) {
- // Parent function returns null if all is OK.
- return $parentresult;
- } else {
- // Otherwise just return true - this mimics the shortanswer return format.
- return true;
- }
+ parent::save_question_options($question);
+ $this->save_hints($question);
}
/**