mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
[multienrol]Don't die if there's an empty directory in enrol and better strings for admin ui
The admin UI still needs a bit of wordsmithing to make it easy to understand what the model we have is.
This commit is contained in:
parent
c6a40e74b9
commit
46a811142e
@ -70,6 +70,12 @@
|
||||
|
||||
$modules = get_list_of_plugins("enrol");
|
||||
foreach ($modules as $module) {
|
||||
|
||||
// skip if directory is empty
|
||||
if (!file_exists("$CFG->dirroot/enrol/$module/enrol.php")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$name = get_string("enrolname", "enrol_$module");
|
||||
$plugin = enrolment_factory::factory($module);
|
||||
$enable = '<input type="checkbox" name="enable[]" value="'.$module.'"';
|
||||
|
@ -10,9 +10,14 @@ class enrolment_factory {
|
||||
if (!$enrol) {
|
||||
$enrol = $CFG->enrol;
|
||||
}
|
||||
require_once("$CFG->dirroot/enrol/$enrol/enrol.php");
|
||||
$class = "enrolment_plugin_$enrol";
|
||||
return new $class;
|
||||
if (file_exists("$CFG->dirroot/enrol/$enrol/enrol.php")) {
|
||||
require_once("$CFG->dirroot/enrol/$enrol/enrol.php");
|
||||
$class = "enrolment_plugin_$enrol";
|
||||
return new $class;
|
||||
} else {
|
||||
trigger_error("$CFG->dirroot/enrol/$enrol/enrol.php does not exist");
|
||||
error("$CFG->dirroot/enrol/$enrol/enrol.php does not exist");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ $string['configenablecourserequests'] = 'This will allow any user to request a c
|
||||
$string['configenablerssfeeds'] = 'This switch will enable RSS feeds from across the site. To actually see any change you will need to enable RSS feeds in the individual modules too - go to the Modules settings under Admin Configuration.';
|
||||
$string['configenablerssfeedsdisabled'] = ' It is not available because RSS feeds are disabled in all the Site. To enable them, go to the Variables settings under Admin Configuration.';
|
||||
$string['configenablestats'] = 'If you choose \'yes\' here, Moodle\'s cronjob will process the logs and gather some statistics. Depending on the amount of traffic on your site, this can take awhile. If you enable this, you will be able to see some interesting graphs and statistics about each of your courses, or on a sitewide basis.';
|
||||
$string['configenrolmentplugins'] = 'Please choose the enrolment plugins you wish to use. Don\'t forget to configure the settings properly.<br /><br />Default plugins are avaliable for interactive plugins only (etc internal, paypal). Should interactive enrolment be disabled, please set \"enrollable\" to \"No\" in required courses.';
|
||||
$string['configenrolmentplugins'] = 'Please choose the enrolment plugins you wish to use. Don\'t forget to configure the settings properly.<br /><br />You have to indicate which plugins are enabled, and <strong>one</strong> plugin can be set as the default plugin for <em>interactive</em> enrolment. To disable interactive enrolment, set \"enrollable\" to \"No\" in required courses.';
|
||||
$string['configerrorlevel'] = 'Choose the amount of PHP warnings that you want to be displayed. Normal is usually the best choice.';
|
||||
$string['configextendedusernamechars'] = 'Enable this setting to allow students to use any characters in their usernames (note this does not affect their actual names). The default is \"false\" which restricts usernames to be alphanumeric characters only';
|
||||
$string['configfilterall'] = 'Filter all strings, including headings, titles, navigation bar and so on. This is mostly useful when using the multilang filter, otherwise it will just create extra load on your site for little gain.';
|
||||
|
Loading…
x
Reference in New Issue
Block a user