diff --git a/admin/environment.php b/admin/environment.php index 8042d943906..66ccbea55d1 100644 --- a/admin/environment.php +++ b/admin/environment.php @@ -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; diff --git a/admin/langimport.php b/admin/langimport.php index 61a1b092a03..891949d400e 100755 --- a/admin/langimport.php +++ b/admin/langimport.php @@ -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/ * diff --git a/admin/mailout-debugger.php b/admin/mailout-debugger.php index 97a2f91d581..d183fa4a7b8 100644 --- a/admin/mailout-debugger.php +++ b/admin/mailout-debugger.php @@ -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 diff --git a/admin/portfolio.php b/admin/portfolio.php index bb1522e0bb0..5cc5e7792fd 100644 --- a/admin/portfolio.php +++ b/admin/portfolio.php @@ -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); diff --git a/admin/report/capability/index.php b/admin/report/capability/index.php index a3d08520ee6..c6afaf39be2 100644 --- a/admin/report/capability/index.php +++ b/admin/report/capability/index.php @@ -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 '

', print_context_name($contexts[$contextid]), '

'; // If there are any role overrides here, print them. - if (!empty($contexts[$contextid]->rolecapabilites)) { + if (!empty($contexts[$contextid]->rolecapabilities)) { $rowcounter = 0; echo ''; 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 ''; $rowcounter++; diff --git a/admin/report/customlang/locallib.php b/admin/report/customlang/locallib.php index 5e219255375..bdd375af81b 100644 --- a/admin/report/customlang/locallib.php +++ b/admin/report/customlang/locallib.php @@ -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; diff --git a/admin/report/questioninstances/index.php b/admin/report/questioninstances/index.php index 6a206ebabe7..d69098280ff 100644 --- a/admin/report/questioninstances/index.php +++ b/admin/report/questioninstances/index.php @@ -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(); diff --git a/admin/report/security/lib.php b/admin/report/security/lib.php index ba70170c929..bb0be8a5e17 100644 --- a/admin/report/security/lib.php +++ b/admin/report/security/lib.php @@ -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 = " diff --git a/admin/report/spamcleaner/module.js b/admin/report/spamcleaner/module.js index f098e129084..dd0565c7099 100644 --- a/admin/report/spamcleaner/module.js +++ b/admin/report/spamcleaner/module.js @@ -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; } - } + } } } } diff --git a/admin/roles/lib.php b/admin/roles/lib.php index 68ece465e29..a42e7127ff9 100644 --- a/admin/roles/lib.php +++ b/admin/roles/lib.php @@ -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) { diff --git a/admin/roles/override.php b/admin/roles/override.php index de7e45d42ca..9cd3ce55672 100755 --- a/admin/roles/override.php +++ b/admin/roles/override.php @@ -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 '

' . get_string('safeoverridenotice', 'role') . "

