diff --git a/classes/submission/assign.php b/classes/submission/assign.php index f14367d..a4c7ed2 100644 --- a/classes/submission/assign.php +++ b/classes/submission/assign.php @@ -61,7 +61,7 @@ protected function set_module_instance() { * @throws \dml_exception * @throws \moodle_exception */ - protected function set_submission_data() { + protected function set_submission_data(): void { $this->submissiondata = $this->get_assign_submission(); } diff --git a/classes/submission/hvp.php b/classes/submission/hvp.php index 0928243..13afa20 100644 --- a/classes/submission/hvp.php +++ b/classes/submission/hvp.php @@ -63,7 +63,6 @@ protected function set_module_instance() { * {@see \local_sitsgradepush\manager::push_submission_log_to_sits()} * We get the item time from the gradebook. (We don't have submissions stored in the mod_hvp local tables). * @return void - * @see */ protected function set_submission_data(): void { $grades = grade_get_grades( diff --git a/classes/submission/quiz.php b/classes/submission/quiz.php index cf5c133..bc317e4 100644 --- a/classes/submission/quiz.php +++ b/classes/submission/quiz.php @@ -63,7 +63,7 @@ protected function set_module_instance() { * @throws \dml_exception * @throws \moodle_exception */ - protected function set_submission_data() { + protected function set_submission_data(): void { $this->submissiondata = $this->get_best_attempt(); } diff --git a/classes/submission/submission.php b/classes/submission/submission.php index 6b1e730..f9cc1b7 100644 --- a/classes/submission/submission.php +++ b/classes/submission/submission.php @@ -166,6 +166,14 @@ public function get_submission_data() { return $this->submissiondata; } + /** + * Set submission data. + * The submission log transfer will be skipped without this data. + * {@see \local_sitsgradepush\manager::push_submission_log_to_sits()} + * @return void + */ + abstract protected function set_submission_data(): void; + /** * Get ISO 8601 format datetime. * diff --git a/classes/submission/turnitintooltwo.php b/classes/submission/turnitintooltwo.php index c9a4273..3afb6db 100644 --- a/classes/submission/turnitintooltwo.php +++ b/classes/submission/turnitintooltwo.php @@ -61,7 +61,7 @@ protected function set_module_instance() { * @throws \dml_exception * @throws \moodle_exception */ - protected function set_submission_data() { + protected function set_submission_data(): void { $this->submissiondata = $this->get_turnitintooltwo_submission(); }