Upgrading table to rename the context->aggregatelevel field which was

really bugging me.   Code should be a little bit more readable now.

Apologies to those with non-core code already using this field.
This commit is contained in:
moodler
2006-09-22 06:19:32 +00:00
parent b988fe5f94
commit aad2ba95d1
12 changed files with 83 additions and 71 deletions
+3 -3
View File
@@ -3,7 +3,7 @@
// Handles headers and tabs for the roles control at any level apart from SYSTEM level
if ($currenttab != 'update') {
switch ($context->aggregatelevel) {
switch ($context->contextlevel) {
case CONTEXT_SYSTEM:
$stradministration = get_string('administration');
@@ -104,9 +104,9 @@ if ($currenttab != 'update') {
}
if ($context->aggregatelevel != CONTEXT_SYSTEM) { // Print tabs for anything except SYSTEM context
if ($context->contextlevel != CONTEXT_SYSTEM) { // Print tabs for anything except SYSTEM context
if ($context->aggregatelevel == CONTEXT_MODULE) { // only show update button if module?
if ($context->contextlevel == CONTEXT_MODULE) { // only show update button if module?
$toprow[] = new tabobject('update', $CFG->wwwroot.'/course/mod.php?update='.
$context->instanceid.'&return=true&sesskey='.sesskey(), get_string('update'));