mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 14:02:32 +02:00
fixed a few spelling errors in /admin/
This commit is contained in:
parent
820f107a10
commit
eab8ed9fb7
@ -106,7 +106,7 @@
|
||||
if (empty($version)) {
|
||||
$version = $env_version;
|
||||
}
|
||||
///Iterate over each version, adding bigged than current
|
||||
///Iterate over each version, adding bigger than current
|
||||
foreach ($env_versions as $env_version) {
|
||||
if (version_compare(normalize_version($current_version), $env_version, '<')) {
|
||||
$versions[$env_version] = $env_version;
|
||||
|
@ -19,7 +19,7 @@
|
||||
* Fetches language packages from download.moodle.org server
|
||||
*
|
||||
* Language packages are available at http://download.moodle.org/langpack/2.0/
|
||||
* in ZIP format together with a file languages.md5 containing thir hashes
|
||||
* in ZIP format together with a file languages.md5 containing their hashes
|
||||
* and meta info.
|
||||
* Locally, language packs are saved into $CFG->dataroot/lang/
|
||||
*
|
||||
|
@ -63,7 +63,7 @@ fclose($stdin);
|
||||
*
|
||||
* Very useful for perl-like error-handling:
|
||||
*
|
||||
* do_somethting() or mdie("Something went wrong");
|
||||
* do_something() or mdie("Something went wrong");
|
||||
*
|
||||
* @param string $msg Error message
|
||||
* @param integer $errorcode Error code to emit
|
||||
|
@ -74,7 +74,7 @@ if (($action == 'edit') || ($action == 'new')) {
|
||||
}
|
||||
// This branch is where you process validated data.
|
||||
if ($action == 'edit') {
|
||||
$instance->set_config($fromform);
|
||||
$instance->set_config((array)$fromform);
|
||||
$instance->save();
|
||||
} else {
|
||||
portfolio_static_function($plugin, 'create_instance', $plugin, $fromform->name, $fromform);
|
||||
|
@ -47,7 +47,7 @@ add_to_log(SITEID, "admin", "report capability", "report/capability/index.php?ca
|
||||
admin_externalpage_setup('reportcapability');
|
||||
echo $OUTPUT->header();
|
||||
|
||||
// Prepare the list of capabilites to choose from
|
||||
// Prepare the list of capabilities to choose from
|
||||
$allcapabilities = fetch_context_capabilities($systemcontext);
|
||||
$capabilitychoices = array();
|
||||
foreach ($allcapabilities as $cap) {
|
||||
@ -117,7 +117,7 @@ if ($capability) {
|
||||
// Prepare some empty arrays to hold the data we are about to compute.
|
||||
foreach ($contexts as $conid => $con) {
|
||||
$contexts[$conid]->children = array();
|
||||
$contexts[$conid]->rolecapabilites = array();
|
||||
$contexts[$conid]->rolecapabilities = array();
|
||||
}
|
||||
|
||||
// Put the contexts into a tree structure.
|
||||
@ -128,15 +128,15 @@ if ($capability) {
|
||||
}
|
||||
}
|
||||
|
||||
// Put the role capabilites into the context tree.
|
||||
// Put the role capabilities into the context tree.
|
||||
foreach ($rolecaps as $rolecap) {
|
||||
$contexts[$rolecap->contextid]->rolecapabilites[$rolecap->roleid] = $rolecap->permission;
|
||||
$contexts[$rolecap->contextid]->rolecapabilities[$rolecap->roleid] = $rolecap->permission;
|
||||
}
|
||||
|
||||
// Fill in any missing rolecaps for the system context.
|
||||
foreach ($cleanedroleids as $roleid) {
|
||||
if (!isset($contexts[$systemcontext->id]->rolecapabilites[$roleid])) {
|
||||
$contexts[$systemcontext->id]->rolecapabilites[$roleid] = CAP_INHERIT;
|
||||
if (!isset($contexts[$systemcontext->id]->rolecapabilities[$roleid])) {
|
||||
$contexts[$systemcontext->id]->rolecapabilities[$roleid] = CAP_INHERIT;
|
||||
}
|
||||
}
|
||||
|
||||
@ -183,12 +183,12 @@ function print_report_tree($contextid, $contexts, $allroles) {
|
||||
echo '<h3><a href="' . $url . '" title="' . $title . '">', print_context_name($contexts[$contextid]), '</a></h3>';
|
||||
|
||||
// If there are any role overrides here, print them.
|
||||
if (!empty($contexts[$contextid]->rolecapabilites)) {
|
||||
if (!empty($contexts[$contextid]->rolecapabilities)) {
|
||||
$rowcounter = 0;
|
||||
echo '<table class="generaltable rolecaps"><tbody>';
|
||||
foreach ($allroles as $role) {
|
||||
if (isset($contexts[$contextid]->rolecapabilites[$role->id])) {
|
||||
$permission = $contexts[$contextid]->rolecapabilites[$role->id];
|
||||
if (isset($contexts[$contextid]->rolecapabilities[$role->id])) {
|
||||
$permission = $contexts[$contextid]->rolecapabilities[$role->id];
|
||||
echo '<tr class="r' . ($rowcounter % 2) . '"><th class="cell">', $role->name,
|
||||
'</th><td class="cell">' . $strpermissions[$permission] . '</td></tr>';
|
||||
$rowcounter++;
|
||||
|
@ -399,7 +399,7 @@ class report_customlang_menu implements renderable {
|
||||
/**
|
||||
* Returns the menu items
|
||||
*
|
||||
* @return array (string)key => (object)[->(string)title ->(moodl_url)url ->(string)method]
|
||||
* @return array (string)key => (object)[->(string)title ->(moodle_url)url ->(string)method]
|
||||
*/
|
||||
public function get_items() {
|
||||
return $this->items;
|
||||
|
@ -21,7 +21,7 @@ echo $OUTPUT->header();
|
||||
// Log.
|
||||
add_to_log(SITEID, "admin", "report questioninstances", "report/questioninstances/index.php?qtype=$requestedqtype", $requestedqtype);
|
||||
|
||||
// Prepare the list of capabilites to choose from
|
||||
// Prepare the list of capabilities to choose from
|
||||
$qtypechoices = array();
|
||||
foreach ($QTYPES as $qtype) {
|
||||
$qtypechoices[$qtype->name()] = $qtype->local_name();
|
||||
|
@ -272,7 +272,7 @@ function report_security_check_unsecuredataroot($detailed=false) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies disaplying of errors - problem for lib files and 3rd party code
|
||||
* Verifies displaying of errors - problem for lib files and 3rd party code
|
||||
* because we can not disable debugging in these scripts (they do not include config.php)
|
||||
* @param bool $detailed
|
||||
* @return object result
|
||||
@ -302,7 +302,7 @@ function report_security_check_displayerrors($detailed=false) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies open profiles - originaly open by default, not anymore because spammer abused it a lot
|
||||
* Verifies open profiles - originally open by default, not anymore because spammer abused it a lot
|
||||
* @param bool $detailed
|
||||
* @return object result
|
||||
*/
|
||||
@ -803,7 +803,7 @@ function report_security_check_riskbackup($detailed=false) {
|
||||
|
||||
// list of users that are able to backup personal info
|
||||
// note: "sc" is context where is role assigned,
|
||||
// "c" is context where is role overriden or system context if in role definition
|
||||
// "c" is context where is role overridden or system context if in role definition
|
||||
$params = array('capability'=>'moodle/backup:userinfo', 'permission'=>CAP_ALLOW, 'context1'=>CONTEXT_COURSE, 'context2'=>CONTEXT_COURSE);
|
||||
|
||||
$sqluserinfo = "
|
||||
|
@ -27,12 +27,12 @@ M.report_spamcleaner = {
|
||||
context.Y.io(context.me+'?delall=yes&sesskey='+M.cfg.sesskey, cfg);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
del_user: function(obj, id) {
|
||||
var context = M.report_spamcleaner;
|
||||
|
||||
if (context.Y == null) {
|
||||
// not initilised yet
|
||||
// not initialised yet
|
||||
return;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ M.report_spamcleaner = {
|
||||
context.row.parentNode.removeChild(context.row);
|
||||
context.row = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -374,11 +374,11 @@ class permissions_table extends capability_table_base {
|
||||
*/
|
||||
abstract class capability_table_with_risks extends capability_table_base {
|
||||
protected $allrisks;
|
||||
protected $allpermissions; // We don't need perms ourself, but all our subclasses do.
|
||||
protected $allpermissions; // We don't need perms ourselves, but all our subclasses do.
|
||||
protected $strperms; // Language string cache.
|
||||
protected $risksurl; // URL in moodledocs about risks.
|
||||
protected $riskicons = array(); // Cache to avoid regenerating the HTML for each risk icon.
|
||||
/** The capabilities to highlight as default/interited. */
|
||||
/** The capabilities to highlight as default/inherited. */
|
||||
protected $parentpermissions;
|
||||
protected $displaypermissions;
|
||||
protected $permissions;
|
||||
@ -438,7 +438,7 @@ abstract class capability_table_with_risks extends capability_table_base {
|
||||
|
||||
foreach ($this->capabilities as $cap) {
|
||||
if ($cap->locked || $this->skip_row($cap)) {
|
||||
/// The user is not allowed to change the permission for this capapability
|
||||
/// The user is not allowed to change the permission for this capability
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -536,7 +536,7 @@ abstract class capability_table_with_risks extends capability_table_base {
|
||||
|
||||
/**
|
||||
* As well as tracking the permissions information about the role we are creating
|
||||
* or editing, we aslo track the other infromation about the role. (This class is
|
||||
* or editing, we also track the other information about the role. (This class is
|
||||
* starting to be more and more like a formslib form in some respects.)
|
||||
*/
|
||||
class define_role_table_advanced extends capability_table_with_risks {
|
||||
@ -901,7 +901,7 @@ class view_role_definition_table extends define_role_table_advanced {
|
||||
|
||||
class override_permissions_table_advanced extends capability_table_with_risks {
|
||||
protected $strnotset;
|
||||
protected $haslockedcapabiltites = false;
|
||||
protected $haslockedcapabilities = false;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -925,7 +925,7 @@ class override_permissions_table_advanced extends capability_table_with_risks {
|
||||
foreach ($this->capabilities as $capid => $cap) {
|
||||
if (!is_safe_capability($cap)) {
|
||||
$this->capabilities[$capid]->locked = true;
|
||||
$this->haslockedcapabiltites = true;
|
||||
$this->haslockedcapabilities = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -934,13 +934,13 @@ class override_permissions_table_advanced extends capability_table_with_risks {
|
||||
protected function load_parent_permissions() {
|
||||
global $DB;
|
||||
|
||||
/// Get the capabiltites from the parent context, so that can be shown in the interface.
|
||||
/// Get the capabilities from the parent context, so that can be shown in the interface.
|
||||
$parentcontext = get_context_instance_by_id(get_parent_contextid($this->context));
|
||||
$this->parentpermissions = role_context_capabilities($this->roleid, $parentcontext);
|
||||
}
|
||||
|
||||
public function has_locked_capabiltites() {
|
||||
return $this->haslockedcapabiltites;
|
||||
public function has_locked_capabilities() {
|
||||
return $this->haslockedcapabilities;
|
||||
}
|
||||
|
||||
protected function add_permission_cells($capability) {
|
||||
@ -1308,7 +1308,7 @@ abstract class role_allow_role_page {
|
||||
/// Load the current settings
|
||||
$this->allowed = array();
|
||||
foreach ($this->roles as $role) {
|
||||
// Make an array $role->id => false. This is probalby too clever for its own good.
|
||||
// Make an array $role->id => false. This is probably too clever for its own good.
|
||||
$this->allowed[$role->id] = array_combine(array_keys($this->roles), array_fill(0, count($this->roles), false));
|
||||
}
|
||||
$rs = $DB->get_recordset($this->tablename);
|
||||
@ -1474,9 +1474,9 @@ class role_allow_switch_page extends role_allow_role_page {
|
||||
* some blocks) then return a potential_assignees_below_course object. Otherwise
|
||||
* return a potential_assignees_course_and_above.
|
||||
*
|
||||
* @param $context a context.
|
||||
* @param $name passed to user selector constructor.
|
||||
* @param $options to user selector constructor.
|
||||
* @param stdClass $context a context.
|
||||
* @param string $name passed to user selector constructor.
|
||||
* @param array $options to user selector constructor.
|
||||
* @return user_selector_base an appropriate user selector.
|
||||
*/
|
||||
function roles_get_potential_user_selector($context, $name, $options) {
|
||||
|
@ -147,7 +147,7 @@ if (!empty($capabilities)) {
|
||||
echo html_writer::tag('p', get_string('highlightedcellsshowinherit', 'role'), array('class'=>'overridenotice'));
|
||||
|
||||
$overridestable->display();
|
||||
if ($overridestable->has_locked_capabiltites()) {
|
||||
if ($overridestable->has_locked_capabilities()) {
|
||||
echo '<p class="overridenotice">' . get_string('safeoverridenotice', 'role') . "</p>\n";
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ foreach ($contexts as $conid => $con) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Put the role capabilites into the context tree.
|
||||
/// Put the role capabilities into the context tree.
|
||||
foreach ($roleassignments as $ra) {
|
||||
$contexts[$ra->contextid]->roleassignments[$ra->roleid] = $ra;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ if (!during_initial_install()) { //do not use during installation
|
||||
|
||||
$ADMIN->add('frontpage', new admin_externalpage('frontpagerestore', get_string('frontpagerestore', 'admin'), $CFG->wwwroot.'/files/index.php?id='.SITEID.'&wdir=/backupdata', 'moodle/restore:restorecourse', false, $frontpagecontext));
|
||||
|
||||
$questioncapabilites = array(
|
||||
$questioncapabilities = array(
|
||||
'moodle/question:add',
|
||||
'moodle/question:editmine',
|
||||
'moodle/question:editall',
|
||||
@ -78,7 +78,7 @@ if (!during_initial_install()) { //do not use during installation
|
||||
'moodle/question:viewall',
|
||||
'moodle/question:movemine',
|
||||
'moodle/question:moveall');
|
||||
$ADMIN->add('frontpage', new admin_externalpage('frontpagequestions', get_string('frontpagequestions', 'admin'), $CFG->wwwroot.'/question/edit.php?courseid='.SITEID, $questioncapabilites, false, $frontpagecontext));
|
||||
$ADMIN->add('frontpage', new admin_externalpage('frontpagequestions', get_string('frontpagequestions', 'admin'), $CFG->wwwroot.'/question/edit.php?courseid='.SITEID, $questioncapabilities, false, $frontpagecontext));
|
||||
|
||||
if (!empty($SITE->legacyfiles) and $SITE->legacyfiles === 2) {
|
||||
$ADMIN->add('frontpage', new admin_externalpage('sitefiles', get_string('sitelegacyfiles'), $CFG->wwwroot . '/files/index.php?id=' . SITEID, 'moodle/course:managefiles', false, $frontpagecontext));
|
||||
|
@ -23,7 +23,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
array('student', 'teacher', 'editingteacher')));
|
||||
|
||||
$max_upload_choices = get_max_upload_sizes();
|
||||
// maxbytes set to 0 will allow the maxium server lmit for uploads
|
||||
// maxbytes set to 0 will allow the maximum server limit for uploads
|
||||
$max_upload_choices[0] = get_string('serverlimit', 'admin');
|
||||
$temp->add(new admin_setting_configselect('maxbytes', get_string('maxbytes', 'admin'), get_string('configmaxbytes', 'admin'), 0, $max_upload_choices));
|
||||
// 100MB
|
||||
|
@ -484,7 +484,7 @@ if ($formdata = $mform->is_cancelled()) {
|
||||
}
|
||||
}
|
||||
|
||||
// do not update record if new auth plguin does not exist!
|
||||
// do not update record if new auth plugin does not exist!
|
||||
if (!in_array($existinguser->auth, $availableauths)) {
|
||||
$upt->track('auth', get_string('userautherror', 'error', $existinguser->auth), 'error');
|
||||
$upt->track('status', $strusernotupdated, 'error');
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* script for bulk user multy enrol operations
|
||||
* script for bulk user multi enrol operations
|
||||
*/
|
||||
|
||||
die('this needs to be rewritten to use new enrol framework, sorry'); //TODO: MDL-24064
|
||||
|
@ -74,7 +74,7 @@ class external_service_form extends moodleform {
|
||||
$currentcapabilityexist = true;
|
||||
}
|
||||
|
||||
// Prepare the list of capabilites to choose from
|
||||
// Prepare the list of capabilities to choose from
|
||||
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
$allcapabilities = fetch_context_capabilities($systemcontext);
|
||||
$capabilitychoices = array();
|
||||
@ -200,7 +200,7 @@ class web_service_token_form extends moodleform {
|
||||
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
foreach ($services as $serviceid => $service) {
|
||||
//check that the user has the required capability
|
||||
//(only for generation by the profil page)
|
||||
//(only for generation by the profile page)
|
||||
if (empty($data->nouserselection)
|
||||
|| empty($service->requiredcapability)
|
||||
|| has_capability($service->requiredcapability, $systemcontext, $USER->id)) {
|
||||
|
@ -29,7 +29,7 @@ require_once($CFG->dirroot . '/webservice/lib.php');
|
||||
|
||||
admin_externalpage_setup('externalservice');
|
||||
|
||||
//Desactivate the 'Edit service' navigation node, and use the main 'Service' navigation node
|
||||
//Deactivate the 'Edit service' navigation node, and use the main 'Service' navigation node
|
||||
$node = $PAGE->settingsnav->find('externalservice', navigation_node::TYPE_SETTING);
|
||||
$newnode = $PAGE->settingsnav->find('externalservices', navigation_node::TYPE_SETTING);
|
||||
if ($node && $newnode) {
|
||||
@ -76,7 +76,7 @@ if ($mform->is_cancelled()) {
|
||||
$servicedata->id = $webservicemanager->add_external_service($servicedata);
|
||||
add_to_log(1, 'webservice', 'add', $returnurl, get_string('addservice', 'webservice', $servicedata));
|
||||
|
||||
//redirecto to the 'add functions to service' page
|
||||
//redirect to the 'add functions to service' page
|
||||
$addfunctionpage = new moodle_url(
|
||||
$CFG->wwwroot . '/' . $CFG->admin . '/webservice/service_functions.php',
|
||||
array('id' => $servicedata->id));
|
||||
|
@ -51,7 +51,7 @@ class XMLDBAction {
|
||||
|
||||
var $postaction; //Action to execute at the end of the invoke script
|
||||
|
||||
var $sesskey_protected; // Actions must be protected by sesskey mechanishm
|
||||
var $sesskey_protected; // Actions must be protected by sesskey mechanism
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -105,7 +105,7 @@ class XMLDBAction {
|
||||
}
|
||||
|
||||
/**
|
||||
* getPostAtion method, returns the action to launch after executing
|
||||
* getPostAction method, returns the action to launch after executing
|
||||
* another one
|
||||
*/
|
||||
function getPostAction() {
|
||||
@ -211,7 +211,7 @@ class XMLDBAction {
|
||||
* the view_structure_php and view_table_php actions
|
||||
*
|
||||
* @param xmldb_structure structure object containing all the info
|
||||
* @return string PHP code to be used to stabilish a savepoint
|
||||
* @return string PHP code to be used to mark a reached savepoint
|
||||
*/
|
||||
function upgrade_savepoint_php($structure) {
|
||||
|
||||
|
@ -149,7 +149,7 @@ abstract class XMLDBCheckAction extends XMLDBAction {
|
||||
if (!$dbman->table_exists($xmldb_table)) {
|
||||
continue;
|
||||
}
|
||||
/// Fetch metadata from phisical DB. All the columns info.
|
||||
/// Fetch metadata from physical DB. All the columns info.
|
||||
if (!$metacolumns = $DB->get_columns($xmldb_table->getName())) {
|
||||
//// Skip table if no metacolumns is available for it
|
||||
continue;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* reporting about the ones not phisically implemented as BIGINTs
|
||||
* reporting about the ones not physically implemented as BIGINTs
|
||||
* and providing one SQL script to fix all them. Also, under MySQL,
|
||||
* it performs one check of signed bigints. MDL-11038
|
||||
*
|
||||
@ -89,7 +89,7 @@ class check_bigints extends XMLDBCheckAction {
|
||||
$metacolumn = $metacolumns[$xmldb_field->getName()];
|
||||
/// Going to check this field in DB
|
||||
$o.=' <li>' . $this->str['field'] . ': ' . $xmldb_field->getName() . ' ';
|
||||
/// Detect if the phisical field is wrong and, under mysql, check for incorrect signed fields too
|
||||
/// Detect if the physical field is wrong and, under mysql, check for incorrect signed fields too
|
||||
if ($metacolumn->type != $this->correct_type || ($this->dbfamily == 'mysql' && $xmldb_field->getUnsigned() && !$metacolumn->unsigned)) {
|
||||
$o.='<font color="red">' . $this->str['wrong'] . '</font>';
|
||||
/// Add the wrong field to the list
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
/**
|
||||
* This class will compare all the indexes found in the XMLDB definitions
|
||||
* with the phisical DB implementation, reporting about all the missing
|
||||
* with the physical DB implementation, reporting about all the missing
|
||||
* indexes to be created to be 100% ok.
|
||||
*
|
||||
* @package xmldb-editor
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
/**
|
||||
* This class verifies all the data introduced when editing a field for correctness,
|
||||
* peforming changes / displaying errors depending of the results.
|
||||
* performing changes / displaying errors depending of the results.
|
||||
*
|
||||
* @package xmldb-editor
|
||||
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
@ -109,7 +109,7 @@ class edit_field_save extends XMLDBAction {
|
||||
|
||||
$errors = array(); /// To store all the errors found
|
||||
|
||||
/// Perform some automatic asumptions
|
||||
/// Perform some automatic assumptions
|
||||
if ($sequence) {
|
||||
$unsigned = true;
|
||||
$notnull = true;
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
/**
|
||||
* This class verifies all the data introduced when editing an index for correctness,
|
||||
* peforming changes / displaying errors depending of the results.
|
||||
* performing changes / displaying errors depending of the results.
|
||||
*
|
||||
* @package xmldb-editor
|
||||
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
@ -135,7 +135,7 @@ class edit_index_save extends XMLDBAction {
|
||||
if ($tablekeys) {
|
||||
foreach ($tablekeys as $tablekey) {
|
||||
$keyfieldsarr = $tablekey->getFields();
|
||||
/// Compare both arrays, looking for diferences
|
||||
/// Compare both arrays, looking for differences
|
||||
$diferences = array_merge(array_diff($fieldsarr, $keyfieldsarr), array_diff($keyfieldsarr, $fieldsarr));
|
||||
if (empty($diferences)) {
|
||||
$errors[] = $this->str['fieldsusedinkey'];
|
||||
@ -143,7 +143,7 @@ class edit_index_save extends XMLDBAction {
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Check that there isn't any index using exactlt the same fields
|
||||
/// Check that there isn't any index using exactly the same fields
|
||||
$tableindexes = $table->getIndexes();
|
||||
if ($tableindexes) {
|
||||
foreach ($tableindexes as $tableindex) {
|
||||
@ -152,7 +152,7 @@ class edit_index_save extends XMLDBAction {
|
||||
continue;
|
||||
}
|
||||
$indexfieldsarr = $tableindex->getFields();
|
||||
/// Compare both arrays, looking for diferences
|
||||
/// Compare both arrays, looking for differences
|
||||
$diferences = array_merge(array_diff($fieldsarr, $indexfieldsarr), array_diff($indexfieldsarr, $fieldsarr));
|
||||
if (empty($diferences)) {
|
||||
$errors[] = $this->str['fieldsusedinindex'];
|
||||
@ -177,7 +177,7 @@ class edit_index_save extends XMLDBAction {
|
||||
/// Continue if we aren't under errors
|
||||
if (empty($errors)) {
|
||||
/// If there is one name change, do it, changing the prev and next
|
||||
/// atributes of the adjacent fields
|
||||
/// attributes of the adjacent fields
|
||||
if ($indexparam != $name) {
|
||||
$index->setName($name);
|
||||
if ($index->getPrevious()) {
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
/**
|
||||
* This class verifies all the data introduced when editing a key for correctness,
|
||||
* peforming changes / displaying errors depending of the results.
|
||||
* performing changes / displaying errors depending of the results.
|
||||
*
|
||||
* @package xmldb-editor
|
||||
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
|
@ -106,7 +106,7 @@ class new_table extends XMLDBAction {
|
||||
$table->addField($field);
|
||||
$table->addKey($key);
|
||||
|
||||
/// Finally, add the whole retroffited table to the structure
|
||||
/// Finally, add the whole retrofitted table to the structure
|
||||
/// in the place specified
|
||||
$structure->addTable($table);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class will display the XML for one table bein edited
|
||||
* This class will display the XML for one table being edited
|
||||
*
|
||||
* @package xmldb-editor
|
||||
* @copyright 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
|
@ -31,7 +31,7 @@ require_once($CFG->dirroot.'/enrol/authorize/localfuncs.php');
|
||||
require_once($CFG->libdir.'/eventslib.php');
|
||||
require_once('import_form.php');
|
||||
|
||||
/// Require capabilites
|
||||
/// Require capabilities
|
||||
require_login();
|
||||
require_capability('enrol/authorize:uploadcsv', get_context_instance(CONTEXT_SYSTEM));
|
||||
|
||||
|
@ -61,13 +61,13 @@ abstract class filter_local_settings_form extends moodleform {
|
||||
|
||||
/**
|
||||
* Override this method to add your form controls.
|
||||
* @param $mform the form we are building. $this->_form, but passed in for convinience.
|
||||
* @param $mform the form we are building. $this->_form, but passed in for convenience.
|
||||
*/
|
||||
abstract protected function definition_inner($mform);
|
||||
|
||||
/**
|
||||
* Override this method to save the settings to the database. The default
|
||||
* implementation will probalby be sufficient for most simple cases.
|
||||
* implementation will probably be sufficient for most simple cases.
|
||||
* @param object $data the form data that was submitted.
|
||||
*/
|
||||
public function save_changes($data) {
|
||||
|
@ -2283,7 +2283,7 @@ class admin_setting_configselect extends admin_setting {
|
||||
* @param string $name unique ascii name, either 'mysetting' for settings that in config, or 'myplugin/mysetting' for ones in config_plugins.
|
||||
* @param string $visiblename localised
|
||||
* @param string $description long localised info
|
||||
* @param string $defaultsetting
|
||||
* @param string|int $defaultsetting
|
||||
* @param array $choices array of $value=>$label for each selection
|
||||
*/
|
||||
public function __construct($name, $visiblename, $description, $defaultsetting, $choices) {
|
||||
|
@ -258,7 +258,7 @@ class csv_import_reader {
|
||||
*
|
||||
* @return array suitable for selection box
|
||||
*/
|
||||
function get_delimiter_list() {
|
||||
static function get_delimiter_list() {
|
||||
global $CFG;
|
||||
$delimiters = array('comma'=>',', 'semicolon'=>';', 'colon'=>':', 'tab'=>'\\t');
|
||||
if (isset($CFG->CSV_DELIMITER) and strlen($CFG->CSV_DELIMITER) === 1 and !in_array($CFG->CSV_DELIMITER, $delimiters)) {
|
||||
@ -273,7 +273,7 @@ class csv_import_reader {
|
||||
* @param string separator name
|
||||
* @return string delimiter char
|
||||
*/
|
||||
function get_delimiter($delimiter_name) {
|
||||
static function get_delimiter($delimiter_name) {
|
||||
global $CFG;
|
||||
switch ($delimiter_name) {
|
||||
case 'colon': return ':';
|
||||
|
@ -2072,7 +2072,7 @@ function put_records_csv($file, $records, $table = NULL) {
|
||||
* then delete it. If $location does not exist to start, that is not
|
||||
* considered an error.
|
||||
*
|
||||
* @param $location the path to remove.
|
||||
* @param string $location the path to remove.
|
||||
* @return bool
|
||||
*/
|
||||
function fulldelete($location) {
|
||||
|
@ -4630,8 +4630,8 @@ function &get_mailer($action='get') {
|
||||
* @global string
|
||||
* @global string IdentityProvider(IDP) URL user hits to jump to mnet peer.
|
||||
* @uses SITEID
|
||||
* @param user $user A {@link $USER} object
|
||||
* @param user $from A {@link $USER} object
|
||||
* @param stdClass $user A {@link $USER} object
|
||||
* @param stdClass $from A {@link $USER} object
|
||||
* @param string $subject plain text subject line of the email
|
||||
* @param string $messagetext plain text version of the message
|
||||
* @param string $messagehtml complete html version of the message (optional)
|
||||
@ -5291,7 +5291,7 @@ function get_max_upload_file_size($sitebytes=0, $coursebytes=0, $modulebytes=0)
|
||||
* @param int $sizebytes Set maximum size
|
||||
* @param int $coursebytes Current course $course->maxbytes (in bytes)
|
||||
* @param int $modulebytes Current module ->maxbytes (in bytes)
|
||||
* @return int
|
||||
* @return array
|
||||
*/
|
||||
function get_max_upload_sizes($sitebytes=0, $coursebytes=0, $modulebytes=0) {
|
||||
global $CFG;
|
||||
|
@ -123,7 +123,7 @@ class popup_action extends component_action {
|
||||
/**
|
||||
* Constructor
|
||||
* @param string $event DOM event
|
||||
* @param moodle_url $url A moodle_url object, required if no jsfunction is given
|
||||
* @param moodle_url|string $url A moodle_url object, required if no jsfunction is given
|
||||
* @param string $method 'post' or 'get'
|
||||
* @param array $params An array of popup parameters
|
||||
* @return void
|
||||
|
@ -47,7 +47,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/// Check capabilites and block settings
|
||||
/// Check capabilities and block settings
|
||||
if (!$attemptobj->is_preview_user()) {
|
||||
$attemptobj->require_capability('mod/quiz:attempt');
|
||||
if (empty($attemptobj->get_quiz()->showblocks)) {
|
||||
|
@ -51,7 +51,7 @@ if ($attemptobj->get_userid() != $USER->id) {
|
||||
quiz_error($attemptobj->get_quiz(), 'notyourattempt');
|
||||
}
|
||||
|
||||
/// Check capabilites.
|
||||
/// Check capabilities.
|
||||
if (!$attemptobj->is_preview_user()) {
|
||||
$attemptobj->require_capability('mod/quiz:attempt');
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ if ($quizobj->is_preview_user() && $forcenew) {
|
||||
}
|
||||
|
||||
|
||||
/// Check capabilites.
|
||||
/// Check capabilities.
|
||||
if (!$quizobj->is_preview_user()) {
|
||||
$quizobj->require_capability('mod/quiz:attempt');
|
||||
}
|
||||
|
@ -37,7 +37,7 @@
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
require_capability('mod/quiz:view', $context);
|
||||
|
||||
/// Cache some other capabilites we use several times.
|
||||
/// Cache some other capabilities we use several times.
|
||||
$canattempt = has_capability('mod/quiz:attempt', $context);
|
||||
$canreviewmine = has_capability('mod/quiz:reviewmyattempts', $context);
|
||||
$canpreview = has_capability('mod/quiz:preview', $context);
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Sets up the tabs used by the scorm pages based on the users capabilites.
|
||||
* Sets up the tabs used by the scorm pages based on the users capabilities.
|
||||
*
|
||||
* @author Dan Marsden and others.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
|
@ -477,7 +477,7 @@ abstract class user_selector_base {
|
||||
* text of the message depends on whether the search term is non-blank.
|
||||
*
|
||||
* @param string $search the search term, as passed in to the find users method.
|
||||
* @param unknown_type $count the number of users that currently match.
|
||||
* @param int $count the number of users that currently match.
|
||||
* @return array in the right format to return from the find_users method.
|
||||
*/
|
||||
protected function too_many_results($search, $count) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user