diff --git a/classes/frontend.php b/classes/frontend.php index 2791a1d..f9c18eb 100644 --- a/classes/frontend.php +++ b/classes/frontend.php @@ -34,8 +34,8 @@ protected function get_javascript_strings(): array { return ['label_state', 'label_question', 'ajaxerror']; } - protected function get_javascript_init_params($course, \cm_info $cm = null, - \section_info $section = null): array { + protected function get_javascript_init_params($course, ?\cm_info $cm = null, + ?\section_info $section = null): array { // Get all quizzes for course. $quizzes = $this->get_all_quizzes($course->id); @@ -74,8 +74,8 @@ protected function get_all_quizzes(int $courseid): array { return $this->allquizzes; } - protected function allow_add($course, \cm_info $cm = null, - \section_info $section = null): bool { + protected function allow_add($course, ?\cm_info $cm = null, + ?\section_info $section = null): bool { // Only show this option if there are some quizzes in the course. return !empty($this->get_all_quizzes($course->id));