\n"; } diff --git a/admin/roles/usersroles.php b/admin/roles/usersroles.php index a6e5da071cc..67c9ef21ef0 100644 --- a/admin/roles/usersroles.php +++ b/admin/roles/usersroles.php @@ -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; } diff --git a/admin/settings/frontpage.php b/admin/settings/frontpage.php index ac19592ffbb..8a615ecf73b 100644 --- a/admin/settings/frontpage.php +++ b/admin/settings/frontpage.php @@ -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)); diff --git a/admin/settings/security.php b/admin/settings/security.php index 4d0d6aae2e1..4209805932b 100644 --- a/admin/settings/security.php +++ b/admin/settings/security.php @@ -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 diff --git a/admin/uploaduser.php b/admin/uploaduser.php index cf5cb9fd731..f0b995b33bc 100755 --- a/admin/uploaduser.php +++ b/admin/uploaduser.php @@ -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'); diff --git a/admin/user/user_bulk_enrol.php b/admin/user/user_bulk_enrol.php index bd81d2bd362..10e39fc1ed0 100644 --- a/admin/user/user_bulk_enrol.php +++ b/admin/user/user_bulk_enrol.php @@ -1,6 +1,6 @@ $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)) { diff --git a/admin/webservice/service.php b/admin/webservice/service.php index 4338abb0ff7..f95f6e8db6a 100644 --- a/admin/webservice/service.php +++ b/admin/webservice/service.php @@ -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)); diff --git a/admin/xmldb/actions/XMLDBAction.class.php b/admin/xmldb/actions/XMLDBAction.class.php index 3a13faca525..f65e3a9beab 100644 --- a/admin/xmldb/actions/XMLDBAction.class.php +++ b/admin/xmldb/actions/XMLDBAction.class.php @@ -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) { diff --git a/admin/xmldb/actions/XMLDBCheckAction.class.php b/admin/xmldb/actions/XMLDBCheckAction.class.php index 6bec8d6a001..feadac741da 100644 --- a/admin/xmldb/actions/XMLDBCheckAction.class.php +++ b/admin/xmldb/actions/XMLDBCheckAction.class.php @@ -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; diff --git a/admin/xmldb/actions/check_bigints/check_bigints.class.php b/admin/xmldb/actions/check_bigints/check_bigints.class.php index 03a232e93c7..009d000db04 100644 --- a/admin/xmldb/actions/check_bigints/check_bigints.class.php +++ b/admin/xmldb/actions/check_bigints/check_bigints.class.php @@ -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.='
  • ' . $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.='' . $this->str['wrong'] . ''; /// Add the wrong field to the list diff --git a/admin/xmldb/actions/check_indexes/check_indexes.class.php b/admin/xmldb/actions/check_indexes/check_indexes.class.php index b52cc61734f..e38677a9091 100644 --- a/admin/xmldb/actions/check_indexes/check_indexes.class.php +++ b/admin/xmldb/actions/check_indexes/check_indexes.class.php @@ -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 diff --git a/admin/xmldb/actions/edit_field_save/edit_field_save.class.php b/admin/xmldb/actions/edit_field_save/edit_field_save.class.php index 88bda80db89..b762063bd7d 100644 --- a/admin/xmldb/actions/edit_field_save/edit_field_save.class.php +++ b/admin/xmldb/actions/edit_field_save/edit_field_save.class.php @@ -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; diff --git a/admin/xmldb/actions/edit_index_save/edit_index_save.class.php b/admin/xmldb/actions/edit_index_save/edit_index_save.class.php index 68f409fa9ca..afcdb22b733 100644 --- a/admin/xmldb/actions/edit_index_save/edit_index_save.class.php +++ b/admin/xmldb/actions/edit_index_save/edit_index_save.class.php @@ -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()) { diff --git a/admin/xmldb/actions/edit_key_save/edit_key_save.class.php b/admin/xmldb/actions/edit_key_save/edit_key_save.class.php index 3c8ee50e1bb..25f3f01095e 100644 --- a/admin/xmldb/actions/edit_key_save/edit_key_save.class.php +++ b/admin/xmldb/actions/edit_key_save/edit_key_save.class.php @@ -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} diff --git a/admin/xmldb/actions/new_table/new_table.class.php b/admin/xmldb/actions/new_table/new_table.class.php index b4f390583d3..da5440ed103 100644 --- a/admin/xmldb/actions/new_table/new_table.class.php +++ b/admin/xmldb/actions/new_table/new_table.class.php @@ -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); } diff --git a/admin/xmldb/actions/view_table_xml/view_table_xml.class.php b/admin/xmldb/actions/view_table_xml/view_table_xml.class.php index 65d959d8b99..36e96060d21 100644 --- a/admin/xmldb/actions/view_table_xml/view_table_xml.class.php +++ b/admin/xmldb/actions/view_table_xml/view_table_xml.class.php @@ -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} diff --git a/enrol/authorize/uploadcsv.php b/enrol/authorize/uploadcsv.php index 3f4b4f223a2..5b0c79eb895 100644 --- a/enrol/authorize/uploadcsv.php +++ b/enrol/authorize/uploadcsv.php @@ -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)); diff --git a/filter/local_settings_form.php b/filter/local_settings_form.php index 7c67b9fbdbc..f1d59bcb282 100644 --- a/filter/local_settings_form.php +++ b/filter/local_settings_form.php @@ -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) { diff --git a/lib/adminlib.php b/lib/adminlib.php index df80006ca79..3ffcebcb353 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -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) { diff --git a/lib/csvlib.class.php b/lib/csvlib.class.php index d81a46848a0..9cf39db8338 100644 --- a/lib/csvlib.class.php +++ b/lib/csvlib.class.php @@ -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 ':'; diff --git a/lib/filelib.php b/lib/filelib.php index 86657477c5b..f835c9273ea 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -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) { diff --git a/lib/moodlelib.php b/lib/moodlelib.php index fb06ba4a519..c72903505fd 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -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; diff --git a/lib/outputactions.php b/lib/outputactions.php index 6662f43902d..133cec63772 100644 --- a/lib/outputactions.php +++ b/lib/outputactions.php @@ -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 diff --git a/mod/quiz/attempt.php b/mod/quiz/attempt.php index 3c1a0d111a2..1172e1bfae5 100644 --- a/mod/quiz/attempt.php +++ b/mod/quiz/attempt.php @@ -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)) { diff --git a/mod/quiz/processattempt.php b/mod/quiz/processattempt.php index 14949477236..9dbb1d1e330 100644 --- a/mod/quiz/processattempt.php +++ b/mod/quiz/processattempt.php @@ -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'); } diff --git a/mod/quiz/startattempt.php b/mod/quiz/startattempt.php index aff98cd652e..68d9c5b3ea8 100644 --- a/mod/quiz/startattempt.php +++ b/mod/quiz/startattempt.php @@ -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'); } diff --git a/mod/quiz/view.php b/mod/quiz/view.php index f31ed8b1409..58f211442d0 100644 --- a/mod/quiz/view.php +++ b/mod/quiz/view.php @@ -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); diff --git a/mod/scorm/tabs.php b/mod/scorm/tabs.php index fe5cc2b93b2..f57ba3ae200 100644 --- a/mod/scorm/tabs.php +++ b/mod/scorm/tabs.php @@ -1,6 +1,6 @@
  • ', $role->name, '' . $strpermissions[$permission] . '