Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions classes/frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
Expand Down