Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-34313: Deleting assignfeedback plugins deletes config for assigns…

…ubmission_plugin instead.
  • Loading branch information...
commit 71df83d256597220dd76858cd36ea5a5ff5cfe1c 1 parent 904673d
Damyon Wiese authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 mod/assign/adminlib.php
View
5 mod/assign/adminlib.php
@@ -269,7 +269,7 @@ public function delete_plugin($plugin) {
if ($confirm) {
// Delete any configuration records.
- if (!unset_all_config_for_plugin('assignsubmission_' . $plugin)) {
+ if (!unset_all_config_for_plugin($this->subtype . '_' . $plugin)) {
$this->error = $OUTPUT->notification(get_string('errordeletingconfig', 'admin', $this->subtype . '_' . $plugin));
}
@@ -282,7 +282,8 @@ public function delete_plugin($plugin) {
$DB->delete_records('assign_plugin_config', array('plugin'=>$plugin, 'subtype'=>$this->subtype));
// Then the tables themselves
- drop_plugin_tables($this->subtype . '_' . $plugin, $CFG->dirroot . '/mod/assign/' . $this->subtype . '/' .$plugin. '/db/install.xml', false);
+ $shortsubtype = substr($this->subtype, strlen('assign'));
+ drop_plugin_tables($this->subtype . '_' . $plugin, $CFG->dirroot . '/mod/assign/' . $shortsubtype . '/' .$plugin. '/db/install.xml', false);
// Remove event handlers and dequeue pending events
events_uninstall($this->subtype . '_' . $plugin);
Please sign in to comment.
Something went wrong with that request. Please try again.