* the values are the corresponding objects extending {@link plugininfo_base}
*/
public function get_plugins($disablecache=false) {
+ global $CFG;
if ($disablecache or is_null($this->pluginsinfo)) {
$this->pluginsinfo = array();
$this->pluginsinfo[$plugintype] = $plugins;
}
- // TODO: MDL-20438 verify this is the correct solution/replace
- if (!during_initial_install()) {
+ if (empty($CFG->disableupdatenotifications) and !during_initial_install()) {
// append the information about available updates provided by {@link available_update_checker()}
$provider = available_update_checker::instance();
foreach ($this->pluginsinfo as $plugintype => $plugins) {
'offline', 'online', 'upload', 'uploadsingle'
),
+ 'assignsubmission' => array(
+ 'comments', 'file', 'onlinetext'
+ ),
+
+ 'assignfeedback' => array(
+ 'comments', 'file'
+ ),
+
'auth' => array(
'cas', 'db', 'email', 'fc', 'imap', 'ldap', 'manual', 'mnet',
'nntp', 'nologin', 'none', 'pam', 'pop3', 'radius',
'social_activities', 'tag_flickr', 'tag_youtube', 'tags'
),
+ 'booktool' => array(
+ 'exportimscp', 'importhtml', 'print'
+ ),
+
'coursereport' => array(
//deprecated!
),
),
'gradingform' => array(
- 'rubric'
+ 'rubric', 'guide'
),
'local' => array(
),
'mod' => array(
- 'assignment', 'chat', 'choice', 'data', 'feedback', 'folder',
+ 'assign', 'assignment', 'book', 'chat', 'choice', 'data', 'feedback', 'folder',
'forum', 'glossary', 'imscp', 'label', 'lesson', 'lti', 'page',
'quiz', 'resource', 'scorm', 'survey', 'url', 'wiki', 'workshop'
),
),
'tool' => array(
- 'bloglevelupgrade', 'capability', 'customlang', 'dbtransfer', 'generator',
+ 'assignmentupgrade', 'bloglevelupgrade', 'capability', 'customlang', 'dbtransfer', 'generator',
'health', 'innodb', 'langimport', 'multilangupgrade', 'phpunit', 'profiling',
'qeupgradehelper', 'replace', 'spamcleaner', 'timezoneimport', 'unittest',
'uploaduser', 'unsuproles', 'xmldb'
class plugininfo_message extends plugininfo_base {
public function get_settings_url() {
+ $processors = get_message_processors();
+ if (isset($processors[$this->name])) {
+ $processor = $processors[$this->name];
+ if ($processor->available && $processor->hassettings) {
+ return new moodle_url('settings.php', array('section' => 'messagesetting'.$processor->name));
+ }
+ }
+ return parent::get_settings_url();
+ }
- if (file_exists($this->full_path('settings.php')) or file_exists($this->full_path('settingstree.php'))) {
- return new moodle_url('/admin/settings.php', array('section' => 'messagesetting' . $this->name));
+ /**
+ * @see plugintype_interface::is_enabled()
+ */
+ public function is_enabled() {
+ $processors = get_message_processors();
+ if (isset($processors[$this->name])) {
+ return $processors[$this->name]->configured && $processors[$this->name]->enabled;
} else {
- return parent::get_settings_url();
+ return parent::is_enabled();
+ }
+ }
+
+ /**
+ * @see plugintype_interface::get_uninstall_url()
+ */
+ public function get_uninstall_url() {
+ $processors = get_message_processors();
+ if (isset($processors[$this->name])) {
+ return new moodle_url('message.php', array('uninstall' => $processors[$this->name]->id, 'sesskey' => sesskey()));
+ } else {
+ return parent::get_uninstall_url();
}
}
}