diff --git a/mod/lesson/locallib.php b/mod/lesson/locallib.php index 0925fa0df72..f35864e89b3 100644 --- a/mod/lesson/locallib.php +++ b/mod/lesson/locallib.php @@ -830,7 +830,7 @@ abstract class lesson_add_page_form_base extends moodleform { * * @return bool */ - public function construction_override() { + public function construction_override($pageid, lesson $lesson) { return true; } } @@ -1620,14 +1620,16 @@ abstract class lesson_base { return !empty($this->properties->{$key}); } + //NOTE: E_STRICT does not allow to change function signature! + /** - * If overridden should create a new instance, save it in the DB and return it + * If implemented should create a new instance, save it in the DB and return it */ - public static function create() {} + //public static function create() {} /** - * If overridden should load an instance from the DB and return it + * If implemented should load an instance from the DB and return it */ - public static function load() {} + //public static function load() {} /** * Fetches all of the properties of the object * @return stdClass diff --git a/mod/lesson/pagetypes/branchtable.php b/mod/lesson/pagetypes/branchtable.php index dffa778fbe4..3965bf72cb0 100644 --- a/mod/lesson/pagetypes/branchtable.php +++ b/mod/lesson/pagetypes/branchtable.php @@ -72,7 +72,7 @@ class lesson_page_type_branchtable extends lesson_page { return $jumps; } - public static function get_jumptooptions($firstpage, $lesson) { + public static function get_jumptooptions($firstpage, lesson $lesson) { global $DB, $PAGE; $jump = array(); $jump[0] = get_string("thispage", "lesson"); @@ -199,7 +199,7 @@ class lesson_page_type_branchtable extends lesson_page { redirect(new moodle_url('/mod/lesson/view.php', array('id'=>$PAGE->cm->id,'pageid'=>$newpageid))); } - public function display_answers($table) { + public function display_answers(html_table $table) { $answers = $this->get_answers(); $options = new stdClass; $options->noclean = true; @@ -243,7 +243,7 @@ class lesson_page_type_branchtable extends lesson_page { return $answerpage; } - public function update($properties) { + public function update($properties, $context = null, $maxbytes = null) { if (empty($properties->display)) { $properties->display = '0'; } diff --git a/mod/lesson/pagetypes/endofbranch.php b/mod/lesson/pagetypes/endofbranch.php index 7d24849a9b8..f328429abb5 100644 --- a/mod/lesson/pagetypes/endofbranch.php +++ b/mod/lesson/pagetypes/endofbranch.php @@ -99,7 +99,7 @@ class lesson_page_type_endofbranch extends lesson_page { public function get_grayout() { return 1; } - public function update($properties) { + public function update($properties, $context = null, $maxbytes = null) { global $DB, $PAGE; $properties->id = $this->properties->id; @@ -178,7 +178,7 @@ class lesson_add_page_form_endofbranch extends lesson_add_page_form_base { $this->add_jumpto(0); } - public function construction_override($pageid, $lesson) { + public function construction_override($pageid, lesson $lesson) { global $DB, $CFG, $PAGE; require_sesskey(); diff --git a/mod/lesson/pagetypes/endofcluster.php b/mod/lesson/pagetypes/endofcluster.php index 290609def74..05b3f6d6182 100644 --- a/mod/lesson/pagetypes/endofcluster.php +++ b/mod/lesson/pagetypes/endofcluster.php @@ -68,7 +68,7 @@ class lesson_page_type_endofcluster extends lesson_page { public function get_grayout() { return 1; } - public function update($properties) { + public function update($properties, $context = null, $maxbytes = null) { global $DB, $PAGE; $properties->id = $this->properties->id; @@ -160,7 +160,7 @@ class lesson_add_page_form_endofcluster extends lesson_add_page_form_base { $this->add_jumpto(0); } - public function construction_override($pageid, $lesson) { + public function construction_override($pageid, lesson $lesson) { global $CFG, $PAGE, $DB; require_sesskey(); diff --git a/mod/lesson/pagetypes/essay.php b/mod/lesson/pagetypes/essay.php index 43f8e1447b6..78323ec299b 100644 --- a/mod/lesson/pagetypes/essay.php +++ b/mod/lesson/pagetypes/essay.php @@ -126,7 +126,7 @@ class lesson_page_type_essay extends lesson_page { $result->studentanswer = s($studentanswer); return $result; } - public function update($properties) { + public function update($properties, $context = null, $maxbytes = null) { global $DB, $PAGE; $answers = $this->get_answers(); $properties->id = $this->properties->id; diff --git a/mod/lesson/pagetypes/matching.php b/mod/lesson/pagetypes/matching.php index 2ba1aa57add..057297828d7 100644 --- a/mod/lesson/pagetypes/matching.php +++ b/mod/lesson/pagetypes/matching.php @@ -293,7 +293,7 @@ class lesson_page_type_matching extends lesson_page { * @param stdClass $properties * @return bool */ - public function update($properties) { + public function update($properties, $context = null, $maxbytes = null) { global $DB, $PAGE; $answers = $this->get_answers(); $properties->id = $this->properties->id; diff --git a/mod/lesson/pagetypes/truefalse.php b/mod/lesson/pagetypes/truefalse.php index 7ce13ecc93d..8566244a3ef 100644 --- a/mod/lesson/pagetypes/truefalse.php +++ b/mod/lesson/pagetypes/truefalse.php @@ -153,7 +153,7 @@ class lesson_page_type_truefalse extends lesson_page { * @param stdClass $properties * @return bool */ - public function update($properties) { + public function update($properties, $context = null, $maxbytes = null) { global $DB, $PAGE; $answers = $this->get_answers(); $properties->id = $this->properties->id;