MDL-45312 qtype_missingtype or qbehaviour_missing cannot be uninstalled.
They are required by the system.
This commit is contained in:
@@ -60,6 +60,11 @@ class qbehaviour extends base {
|
||||
public function is_uninstall_allowed() {
|
||||
global $DB;
|
||||
|
||||
if ($this->name === 'missing') {
|
||||
// qbehaviour_missing is used by the system. It cannot be uninstalled.
|
||||
return false;
|
||||
}
|
||||
|
||||
return !$DB->record_exists('question_attempts', array('behaviour' => $this->name));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user