MDL-71378 mod_qbank: Add initial plugin structure

This commit is contained in:
Simon Adams
2024-11-15 15:18:46 +00:00
parent 269a8a8a1b
commit 78d73cc9b7
20 changed files with 749 additions and 9 deletions
+2 -9
View File
@@ -163,17 +163,10 @@ class mod extends base {
}
/**
* Allow all activity modules but Forum to be uninstalled.
*
* This exception for the Forum has been hard-coded in Moodle since ages,
* we may want to re-think it one day.
* Activity modules that declare feature flag FEATURE_CAN_UNINSTALL as false cannot be uninstalled.
*/
public function is_uninstall_allowed() {
if ($this->name === 'forum') {
return false;
} else {
return true;
}
return plugin_supports('mod', $this->name, FEATURE_CAN_UNINSTALL, true);
}
/**