Commit 4e1d17d0 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1497065: Making the multirecipient notifications the default plugin"

parents a3fd4760 24c957e2
......@@ -4386,5 +4386,14 @@ function xmldb_core_upgrade($oldversion=0) {
}
}
if ($oldversion < 2016030600) {
log_debug('Forcing the multirecipient notification plugin to be the default one');
$result = get_field('module_installed', 'active', 'name', 'multirecipientnotification');
if ($result === '0') {
set_field('module_installed', 'active', 1, 'name', 'multirecipientnotification');
}
log_debug('Multirecipient notifications plugin active');
}
return $status;
}
......@@ -16,7 +16,7 @@ $config = new stdClass();
// See https://wiki.mahara.org/wiki/Developer_Area/Version_Numbering_Policy
// For upgrades on stable branches, increment the version by one. On master, use the date.
$config->version = 2016030400;
$config->version = 2016030600;
$config->series = '16.04';
$config->release = '16.04dev';
$config->minupgradefrom = 2012080604;
......
......@@ -210,4 +210,12 @@ class PluginModuleMultirecipientnotification extends PluginModule {
// artefact_installed) just skip the test.
}
}
/**
* We want this module to be the default notification module so we
* will prevent it being disabled.
*/
public static function can_be_disabled() {
return false;
}
}
@javascript @core @core_administration
Feature: Required plugins
In order to utilize default Mahara certain required plugins need to be active for the site
As an admin
I check that the plugins are active
Scenario: Checking that the Multirecipient notifications plugin is active (Bug 1497065)
Given I log in as "admin" with password "Kupuhipa1"
And I follow "Administration"
And I choose "Plugin administration" in "Extensions"
# Currently only tests for multirecipientnotifications plugin which
# should be active and not be able to be hidden
And I scroll to the base of id "module.multirecipientnotification"
Then I should not see "Hide" in the "//li[@id='module.multirecipientnotification']" "xpath_element"
And I should not see "Show" in the "//li[@id='module.multirecipientnotification']" "xpath_element"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment