mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-24091 workshop: deleting subplugins data together with the workshop instance
This commit is contained in:
parent
8b6f4e6626
commit
346af1a431
12 changed files with 153 additions and 5 deletions
|
@ -124,6 +124,19 @@ class workshop_best_evaluation implements workshop_evaluation {
|
|||
return new workshop_best_evaluation_settings_form($actionurl, $customdata, 'post', '', $attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all data related to a given workshop module instance
|
||||
*
|
||||
* @see workshop_delete_instance()
|
||||
* @param int $workshopid id of the workshop module instance being deleted
|
||||
* @return void
|
||||
*/
|
||||
public static function delete_instance($workshopid) {
|
||||
global $DB;
|
||||
|
||||
$DB->delete_records('workshopeval_best_settings', array('workshopid' => $workshopid));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal methods //
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -28,8 +28,17 @@ defined('MOODLE_INTERNAL') || die();
|
|||
/**
|
||||
* Defines all methods that grading evaluation subplugins has to implement
|
||||
*
|
||||
* @todo
|
||||
* @todo the final interface is not decided yet as we have only one implementation so far
|
||||
*/
|
||||
interface workshop_evaluation {
|
||||
|
||||
/**
|
||||
* Delete all data related to a given workshop module instance
|
||||
*
|
||||
* This is called from {@link workshop_delete_instance()}.
|
||||
*
|
||||
* @param int $workshopid id of the workshop module instance being deleted
|
||||
* @return void
|
||||
*/
|
||||
public static function delete_instance($workshopid);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue