Commit eab8ed9f authored by Petr Skoda's avatar Petr Skoda
Browse files

fixed a few spelling errors in /admin/

parent 820f107a
......@@ -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.'&amp;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');
......
<?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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment