Skip to content

Commit

Permalink
deleted get_legacy_* methods from events classes
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele.cordella authored and kordan committed Oct 20, 2023
1 parent 0853be3 commit 402001c
Show file tree
Hide file tree
Showing 24 changed files with 0 additions and 438 deletions.
19 changes: 0 additions & 19 deletions classes/event/all_submissions_exported.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,4 @@ public function get_description() {
public function get_url() {
return new \moodle_url('/mod/surveypro/tools.php', ['id' => $this->contextinstanceid, 'section' => 'export']);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'all submissions exported',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}
}
19 changes: 0 additions & 19 deletions classes/event/all_submissions_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,4 @@ public function get_url() {
$paramurl = ['id' => $this->contextinstanceid, 'section' => 'submissionslist'];
return new \moodle_url('/mod/surveypro/view.php', $paramurl);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'all submissions viewed',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}
}
19 changes: 0 additions & 19 deletions classes/event/all_usertemplates_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,4 @@ public function get_description() {
public function get_url() {
return new \moodle_url('/mod/surveypro/utemplates.php', ['id' => $this->contextinstanceid, 'section' => 'manage']);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'all usertemplates viewed',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}
}
1 change: 0 additions & 1 deletion classes/event/course_module_viewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ protected function init() {
$this->data['objecttable'] = 'surveypro';
parent::init();
}
// You might need to override get_url() and get_legacy_log_data() if view mode needs to be stored as well.
}
19 changes: 0 additions & 19 deletions classes/event/form_previewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,4 @@ public function get_description() {
public function get_url() {
return new \moodle_url('/mod/surveypro/layout.php', ['id' => $this->contextinstanceid, 'section' => 'preview']);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'form previewed',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}
}
19 changes: 0 additions & 19 deletions classes/event/item_created.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,6 @@ public function get_url() {
return new \moodle_url('/mod/surveypro/layout.php', $paramurl);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'item created',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}

/**
* Custom validation.
*
Expand Down
19 changes: 0 additions & 19 deletions classes/event/item_deleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,6 @@ public function get_url() {
return new \moodle_url('/mod/surveypro/layout.php', ['id' => $this->contextinstanceid, 'section' => 'itemslist']);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'item deleted',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}

/**
* Custom validation.
*
Expand Down
19 changes: 0 additions & 19 deletions classes/event/item_hidden.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,6 @@ public function get_url() {
return new \moodle_url('/mod/surveypro/layout.php', ['id' => $this->contextinstanceid, 'section' => 'itemslist']);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'item hidden',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}

/**
* Custom validation.
*
Expand Down
19 changes: 0 additions & 19 deletions classes/event/item_modified.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,6 @@ public function get_url() {
return new \moodle_url('/mod/surveypro/layout.php', $paramurl);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'item modified',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}

/**
* Custom validation.
*
Expand Down
19 changes: 0 additions & 19 deletions classes/event/item_shown.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,6 @@ public function get_url() {
return new \moodle_url('/mod/surveypro/layout.php', ['id' => $this->contextinstanceid, 'section' => 'itemslist']);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'item shown',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}

/**
* Custom validation.
*
Expand Down
19 changes: 0 additions & 19 deletions classes/event/mastertemplate_applied.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,6 @@ public function get_url() {
return new \moodle_url('/mod/surveypro/mtemplates.php', ['id' => $this->contextinstanceid, 'section' => 'apply']);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'mastertemplate applied',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}

/**
* Custom validation.
*
Expand Down
19 changes: 0 additions & 19 deletions classes/event/mastertemplate_saved.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,6 @@ public function get_url() {
return new \moodle_url('/mod/surveypro/mtemplates.php', ['id' => $this->contextinstanceid, 'section' => 'save']);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'mastertemplate saved',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}

/**
* Custom validation.
*
Expand Down
19 changes: 0 additions & 19 deletions classes/event/submission_created.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,6 @@ public function get_url() {
return new \moodle_url('/mod/surveypro/view.php', $paramurl);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'submission created',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}

/**
* Custom validation.
*
Expand Down
19 changes: 0 additions & 19 deletions classes/event/submission_deleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,4 @@ public function get_url() {
$paramurl = ['id' => $this->contextinstanceid, 'section' => 'submissionslist'];
return new \moodle_url('/mod/surveypro/view.php', $paramurl);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'submission deleted',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}
}
19 changes: 0 additions & 19 deletions classes/event/submission_duplicated.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,4 @@ public function get_url() {
$paramurl = ['id' => $this->contextinstanceid, 'section' => 'submissionslist'];
return new \moodle_url('/mod/surveypro/view.php', $paramurl);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'submission duplicated',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}
}
19 changes: 0 additions & 19 deletions classes/event/submission_modified.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,6 @@ public function get_url() {
return new \moodle_url('/mod/surveypro/view.php', $paramurl);
}

/**
* Return legacy data for add_to_log().
*
* @return array
*/
public function get_legacy_logdata() {
// Override if you are migrating an add_to_log() call.
return array($this->courseid, 'surveypro', 'submission modified',
$this->get_url(), $this->objectid, $this->contextinstanceid, );
}

/**
* Return the legacy event name.
*
* @return string
*/
public static function get_legacy_eventname() {
}

/**
* Custom validation.
*
Expand Down
Loading

0 comments on commit 402001c

Please sign in to comment.