|
|
@ -536,6 +536,36 @@ class AppPlugin |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Trigger for Plugin::doWhenDeleting[Item] functions |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param string $itemType |
|
|
|
|
|
|
|
* @param int $itemId |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function performActionsWhenDeletingItem($itemType, $itemId) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$pluginList = $this->getInstalledPluginListObject(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (empty($pluginList)) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** @var Plugin $pluginObj */ |
|
|
|
|
|
|
|
foreach ($pluginList as $pluginObj) { |
|
|
|
|
|
|
|
switch ($itemType) { |
|
|
|
|
|
|
|
case 'course': |
|
|
|
|
|
|
|
$pluginObj->doWhenDeletingCourse($itemId); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 'session': |
|
|
|
|
|
|
|
$pluginObj->doWhenDeletingSession($itemId); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 'user': |
|
|
|
|
|
|
|
$pluginObj->doWhenDeletingUser($itemId); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Add the course settings to the course settings form. |
|
|
|
* Add the course settings to the course settings form. |
|
|
|
* |
|
|
|
* |
|
|
|