From 17e5635c36b4d32e50b9d3b7e2635963d60b8bae Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 8 Oct 2006 11:00:49 +0000 Subject: [PATCH] fixed 'capabilitities' typos and removed forgotten debug_print_backtrace() commited with MDL-6728 --- blocks/moodleblock.class.php | 2 +- lib/accesslib.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php index a7a41c3b26..c7faceb63a 100644 --- a/blocks/moodleblock.class.php +++ b/blocks/moodleblock.class.php @@ -413,7 +413,7 @@ class block_base { $errors[] = 'invalid_content_type'; $correct = false; } - //following selftest was not working when roles&capabilitites were used from block + //following selftest was not working when roles&capabilities were used from block /* if ($this->get_content() === NULL) { $errors[] = 'content_not_set'; $correct = false; diff --git a/lib/accesslib.php b/lib/accesslib.php index d5bf72b124..6c66f96ad1 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -939,7 +939,7 @@ function moodle_install_roles() { $guestrole = create_role(get_string('guest'), 'guest', get_string('guestdescription'), 'moodle/legacy:guest'); -/// Now is the correct moment to install capabilitites - after creation of legacy roles, but before assigning of roles +/// Now is the correct moment to install capabilities - after creation of legacy roles, but before assigning of roles if (!assign_capability('moodle/site:doanything', CAP_ALLOW, $adminrole, $systemcontext->id)) { error('Could not assign moodle/site:doanything to the admin role'); @@ -1164,7 +1164,6 @@ function create_context($contextlevel, $instanceid) { if (!$context = get_record('context','contextlevel',$contextlevel,'instanceid',$instanceid)) { if (!validate_context($contextlevel, $instanceid)) { debugging('Error: Invalid context creation request for level "'.s($contextlevel).'", instance "'.s($instanceid).'".'); - debug_print_backtrace(); return NULL; } $context = new object(); @@ -1882,7 +1881,7 @@ function update_capabilities($component='moodle') { if ($cachedcaps) { foreach ($cachedcaps as $cachedcap) { array_push($storedcaps, $cachedcap->name); - // update risk bitmasks in existing capabilitites if needed + // update risk bitmasks in existing capabilities if needed if (array_key_exists($cachedcap->name, $filecaps)) { if (!array_key_exists('riskbitmask', $filecaps[$cachedcap->name])) { $filecaps[$cachedcap->name]['riskbitmask'] = 0; // no risk if not specified @@ -2162,7 +2161,7 @@ function fetch_context_capabilities($context) { */ function fetch_context_independent_capabilities() { - //only CONTEXT_SYSTEM capabilitites here or it will break the hack in fetch_context_capabilities() + //only CONTEXT_SYSTEM capabilities here or it will break the hack in fetch_context_capabilities() $contextindependentcaps = array( 'moodle/site:accessallgroups' ); -- 2.39.5