本文整理汇总了PHP中get_list_of_plugins函数的典型用法代码示例。如果您正苦于以下问题:PHP get_list_of_plugins函数的具体用法?PHP get_list_of_plugins怎么用?PHP get_list_of_plugins使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_list_of_plugins函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: definition
function definition()
{
global $USER, $CFG, $COURSE;
$mform =& $this->_form;
$this->set_upload_manager(new upload_manager('imagefile', false, false, null, false, 0, true, true, false));
//Accessibility: "Required" is bad legend text.
$strgeneral = get_string('general');
$strrequired = get_string('required');
/// Add some extra hidden fields
$mform->addElement('hidden', 'id');
$mform->addElement('hidden', 'course', $COURSE->id);
/// Print the required moodle fields first
$mform->addElement('header', 'moodle', $strgeneral);
$mform->addElement('text', 'username', get_string('username'), 'size="20"');
$mform->addRule('username', $strrequired, 'required', null, 'client');
$mform->setType('username', PARAM_RAW);
$modules = get_list_of_plugins('auth');
$auth_options = array();
foreach ($modules as $module) {
$auth_options[$module] = get_string("auth_{$module}" . "title", "auth");
}
$mform->addElement('select', 'auth', get_string('chooseauthmethod', 'auth'), $auth_options);
$mform->setHelpButton('auth', array('authchange', get_string('chooseauthmethod', 'auth')));
$mform->setAdvanced('auth');
$mform->addElement('passwordunmask', 'newpassword', get_string('newpassword'), 'size="20"');
$mform->setHelpButton('newpassword', array('newpassword', get_string('leavetokeep')));
$mform->setType('newpassword', PARAM_RAW);
$mform->addElement('advcheckbox', 'preference_auth_forcepasswordchange', get_string('forcepasswordchange'));
$mform->setHelpButton('preference_auth_forcepasswordchange', array('forcepasswordchange', get_string('forcepasswordchange')));
/// shared fields
useredit_shared_definition($mform);
/// Next the customisable profile fields
profile_definition($mform);
$this->add_action_buttons(false, get_string('updatemyprofile'));
}
开发者ID:r007,项目名称:PMoodle,代码行数:35,代码来源:editadvanced_form.php
示例2: available_converters
/**
* Returns the list of all available converters and loads their classes
*
* Converter must be installed as a directory in backup/converter/ and its
* method is_available() must return true to get to the list.
*
* @see base_converter::is_available()
* @return array of strings
*/
public static function available_converters() {
global $CFG;
$converters = array();
$plugins = get_list_of_plugins('backup/converter');
foreach ($plugins as $name) {
$classfile = "$CFG->dirroot/backup/converter/$name/lib.php";
$classname = "{$name}_converter";
if (!file_exists($classfile)) {
throw new convert_helper_exception('converter_classfile_not_found', $classfile);
}
require_once($classfile);
if (!class_exists($classname)) {
throw new convert_helper_exception('converter_classname_not_found', $classname);
}
if (call_user_func($classname .'::is_available')) {
$converters[] = $name;
}
}
return $converters;
}
开发者ID:nottmoo,项目名称:moodle,代码行数:34,代码来源:convert_helper.class.php
示例3: process_glossary
protected function process_glossary($data)
{
global $DB;
$data = (object) $data;
$oldid = $data->id;
$data->course = $this->get_courseid();
$data->assesstimestart = $this->apply_date_offset($data->assesstimestart);
$data->assesstimefinish = $this->apply_date_offset($data->assesstimefinish);
if ($data->scale < 0) {
// scale found, get mapping
$data->scale = -$this->get_mappingid('scale', abs($data->scale));
}
$formats = get_list_of_plugins('mod/glossary/formats');
// Check format
if (!in_array($data->displayformat, $formats)) {
$data->displayformat = 'dictionary';
}
if (!empty($data->mainglossary) and $data->mainglossary == 1 and $DB->record_exists('glossary', array('mainglossary' => 1, 'course' => $this->get_courseid()))) {
// Only allow one main glossary in the course
$data->mainglossary = 0;
}
// insert the glossary record
$newitemid = $DB->insert_record('glossary', $data);
$this->apply_activity_instance($newitemid);
}
开发者ID:esyacelga,项目名称:sisadmaca,代码行数:25,代码来源:restore_glossary_stepslib.php
示例4: install_get_list_of_languages
/**
* This function returns a list of languages and their full names. The
* list of available languages is fetched from install/lang/xx/installer.php
* and it's used exclusively by the installation process
* @return array An associative array with contents in the form of LanguageCode => LanguageName
*/
function install_get_list_of_languages()
{
global $CFG;
$languages = array();
/// Get raw list of lang directories
$langdirs = get_list_of_plugins('install/lang');
asort($langdirs);
/// Get some info from each lang
foreach ($langdirs as $lang) {
if ($lang == 'en') {
continue;
}
if (file_exists($CFG->dirroot . '/install/lang/' . $lang . '/installer.php')) {
$string = array();
include $CFG->dirroot . '/install/lang/' . $lang . '/installer.php';
if (substr($lang, -5) === '_utf8') {
//Remove the _utf8 suffix from the lang to show
$shortlang = substr($lang, 0, -5);
} else {
$shortlang = $lang;
}
if (!empty($string['thislanguage'])) {
$languages[$lang] = $string['thislanguage'] . ' (' . $shortlang . ')';
}
}
}
/// Return array
return $languages;
}
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:35,代码来源:installlib.php
示例5: referentiel_get_print_formats
/**
* Get list of available import or export prints
* @param string $type 'import' if import list, otherwise export list assumed
* @return array sorted list of import/export prints available
**/
function referentiel_get_print_formats($type, $classprefix = "")
{
global $CFG;
$fileprints = get_list_of_plugins("mod/referentiel/print");
$fileprintnames = array();
require_once "{$CFG->dirroot}/mod/referentiel/print.php";
foreach ($fileprints as $key => $fileprint) {
$print_file = $CFG->dirroot . "/mod/referentiel/print/{$fileprint}/print.php";
if (file_exists($print_file)) {
require_once $print_file;
} else {
continue;
}
if ($classprefix) {
$classname = $classprefix . "_" . $fileprint;
} else {
$classname = "pprint_{$fileprint}";
}
$print_class = new $classname();
$provided = $print_class->provide_print();
if ($provided) {
$printname = get_string($fileprint, "referentiel");
if ($printname == "[[{$fileprint}]]") {
$printname = $fileprint;
// Just use the raw folder name
}
$fileprintnames[$fileprint] = $printname;
}
}
natcasesort($fileprintnames);
return $fileprintnames;
}
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:37,代码来源:print_lib.php
示例6: test_plugins
public function test_plugins()
{
$plugins = get_list_of_plugins('repository');
foreach ($plugins as $plugin) {
// Instantiate a fake plugin instance
$plugin_class = "partialmock_{$plugin}";
$plugin = new $plugin_class($this);
// add common plugin tests here
}
}
开发者ID:vuchannguyen,项目名称:web,代码行数:10,代码来源:testrepositorylib.php
示例7: lightboxgallery_edit_types
function lightboxgallery_edit_types($showall = false)
{
global $CFG;
$result = array();
$disabledplugins = explode(',', get_config('lightboxgallery', 'disabledplugins'));
$edittypes = get_list_of_plugins('mod/lightboxgallery/edit');
foreach ($edittypes as $edittype) {
if ($showall || !in_array($edittype, $disabledplugins)) {
$result[$edittype] = get_string('edit_' . $edittype, 'lightboxgallery');
}
}
return $result;
}
开发者ID:ndunand,项目名称:moodle-mod_lightboxgallery,代码行数:13,代码来源:locallib.php
示例8: get_all
/**
* Returns a new object of each available type.
* @return array Array of forum_feature objects
*/
public static function get_all()
{
global $CFG;
// Get directory listing (excluding simpletest, CVS, etc)
$list = get_list_of_plugins('feature', '', $CFG->dirroot . '/mod/forumng');
// Create array and put one of each object in it
$results = array();
foreach ($list as $name) {
$results[] = self::get_new($name);
}
// Sort features into order and return
usort($results, array('forum_feature', 'compare'));
return $results;
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:18,代码来源:forum_feature.php
示例9: definition
function definition()
{
global $CFG;
$mform =& $this->_form;
$syscontext = get_context_instance(CONTEXT_SYSTEM);
$actions = array(0 => get_string('choose') . '...');
$plugins = get_list_of_plugins($CFG->admin . '/user/actions', 'CVS');
foreach ($plugins as $dir) {
if (check_action_capabilities($dir)) {
$actions[$dir] = get_string('pluginname', 'bulkuseractions_' . $dir, NULL, $CFG->dirroot . '/admin/user/actions/' . $dir . '/lang/');
}
}
$objs = array();
$objs[] =& $mform->createElement('select', 'action', null, $actions);
$objs[] =& $mform->createElement('submit', 'doaction', get_string('go'));
$mform->addElement('group', 'actionsgrp', get_string('withselectedusers'), $objs, ' ', false);
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:17,代码来源:user_bulk_forms.php
示例10: definition
/**
* items in the form
*/
public function definition()
{
global $CURMAN, $CFG;
parent::definition();
$mform =& $this->_form;
$mform->addElement('hidden', 'id');
$mform->addElement('text', 'name', get_string('cluster_name', 'block_curr_admin') . ':');
$mform->addRule('name', get_string('required'), 'required', NULL, 'client');
$mform->setHelpButton('name', array('clusterform/name', get_string('cluster_name', 'block_curr_admin'), 'block_curr_admin'));
$mform->addElement('textarea', 'display', get_string('cluster_description', 'block_curr_admin') . ':', array('cols' => 40, 'rows' => 2));
$mform->setHelpButton('display', array('clusterform/display', get_string('cluster_description', 'block_curr_admin'), 'block_curr_admin'));
$current_cluster_id = isset($this->_customdata['obj']->id) ? $this->_customdata['obj']->id : '';
//obtain the non-child clusters that we could become the child of, with availability
//determined based on the edit capability
$contexts = clusterpage::get_contexts('block/curr_admin:cluster:edit');
$non_child_clusters = cluster_get_non_child_clusters($current_cluster_id, $contexts);
//parent dropdown
$mform->addElement('select', 'parent', get_string('cluster_parent', 'block_curr_admin') . ':', $non_child_clusters);
$mform->setHelpButton('parent', array('clusterform/parent', get_string('cluster_parent', 'block_curr_admin'), 'block_curr_admin'));
// allow plugins to add their own fields
$plugins = get_list_of_plugins('curriculum/cluster');
$mform->addElement('header', 'userassociationfieldset', get_string('userassociation', 'block_curr_admin'));
foreach ($plugins as $plugin) {
require_once CURMAN_DIRLOCATION . '/cluster/' . $plugin . '/lib.php';
call_user_func('cluster_' . $plugin . '_edit_form', $this);
}
// custom fields
$fields = field::get_for_context_level('cluster');
$fields = $fields ? $fields : array();
$lastcat = null;
$context = isset($this->_customdata['obj']) && isset($this->_customdata['obj']->id) ? get_context_instance(context_level_base::get_custom_context_level('cluster', 'block_curr_admin'), $this->_customdata['obj']->id) : get_context_instance(CONTEXT_SYSTEM);
require_once CURMAN_DIRLOCATION . '/plugins/manual/custom_fields.php';
foreach ($fields as $rec) {
$field = new field($rec);
if (!isset($field->owners['manual'])) {
continue;
}
if ($lastcat != $rec->categoryid) {
$lastcat = $rec->categoryid;
$mform->addElement('header', "category_{$lastcat}", htmlspecialchars($rec->categoryname));
}
manual_field_add_form_element($this, $context, $field);
}
$this->add_action_buttons();
}
开发者ID:remotelearner,项目名称:elis.cm,代码行数:48,代码来源:clusterform.class.php
示例11: AMB_update_modules
/**
* Check here for new modules to add to the database. This happens every time the block is upgraded.
* If you have added your own extension, increment the version number in block_ajax_marking.php
* to trigger this process. Also called after install.
*/
function AMB_update_modules()
{
global $CFG;
$modules = array();
echo "<br /><br />Scanning site for modules which have an AJAX Marking Block plugin... <br />";
// make a list of directories to check for module grading files
$installed_modules = get_list_of_plugins('mod');
$directories = array($CFG->dirroot . '/blocks/ajax_marking');
foreach ($installed_modules as $module) {
$directories[] = $CFG->dirroot . '/mod/' . $module;
}
// get module ids so that we can store these later
$comma_modules = $installed_modules;
foreach ($comma_modules as $key => $comma_module) {
$comma_modules[$key] = "'" . $comma_module . "'";
}
$comma_modules = implode(', ', $comma_modules);
$sql = "\n SELECT name, id FROM {$CFG->prefix}modules\n WHERE name IN (" . $comma_modules . ")\n ";
$module_ids = get_records_sql($sql);
// Get files in each directory and check if they fit the naming convention
foreach ($directories as $directory) {
$files = scandir($directory);
// check to see if they end in _grading.php
foreach ($files as $file) {
// this should lead to 'modulename' and 'grading.php'
$pieces = explode('_', $file);
if (isset($pieces[1]) && $pieces[1] == 'grading.php') {
if (in_array($pieces[0], $installed_modules)) {
$modname = $pieces[0];
// add the modulename part of the filename to the array
$modules[$modname] = new stdClass();
$modules[$modname]->name = $modname;
// do not store $CFG->dirroot so that any changes to it will not break the block
$modules[$modname]->dir = str_replace($CFG->dirroot, '', $directory);
//$modules[$modname]->dir = $directory;
$modules[$modname]->id = $module_ids[$modname]->id;
echo "Registered {$modname} module <br />";
}
}
}
}
echo '<br />For instructions on how to write extensions for this block, see the documentation on Moodle Docs<br /><br />';
set_config('modules', serialize($modules), 'block_ajax_marking');
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:49,代码来源:upgrade.php
示例12: available_converters
/**
* Returns the list of all available converters and loads their classes
*
* Converter must be installed as a directory in backup/converter/ and its
* method is_available() must return true to get to the list.
*
* @see base_converter::is_available()
* @return array of strings
*/
public static function available_converters($restore = true)
{
global $CFG;
$converters = array();
// Only apply for backup converters if the (experimental) setting enables it.
// This will be out once we get proper support of backup converters. MDL-29956
if (!$restore && empty($CFG->enablebackupconverters)) {
return $converters;
}
$plugins = get_list_of_plugins('backup/converter');
foreach ($plugins as $name) {
$filename = $restore ? 'lib.php' : 'backuplib.php';
$classuf = $restore ? '_converter' : '_export_converter';
$classfile = "{$CFG->dirroot}/backup/converter/{$name}/{$filename}";
$classname = "{$name}{$classuf}";
$zip_contents = "{$name}_zip_contents";
$store_backup_file = "{$name}_store_backup_file";
$convert = "{$name}_backup_convert";
if (!file_exists($classfile)) {
throw new convert_helper_exception('converter_classfile_not_found', $classfile);
}
require_once $classfile;
if (!class_exists($classname)) {
throw new convert_helper_exception('converter_classname_not_found', $classname);
}
if (call_user_func($classname . '::is_available')) {
if (!$restore) {
if (!class_exists($zip_contents)) {
throw new convert_helper_exception('converter_classname_not_found', $zip_contents);
}
if (!class_exists($store_backup_file)) {
throw new convert_helper_exception('converter_classname_not_found', $store_backup_file);
}
if (!class_exists($convert)) {
throw new convert_helper_exception('converter_classname_not_found', $convert);
}
}
$converters[] = $name;
}
}
return $converters;
}
开发者ID:numbas,项目名称:moodle,代码行数:51,代码来源:convert_helper.class.php
示例13: cm_add_config_defaults
function cm_add_config_defaults()
{
global $CURMAN, $CFG;
$defaults = array('userdefinedtrack' => 0, 'time_format_12h' => 0, 'auto_assign_user_idnumber' => 1, 'restrict_to_elis_enrolment_plugin' => 0, 'cluster_groups' => 0, 'site_course_cluster_groups' => 0, 'cluster_groupings' => 0, 'default_instructor_role' => 0, 'catalog_collapse_count' => 4, 'disablecoursecatalog' => 0, 'disablecertificates' => 1, 'notify_classenrol_user' => 0, 'notify_classenrol_role' => 0, 'notify_classenrol_supervisor' => 0, 'notify_classenrol_message' => get_string('notifyclassenrolmessagedef', 'block_curr_admin'), 'notify_classcompleted_user' => 0, 'notify_classcompleted_role' => 0, 'notify_classcompleted_supervisor' => 0, 'notify_classcompleted_message' => get_string('notifyclasscompletedmessagedef', 'block_curr_admin'), 'notify_classnotstarted_user' => 0, 'notify_classnotstarted_role' => 0, 'notify_classnotstarted_supervisor' => 0, 'notify_classnotstarted_message' => get_string('notifyclassnotstartedmessagedef', 'block_curr_admin'), 'notify_classnotstarted_days' => 10, 'notify_classnotcompleted_user' => 0, 'notify_classnotcompleted_role' => 0, 'notify_classnotcompleted_supervisor' => 0, 'notify_classnotcompleted_message' => get_string('notifyclassnotcompletedmessagedef', 'block_curr_admin'), 'notify_classnotcompleted_days' => 10, 'notify_curriculumnotcompleted_user' => 0, 'notify_curriculumnotcompleted_role' => 0, 'notify_curriculumnotcompleted_supervisor' => 0, 'notify_curriculumnotcompleted_message' => get_string('notifycurriculumnotcompletedmessagedef', 'block_curr_admin'), 'notify_classnotstarted_days' => 10, 'notify_trackenrol_user' => 0, 'notify_trackenrol_role' => 0, 'notify_trackenrol_supervisor' => 0, 'notify_ttrackenrol_message' => get_string('notifytrackenrolmessagedef', 'block_curr_admin'), 'notify_courserecurrence_user' => 0, 'notify_courserecurrence_role' => 0, 'notify_courserecurrence_supervisor' => 0, 'notify_courserecurrence_message' => get_string('notifycourserecurrencemessagedef', 'block_curr_admin'), 'notify_courserecurrence_days' => 10, 'notify_curriculumrecurrence_user' => 0, 'notify_curriculumrecurrence_role' => 0, 'notify_curriculumrecurrence_supervisor' => 0, 'notify_curriculumrecurrence_message' => get_string('notifycurriculumrecurrencemessagedef', 'block_curr_admin'), 'notify_curriculumrecurrence_days' => 10, 'num_block_icons' => 5, 'display_clusters_at_top_level' => 1, 'display_curricula_at_top_level' => 0, 'default_cluster_role_id' => 0, 'default_curriculum_role_id' => 0, 'default_course_role_id' => 0, 'default_class_role_id' => 0, 'default_track_role_id' => 0, 'autocreated_unknown_is_yes' => 1, 'legacy_show_inactive_users' => 0);
// include defaults from plugins
$plugins = get_list_of_plugins('curriculum/plugins');
foreach ($plugins as $plugin) {
if (is_readable(CURMAN_DIRLOCATION . '/plugins/' . $plugin . '/config.php')) {
include_once CURMAN_DIRLOCATION . '/plugins/' . $plugin . '/config.php';
if (function_exists("{$plugin}_get_config_defaults")) {
$defaults += call_user_func("{$plugin}_get_config_defaults");
}
}
}
foreach ($defaults as $key => $value) {
if (!isset($CURMAN->config->{$key})) {
$CURMAN->config->{$key} = $value;
}
}
}
开发者ID:remotelearner,项目名称:elis.cm,代码行数:20,代码来源:lib.php
示例14: available_converters
/**
* Returns the list of all available converters and loads their classes
*
* Converter must be installed as a directory in backup/converter/ and its
* method is_available() must return true to get to the list.
*
* @see base_converter::is_available()
* @return array of strings
*/
public static function available_converters($restore = true)
{
global $CFG;
$converters = array();
$plugins = get_list_of_plugins('backup/converter');
foreach ($plugins as $name) {
$filename = $restore ? 'lib.php' : 'backuplib.php';
$classuf = $restore ? '_converter' : '_export_converter';
$classfile = "{$CFG->dirroot}/backup/converter/{$name}/{$filename}";
$classname = "{$name}{$classuf}";
$zip_contents = "{$name}_zip_contents";
$store_backup_file = "{$name}_store_backup_file";
$convert = "{$name}_backup_convert";
if (!file_exists($classfile)) {
throw new convert_helper_exception('converter_classfile_not_found', $classfile);
}
require_once $classfile;
if (!class_exists($classname)) {
throw new convert_helper_exception('converter_classname_not_found', $classname);
}
if (call_user_func($classname . '::is_available')) {
if (!$restore) {
if (!class_exists($zip_contents)) {
throw new convert_helper_exception('converter_classname_not_found', $zip_contents);
}
if (!class_exists($store_backup_file)) {
throw new convert_helper_exception('converter_classname_not_found', $store_backup_file);
}
if (!class_exists($convert)) {
throw new convert_helper_exception('converter_classname_not_found', $convert);
}
}
$converters[] = $name;
}
}
return $converters;
}
开发者ID:evltuma,项目名称:moodle,代码行数:46,代码来源:convert_helper.class.php
示例15: referentiel_get_import_export_formats
/**
* Get list of available import or export formats
* @param string $type 'import' if import list, otherwise export list assumed
* @return array sorted list of import/export formats available
**/
function referentiel_get_import_export_formats($type, $classprefix = "")
{
global $CFG;
$fileformats = get_list_of_plugins("blocks/referentiel/format");
$fileformatnames = array();
require_once "{$CFG->dirroot}/blocks/referentiel/format.php";
foreach ($fileformats as $key => $fileformat) {
$format_file = $CFG->dirroot . "/blocks/referentiel/format/{$fileformat}/format.php";
if (file_exists($format_file)) {
require_once $format_file;
} else {
continue;
}
if ($classprefix) {
$classname = $classprefix . "_" . $fileformat;
} else {
$classname = "rformat_{$fileformat}";
}
$format_class = new $classname();
if ($type == 'import') {
$provided = $format_class->provide_import();
} else {
$provided = $format_class->provide_export();
}
if ($provided) {
$formatname = get_string($fileformat, "referentiel");
if ($formatname == "[[{$fileformat}]]") {
$formatname = $fileformat;
// Just use the raw folder name
}
$fileformatnames[$fileformat] = $formatname;
}
}
natcasesort($fileformatnames);
return $fileformatnames;
}
开发者ID:jfruitet,项目名称:moodle_referentiel,代码行数:41,代码来源:import_export_lib.php
示例16: feedback_load_feedback_items
/**
* load the available item plugins from given subdirectory of $CFG->dirroot
* the default is "mod/feedback/item"
*
* @global object
* @param string $dir the subdir
* @return array pluginnames as string
*/
function feedback_load_feedback_items($dir = 'mod/feedback/item') {
global $CFG;
$names = get_list_of_plugins($dir);
$ret_names = array();
foreach ($names as $name) {
require_once($CFG->dirroot.'/'.$dir.'/'.$name.'/lib.php');
if (class_exists('feedback_item_'.$name)) {
$ret_names[] = $name;
}
}
return $ret_names;
}
开发者ID:numbas,项目名称:moodle,代码行数:21,代码来源:lib.php
示例17: admin_settingpage
// speedup for non-admins, add all caps used on this page
$temp = new admin_settingpage('manageauths', get_string('authsettings', 'admin'));
$temp->add(new admin_setting_manageauths());
$temp->add(new admin_setting_heading('manageauthscommonheading', get_string('commonsettings', 'admin'), ''));
$temp->add(new admin_setting_special_registerauth());
$temp->add(new admin_setting_configselect('guestloginbutton', get_string('guestloginbutton', 'auth'), get_string('showguestlogin', 'auth'), '1', array('0' => get_string('hide'), '1' => get_string('show'))));
$temp->add(new admin_setting_configtext('alternateloginurl', get_string('alternateloginurl', 'auth'), get_string('alternatelogin', 'auth', htmlspecialchars($CFG->wwwroot . '/login/index.php')), ''));
$temp->add(new admin_setting_configtext('forgottenpasswordurl', get_string('forgottenpasswordurl', 'auth'), get_string('forgottenpassword', 'auth'), ''));
$temp->add(new admin_setting_configtextarea('auth_instructions', get_string('instructions', 'auth'), get_string('authinstructions', 'auth'), ''));
$temp->add(new admin_setting_configtext('allowemailaddresses', get_string('allowemailaddresses', 'admin'), get_string('configallowemailaddresses', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('denyemailaddresses', get_string('denyemailaddresses', 'admin'), get_string('configdenyemailaddresses', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configcheckbox('verifychangedemail', get_string('verifychangedemail', 'admin'), get_string('configverifychangedemail', 'admin'), 1));
$temp->add(new admin_setting_configtext('recaptchapublickey', get_string('recaptchapublickey', 'admin'), get_string('configrecaptchapublickey', 'admin'), '', PARAM_NOTAGS));
$temp->add(new admin_setting_configtext('recaptchaprivatekey', get_string('recaptchaprivatekey', 'admin'), get_string('configrecaptchaprivatekey', 'admin'), '', PARAM_NOTAGS));
$ADMIN->add('authsettings', $temp);
if ($auths = get_list_of_plugins('auth')) {
$authsenabled = get_enabled_auth_plugins();
$authbyname = array();
foreach ($auths as $auth) {
$strauthname = auth_get_plugin_title($auth);
$authbyname[$strauthname] = $auth;
}
ksort($authbyname);
foreach ($authbyname as $strauthname => $authname) {
if (file_exists($CFG->dirroot . '/auth/' . $authname . '/settings.php')) {
// do not show disabled auths in tree, keep only settings link on manage page
$settings = new admin_settingpage('authsetting' . $authname, $strauthname, 'moodle/site:config', !in_array($authname, $authsenabled));
if ($ADMIN->fulltree) {
include $CFG->dirroot . '/auth/' . $authname . '/settings.php';
}
// TODO: finish implementation of common settings - locking, etc.
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:31,代码来源:users.php
示例18: admin_settingpage
<?php
// $Id$
// "locations" settingpage
$temp = new admin_settingpage('locationsettings', get_string('locationsettings', 'admin'));
$options = get_list_of_timezones();
$options[99] = get_string('serverlocaltime');
$temp->add(new admin_setting_configselect('timezone', get_string('timezone', 'admin'), get_string('configtimezone', 'admin'), 99, $options));
$options[99] = get_string('timezonenotforced', 'admin');
$temp->add(new admin_setting_configselect('forcetimezone', get_string('forcetimezone', 'admin'), get_string('helpforcetimezone', 'admin'), 99, $options));
$options = get_list_of_countries();
$options[0] = get_string('choose') . '...';
$temp->add(new admin_setting_configselect('country', get_string('country', 'admin'), get_string('configcountry', 'admin'), 0, $options));
$iplookups = array();
if ($plugins = get_list_of_plugins('iplookup')) {
foreach ($plugins as $plugin) {
$iplookups[$plugin] = $plugin;
}
}
$temp->add(new admin_setting_configselect('iplookup', get_string('iplookup', 'admin'), get_string('configiplookup', 'admin'), 'hostip', $iplookups));
$ADMIN->add('location', $temp);
$ADMIN->add('location', new admin_externalpage('timezoneimport', get_string('updatetimezones', 'admin'), "{$CFG->wwwroot}/{$CFG->admin}/timezoneimport.php"));
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:22,代码来源:location.php
示例19: tabobject
//if( isteacher( $game->course, $USER->id)){
global $USER;
$sesskey = $USER->sesskey;
$url = "{$CFG->wwwroot}/course/mod.php?update={$cm->id}&return=true&sesskey={$sesskey}";
$row[] = new tabobject('edit', $url, get_string('edit'));
//}
}
if ($currenttab == 'info' && count($row) == 1) {
// Don't show only an info tab (e.g. to students).
} else {
$tabs[] = $row;
}
if ($currenttab == 'reports' and isset($mode)) {
$inactive[] = 'reports';
$activated[] = 'reports';
$allreports = get_list_of_plugins("mod/game/report");
$reportlist = array('overview');
// Standard reports we want to show first
foreach ($allreports as $report) {
if (!in_array($report, $reportlist)) {
$reportlist[] = $report;
}
}
$row = array();
$currenttab = '';
foreach ($reportlist as $report) {
$row[] = new tabobject($report, "{$CFG->wwwroot}/mod/game/report.php?q={$game->id}&mode={$report}", get_string($report, 'game'));
if ($report == $mode) {
$currenttab = $report;
}
}
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:31,代码来源:tabs.php
示例20: array
$options = array();
foreach ($modules as $module) {
$options[$module] = get_string("enrolname", "enrol_{$module}");
}
asort($options);
print_simple_box(get_string('configenrolmentplugins', 'admin'), 'center', '700');
echo "<form {$CFG->frametarget} id=\"enrolmenu\" method=\"post\" action=\"enrol.php\">";
echo "<div>";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"" . sesskey() . "\" />";
$table = new stdClass();
$table->head = array(get_string('name'), get_string('enable'), get_string('default'), $str->settings);
$table->align = array('left', 'center', 'center', 'center');
$table->size = array('60%', '', '', '15%');
$table->width = '700';
$table->data = array();
$modules = get_list_of_plugins("enrol");
$enabledplugins = explode(',', $CFG->enrol_plugins_enabled);
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 . '"';
if (in_array($module, $enabledplugins)) {
$enable .= ' checked="checked"';
}
if ($module == 'manual') {
$enable .= ' disabled="disabled"';
}
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:31,代码来源:enrol.php
注:本文中的get_list_of_plugins函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论