Skip to content

Commit

Permalink
CTP-3563 require impl set_submission_data()
Browse files Browse the repository at this point in the history
  • Loading branch information
watson8 committed Oct 15, 2024
1 parent 4d19ba0 commit 7a7e3bb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion classes/submission/assign.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
1 change: 0 additions & 1 deletion classes/submission/hvp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion classes/submission/quiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
8 changes: 8 additions & 0 deletions classes/submission/submission.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion classes/submission/turnitintooltwo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 7a7e3bb

Please sign in to comment.