]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10870 All files updated to new build_navigation() method.
authornicolasconnault <nicolasconnault>
Fri, 17 Aug 2007 07:25:47 +0000 (07:25 +0000)
committernicolasconnault <nicolasconnault>
Fri, 17 Aug 2007 07:25:47 +0000 (07:25 +0000)
14 files changed:
admin/dbperformance.php
admin/index.php
admin/mnet/delete.html
admin/register.php
admin/roles/assign.php
admin/roles/override.php
admin/roles/tabs.php
admin/stickyblocks.php
admin/timezone.php
lang/en_utf8/mnet.php
lib/adminlib.php
lib/weblib.php
mod/assignment/lib.php
mod/resource/config.html

index 77316aca5d52cabff5455339d50a3518c0f5b091..e3080608ce192236a972acd8b234523c460455c7 100644 (file)
     $stradministration = get_string("administration");
     $site = get_site();
 
+    $navigation = build_navigation(array(
+        array('name'=>$stradministration, 'link'=>'index.php', 'type'=>'misc'),
+        array('name'=>$strdatabaseperformance, 'link'=>null, 'type'=>'misc')));
     if (!empty($topframe)) {
-        print_header("$site->shortname: $strdatabaseperformance", "$site->fullname", 
-                     "<a $CFG->frametarget href=\"index.php\">$stradministration</a> -> Database performance");
+        print_header("$site->shortname: $strdatabaseperformance", "$site->fullname", $navigation);
         exit;
     }
 
index b5a4b1d919b4425b8895d3e1418f13edc81d0fc8..5c5ca295051232280a21a0f5b7e299aebe271bc9 100644 (file)
         error_reporting($CFG->debug);
         if (empty($agreelicense)) {
             $strlicense = get_string('license');
-            print_header($strlicense, $strlicense, $strlicense, "", "", false, "&nbsp;", "&nbsp;");
+            $navigation = build_navigation(array(array('name'=>$strlicense, 'link'=>null, 'type'=>'misc')));
+            print_header($strlicense, $strlicense, $navigation, "", "", false, "&nbsp;", "&nbsp;");
             print_heading("<a href=\"http://moodle.org\">Moodle</a> - Modular Object-Oriented Dynamic Learning Environment");
             print_heading(get_string('copyrightnotice'));
             print_box(text_to_html(get_string('gpl')), 'copyrightnotice');
         }
         if (empty($confirmrelease)) {
             $strcurrentrelease = get_string("currentrelease");
-            print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, "&nbsp;", "&nbsp;");
+            $navigation = build_navigation(array(array('name'=>$strcurrentrelease, 'link'=>null, 'type'=>'misc')));
+            print_header($strcurrentrelease, $strcurrentrelease, $navigation, "", "", false, "&nbsp;", "&nbsp;");
             print_heading("Moodle $release");
             print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'generalbox boxaligncenter boxwidthwide');
             echo '<form action="index.php"><div>';
 
         $strdatabasesetup    = get_string("databasesetup");
         $strdatabasesuccess  = get_string("databasesuccess");
-        print_header($strdatabasesetup, $strdatabasesetup, $strdatabasesetup,
+        $navigation = build_navigation(array(array('name'=>$strdatabasesetup, 'link'=>null, 'type'=>'misc')));
+        print_header($strdatabasesetup, $strdatabasesetup, $navigation,
                         "", upgrade_get_javascript(), false, "&nbsp;", "&nbsp;");
     /// return to original debugging level
         $CFG->debug = $origdebug;
 
     /// Both old .sql files and new install.xml are supported
     /// But we prioritise install.xml (XMLDB) if present
-    
+
         change_db_encoding(); // first try to change db encoding to utf8
         if (!setup_is_unicodedb()) {
             // If could not convert successfully, throw error, and prevent installation
-            print_error('unicoderequired', 'admin');  
+            print_error('unicoderequired', 'admin');
         }
-    
+
         $status = false;
         if (file_exists("$CFG->libdir/db/install.xml")) {
             $status = install_from_xmldb_file("$CFG->libdir/db/install.xml"); //New method
             }
 
             if (empty($confirmupgrade)) {
-                print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
+                $navigation = build_navigation(array(array('name'=>$strdatabasechecking, 'link'=>null, 'type'=>'misc')));
+                print_header($strdatabasechecking, $stradministration, $navigation,
                         "", "", false, "&nbsp;", "&nbsp;");
 
                 notice_yesno(get_string('upgradesure', 'admin', $a->newversion), 'index.php?confirmupgrade=1', 'index.php');
 
             } else if (empty($confirmrelease)){
                 $strcurrentrelease = get_string("currentrelease");
-                print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, "&nbsp;", "&nbsp;");
+                $navigation = build_navigation(array(array('name'=>$strcurrentrelease, 'link'=>null, 'type'=>'misc')));
+                print_header($strcurrentrelease, $strcurrentrelease, $navigation, "", "", false, "&nbsp;", "&nbsp;");
                 print_heading("Moodle $release");
                 print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'));
 
                 require_once($CFG->libdir.'/environmentlib.php');
                 print_heading(get_string('environment', 'admin'));
                 if (!check_moodle_environment($release, $environment_results, true)) {
-                    notice_yesno(get_string('environmenterrorupgrade', 'admin'), 
+                    notice_yesno(get_string('environmenterrorupgrade', 'admin'),
                                  'index.php?confirmupgrade=1&confirmrelease=1', 'index.php');
                 } else {
                     notify(get_string('environmentok', 'admin'), 'notifysuccess');
                 die;
             } else {
                 $strdatabasesuccess  = get_string("databasesuccess");
-                print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
+                $navigation = build_navigation(array(array('name'=>$strdatabasesuccess, 'link'=>null, 'type'=>'misc')));
+                print_header($strdatabasechecking, $stradministration, $navigation,
                         "", upgrade_get_javascript(), false, "&nbsp;", "&nbsp;");
 
             /// return to original debugging level
                 upgrade_log_start();
 
             /// Upgrade current language pack if we can
-                upgrade_language_pack();   
+                upgrade_language_pack();
 
                 print_heading($strdatabasechecking);
                 $db->debug=true;
                     }
                     // update core events
                     events_update_definition();
-                    
+
                     require_once($CFG->libdir.'/statslib.php');
                     if (!stats_upgrade_for_roles_wrapper()) {
                         notify('Couldn\'t upgrade the stats tables to use the new roles system');
index bb11f2e288441440d1a1a8e6a16434040e31ba18..973231e4a56e2dee4662df68ef157ed25ccbcb29 100644 (file)
@@ -1,7 +1,10 @@
 <?php
-print_header("$site->shortname: $strmnetsettings", "$site->fullname",
-             '<a href="'.$CFG->wwwroot.'/admin/index.php">'.$stradministration.'</a> -> '.
-             '<a href="'.$CFG->wwwroot.'/admin/mnet/index.php">'.get_string('mnetsettings', 'mnet').'</a> -> Delete host');
+$navlinks = array();
+$navlinks[] = array('name' => $stradministration, 'link' => $CFG->wwwroot.'/admin/index.php', 'type' => 'misc');
+$navlinks[] = array('name' => get_string('mnetsettings', 'mnet'), 'link' => $CFG->wwwroot.'/admin/mnet/index.php', 'type' => 'misc');
+$navlinks[] = array('name' => get_string('deletehost', 'mnet'), 'link' => null, 'type' => 'misc');
+$navigation = build_navigation($navlinks);
+print_header("$site->shortname: $strmnetsettings", "$site->fullname", $navigation);
 
 print_heading(get_string('mnetsettings', 'mnet'));
 ?>
index cd5fea53cfe33f457409d0b6bd183e1e4a293292..ce558f4824b0c0d33fcc1bbd9f9fc51dea5ef74b 100644 (file)
     $stradministration = get_string("administration");
     $strregistration = get_string("registration");
     $strregistrationinfo = get_string("registrationinfo");
-
-    print_header("$site->shortname: $strregistration", $site->fullname, 
-                 "<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> $strregistration");
+    $navlinks = array();
+    $navlinks[] = array('name' => $stradministration, 'link' => "../$CFG->admin/index.php", 'type' => 'misc');
+    $navlinks[] = array('name' => $strregistration, 'link' => null, 'type' => 'misc');
+    $navigation = build_navigation($navlinks);
+    print_header("$site->shortname: $strregistration", $site->fullname, $navigation);
 
     print_heading($strregistration);
 
     echo '<div class="fitemtitle"><label>URL</label></div>';
     echo '<div class="felement ftext">'.$CFG->wwwroot.'</div>';
     echo '</div>';
-            
+
     echo '<div class="fitem">';
     echo '<div class="fitemtitle"><label>'.get_string("currentversion").'</label></div>';
     echo '<div class="felement ftext">'."$CFG->release ($CFG->version)".'</div>';
     echo '</div>';
-            
+
     echo '<div class="fitem">';
     echo '<div class="fitemtitle"><label for="sitename">'.get_string("fullsitename").'</label></div>';
     echo '<div class="felement ftext">';
     unset($options);
     echo '</div>';
     echo '</div>';
-            
+
     echo '<div class="fitem">';
     echo '<div class="fitemtitle"><label>'.get_string("statistics")."<br />(".get_string("notpublic").')'.'</label></div>';
     echo '<div class="felement ftext">';
     echo '<br />';
 
     // total number of role assignments
-    $count = count_records('role_assignments'); 
+    $count = count_records('role_assignments');
     echo get_string('roleassignments', 'role').": ".$count;
     echo "<input type=\"hidden\" name=\"roleassignments\" value=\"$count\" />\n";
     echo '<br />';
     // first find all distinct roles with mod/course:update
     // please change the name and strings to something appropriate to reflect the new data collected
     $sql = "SELECT COUNT(DISTINCT u.id)
-            FROM {$CFG->prefix}role_capabilities rc, 
+            FROM {$CFG->prefix}role_capabilities rc,
                  {$CFG->prefix}role_assignments ra,
                  {$CFG->prefix}user u
             WHERE (rc.capability = 'moodle/course:update' or rc.capability='moodle/site:doanything')
                    AND rc.roleid = ra.roleid
                    AND u.id = ra.userid";
-    
+
     $count = count_records_sql($sql);
     echo get_string("teachers").": ".$count;
     echo "<input type=\"hidden\" name=\"courseupdaters\" value=\"$count\" />\n";
     echo "<input type=\"hidden\" name=\"resources\" value=\"$count\" />\n";
     echo '</div>';
     echo '</div>';
-            
+
     echo '<div class="fitem">';
     echo '<div class="fitemtitle"><label for="adminname">'.get_string("administrator").'</label></div>';
     echo '<div class="felement ftext">';
index b1d507144bc2766cf5a80ef3f47b49d54e847726..7cb22c5b2ad2fe723f4e6d1c6d839fba758e7b5d 100755 (executable)
@@ -90,7 +90,7 @@
     $timeformat = get_string('strftimedate');
     $today = time();
     $today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), 0, 0, 0);
-    
+
     $basemenu[0] = get_string('startdate') . ' (' . userdate($course->startdate, $timeformat) . ')';
     if ($course->enrollable != 2 || ($course->enrolstartdate == 0 || $course->enrolstartdate <= $today) && ($course->enrolenddate == 0 || $course->enrolenddate > $today)) {
         $basemenu[3] = get_string('today') . ' (' . userdate($today, $timeformat) . ')' ;
             $basemenu[5] = get_string('courseenrolenddate') . ' (' . userdate($course->enrolenddate, $timeformat) . ')';
         }
     }
-    
+
 /// Make sure this user can assign that role
 
     if ($roleid) {
 
     if ($context->contextlevel == CONTEXT_USER) {
         /// course header
+        $navlinks = array();
         if ($courseid != SITEID) {
-            print_header("$fullname", "$fullname",
-                     "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
-                      <a href=\"$CFG->wwwroot/user/index.php?id=$course->id\">$strparticipants</a> -> <a href=\"$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid\">$fullname</a> ->".$straction,
-                      "", "", true, "&nbsp;", navmenu($course));
+            $navlinks[] = array('name' => $course->shortname, 'link' => "$CFG->wwwroot/course/view.php?id=$course->id", 'type' => 'course');
+            $navlinks[] = array('name' => $strparticipants, 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'misc');
+            $navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
+            $navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
+            $navigation = build_navigation($navlinks);
+
+            print_header("$fullname", "$fullname", $navigation, "", "", true, "&nbsp;", navmenu($course));
 
         /// site header
         } else {
-            print_header("$course->fullname: $fullname", $course->fullname,
-                        "<a href=\"$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid\">$fullname</a> -> $straction", "", "", true, "&nbsp;", navmenu($course));
+            $navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
+            $navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
+            $navigation = build_navigation($navlinks);
+            print_header("$course->fullname: $fullname", $course->fullname, $navigation, "", "", true, "&nbsp;", navmenu($course));
         }
 
         $showroles = 1;
                             $timestart = $course->enrolenddate;
                             break;
                     }
-                    
+
                     if($extendperiod > 0) {
                         $timeend = $timestart + $extendperiod;
                     } else {
     if ($context->contextlevel==CONTEXT_SYSTEM) {
         print_box(get_string('globalroleswarning', 'role'));
     }
-    
+
     if ($roleid) {        /// prints a form to swap roles
 
     /// Get all existing participants in this context.
index d5de485abb4c238161f8ab94eb8bf96298f82a56..78c7fa116fc01a2a319e379a9307aa6b696f7901 100755 (executable)
                  continue;
             }
 
-            if (isset($localoverrides[$capname])) {    
-                // Something exists, so update it               
+            if (isset($localoverrides[$capname])) {
+                // Something exists, so update it
                 assign_capability($capname, $value, $roleid, $context->id, true);
             } else { // insert a record
                 if ($value != CAP_INHERIT) {    // Ignore inherits
 /// Print the header and tabs
 
     if ($context->contextlevel == CONTEXT_USER) {
-
+        $navlinks = array();
         /// course header
         if ($course->id != SITEID) {
-            print_header("$fullname", "$fullname",
-                     "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
-                      <a href=\"$CFG->wwwroot/user/index.php?id=$course->id\">$strparticipants</a> -> <a href=\"$CFG->wwwroot/user/view.php?id=$userid&amp;course=$course->id\">$fullname</a> -> $straction",
-                      "", "", true, "&nbsp;", navmenu($course));
+            $navlinks[] = array('name' => $course->shortname, 'link' => "$CFG->wwwroot/course/view.php?id=$course->id", 'type' => 'course');
+            $navlinks[] = array('name' => $strparticipants, 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'misc');
+            $navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
+            $navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
+            $navigation = build_navigation($navlinks);
+            print_header("$fullname", "$fullname", $navigation, "", "", true, "&nbsp;", navmenu($course));
 
         /// site header
         } else {
-            print_header("$course->fullname: $fullname", $course->fullname,
-                        "<a href=\"$CFG->wwwroot/user/view.php?id=$userid&amp;course=$course->id\">$fullname</a> -> $straction", "", "", true, "&nbsp;", navmenu($course));
+            $navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&amp;course=$courseid", 'type' => 'misc');
+            $navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
+            $navigation = build_navigation($navlinks);
+            print_header("$course->fullname: $fullname", $course->fullname, $navigation, "", "", true, "&nbsp;", navmenu($course));
         }
         $showroles = 1;
         $currenttab = 'override';
index 4b81efb5e58c7dd997caaae8ffbeaddf621918ac..63347c24e522baf005490cc476d074e563bebde8 100755 (executable)
@@ -13,7 +13,10 @@ if ($currenttab != 'update') {
 
         case CONTEXT_SYSTEM:
             $stradministration = get_string('administration');
-            print_header($SITE->fullname, "$SITE->fullname","<a href=\"../index.php\">$stradministration</a> -> $straction");
+            $navlinks[] = array('name' => $stradministration, 'link' => '../index.php', 'type' => 'misc');
+            $navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
+            $navigation = build_navigation($navlinks);
+            print_header($SITE->fullname, "$SITE->fullname", $navigation);
             break;
 
         case CONTEXT_PERSONAL:
index 6ce5f055bffc372500fe2cf2159304f5797d86e0..d13b5e2c38661a7717eefdc6a5367254c0a77bf8 100644 (file)
@@ -1,20 +1,20 @@
 <?PHP // $Id$
-    
+
     require_once('../config.php');
     require_once($CFG->dirroot.'/my/pagelib.php');
     require_once($CFG->dirroot.'/lib/pagelib.php');
     require_once($CFG->dirroot.'/lib/blocklib.php');
-    
+
     if (!empty($THEME->customcorners)) {
         require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
     }
-    
+
     $pt  = optional_param('pt', null, PARAM_SAFEDIR); //alhanumeric and -
 
     $pagetypes = array(PAGE_MY_MOODLE => array('id' => PAGE_MY_MOODLE,
                                               'lib' => '/my/pagelib.php',
                                               'name' => get_string('mymoodle','admin')),
-                       PAGE_COURSE_VIEW => array('id' => PAGE_COURSE_VIEW, 
+                       PAGE_COURSE_VIEW => array('id' => PAGE_COURSE_VIEW,
                                                 'lib' => '/lib/pagelib.php',
                                                 'name' => get_string('stickyblockscourseview','admin'))
                        // ... more?
     }
 
     require_login();
-  
+
     require_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM, SITEID));
 
     // first thing to do is print the dropdown menu
 
     $strtitle = get_string('stickyblocks','admin');
     $strheading = get_string('adminhelpstickyblocks');
-    
-    
+
+
 
     if (!empty($pt)) {
 
         require_once($CFG->dirroot.$pagetypes[$pt]['lib']);
-        
+
         define('ADMIN_STICKYBLOCKS',$pt);
-        
+
         $PAGE = page_create_object($pt, SITEID);
         $blocks = blocks_setup($PAGE,BLOCKS_PINNED_TRUE);
         $blocks_preferred_width = bounded_number(180, blocks_preferred_width($blocks[BLOCK_POS_LEFT]), 210);
 
-        print_header($strtitle,$strtitle,'<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/index.php">'.
-                     get_string('administration').'</a> -> '.$strtitle);
-    
+        $navlinks = array(array('name' => get_string('administration'),
+                                'link' => "$CFG->wwwroot/$CFG->admin/index.php",
+                                'type' => 'misc'));
+        $navlinks[] = array('name' => $strtitle, 'link' => null, 'type' => 'misc');
+        $navigation = build_navigation($navlinks);
+        print_header($strtitle,$strtitle,$navigation);
+
         echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
         echo '<tr valign="top">';
 
@@ -60,7 +64,7 @@
         echo '</td>';
         echo '<td valign="top" id="middle-column">';
         if (!empty($THEME->customcorners)) print_custom_corners_start();
-        
+
     } else {
         require_once($CFG->libdir.'/adminlib.php');
         admin_externalpage_setup('stickyblocks');
index 3c27e2f0847314709700ae92e5b03c7b23a0771d..73a9d24e6cb87ea15a3fffd031535d8ea6182579 100644 (file)
@@ -13,7 +13,7 @@
     $strusers = get_string("users");
     $strall = get_string("all");
 
-    print_header($strtimezone, $strtimezone, $strtimezone);
+    print_header($strtimezone, $strtimezone, build_navigation(array(array('name' => $strtimezone, 'link' => null, 'type' => 'misc'))));
 
     print_heading("");
 
index 5558041d5d1e5a29a3717c5d573d2613ac92463e..2335ced11e7dc9bca2c36f5ca54d9cf79e78579e 100644 (file)
@@ -16,8 +16,8 @@ $string['trustedhostsexplain']          = '<p>The trusted hosts mechanism allows
                                            is available for scripts to control Moodle behaviour and can be
                                            a very dangerous option to enable. If in doubt, keep it off.</p>
                                            <p>This is <strong>not</strong> needed for Moodle Networking.</p>
-                                           <p>To enable it, enter a list of IP addresses or networks, 
-                                           one on each line. 
+                                           <p>To enable it, enter a list of IP addresses or networks,
+                                           one on each line.
                                            Some examples:</p>'.
                                           'Your local host:<br />'.
                                           '127.0.0.1<br />'.
@@ -50,6 +50,7 @@ $string['selectahost']                  = 'Please select a remote Moodle host.';
 $string['selectaccesslevel']            = 'Please select an access level from the list.';
 $string['noaclentries']                 = 'No entries in the SSO access control list';
 $string['deleteaserver']                = 'Deleting a Server';
+$string['deletehost']                   = 'Delete host';
 $string['nosite']                       = 'Could not find site-level course';
 $string['postrequired']                 = 'The delete function requires a POST request.';
 $string['hostdeleted']                  = 'Ok - host deleted';
@@ -75,7 +76,7 @@ $string['expireyourkeyexplain']         = 'Moodle automatically rotates your key
                                           'key has been compromised. A replacement will be immediately automatically generated.<br />'.
                                           'Deleting this key will make it impossible for other Moodles to communicate with you, until you '.
                                           'manually contact each administrator and provide them with your new key.';
-$string['deleteoutoftime']              = 'Your 60-second window for deleting this key has expired. Please start again.'; 
+$string['deleteoutoftime']              = 'Your 60-second window for deleting this key has expired. Please start again.';
 $string['deletewrongkeyvalue']          = 'An error has occurred. If you were not trying to delete your server\'s SSL key, it is possible '.
                                           'you have been the subject of a malicious attack. No action has been taken.';
 
@@ -92,7 +93,7 @@ $string['forbidden-function']           = 'That function has not been enabled fo
 $string['forbidden-transport']          = 'The transport method you are trying to use is not permitted.';
 
 $string['registerallhosts']             = 'Register all hosts (<em>Hub mode</em>)';
-$string['registerallhostsexplain']      = 'You can choose to register all hosts that try to connect to you automatically. 
+$string['registerallhostsexplain']      = 'You can choose to register all hosts that try to connect to you automatically.
                                            This means that a record will appear in your hosts list for any '.
                                           'Moodle site that connects to you and requests your public key.<br />'.
                                           'You have the option below to configure services for \'All Hosts\' and by enabling some services there, you are able to provide '.
@@ -104,7 +105,7 @@ $string['ssl_acl_deny']                = 'SSO ACL: Deny user $a[0] from $a[1]';
 $string['enabled_for_all']              = '(This service has been enabled for all hosts).';
 $string['nosuchfile']                   = 'The file/function $a does not exist.';
 $string['nosuchfunction']               = 'Unable to locate function, or function prohibited for RPC.';
-$string['nosuchmodule']                 = 'The function was incorrectly addressed and could not be located. Please use the 
+$string['nosuchmodule']                 = 'The function was incorrectly addressed and could not be located. Please use the
 mod/modulename/lib/functionname format.';
 $string['nosuchpublickey']              = 'Unable to obtain public key for signature verification.';
 $string['nosuchservice']                = 'The RPC service is not running on this host.';
@@ -228,7 +229,7 @@ $string['logs'] = 'logs';
 $string['courses'] = 'courses';
 
 $string['enrolcourses_desc'] = 'Courses offered for remote enrolment by this host.';
-$string['enrolcourseenrol_desc'] = 'Enrol/unenrol users from this course using Moodle Network enrolments. 
+$string['enrolcourseenrol_desc'] = 'Enrol/unenrol users from this course using Moodle Network enrolments.
                                     Note that users may have been enrolled in this course via other enrolment
                                     methods if the remote hosts allows them. Such enrolments are listed under
                                     <em>Other enrolled users</em>';
index f3f65bb0c5a8f8a7c535a665ba52e58908b76c39..4e6ff72b89c1827f1bb90355cc82286b594aca10 100644 (file)
@@ -2784,6 +2784,9 @@ function admin_externalpage_setup($section) {
 
 }
 
+/**
+ * TODO document
+ */
 function admin_externalpage_print_header() {
 
     global $CFG, $PAGE, $SITE, $THEME;
@@ -2802,7 +2805,7 @@ function admin_externalpage_print_header() {
                                                BLOCK_L_MAX_WIDTH);
         $PAGE->print_header();
         echo '<table id="layout-table" summary=""><tr>';
-        
+
         $lt = (empty($THEME->layouttable)) ? array('left', 'middle', 'right') : $THEME->layouttable;
         foreach ($lt as $column) {
             $lt1[] = $column;
@@ -2817,12 +2820,12 @@ function admin_externalpage_print_header() {
         if (!empty($THEME->customcorners)) print_custom_corners_end();
         echo '</td>';
                 break;
-        
+
                 case 'middle':
         echo '<td id="middle-column">';
         if (!empty($THEME->customcorners)) print_custom_corners_start();
                 break;
-                
+
                 case 'right':
         if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT)) {
             echo '<td style="width: ' . $preferred_width_right . 'px;" id="right-column">';
@@ -2872,12 +2875,12 @@ function admin_externalpage_print_footer() {
         if (!empty($THEME->customcorners)) print_custom_corners_end();
         echo '</td>';
                 break;
-                
+
                 case 'middle':
         if (!empty($THEME->customcorners)) print_custom_corners_end();
         echo '</td>';
                 break;
-                
+
                 case 'right':
         if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT)) {
             echo '<td style="width: ' . $preferred_width_right . 'px;" id="right-column">';
index 8960daba841def605abe722473e493f06d39b41d..168467667abd925a3ac19b6a6667f00bc6881063 100644 (file)
@@ -2246,17 +2246,17 @@ function get_html_lang($dir = false) {
  * @uses $USER
  * @uses $CFG
  * @uses $SESSION
- * @param string $title Appears at the top of the window
- * @param string $heading Appears at the top of the page
- * @param string $navigation Premade navigation string (for use as breadcrumbs links)
- * @param string $focus Indicates form element to get cursor focus on load eg  inputform.password
- * @param string $meta Meta tags to be added to the header
+ * @param string  $title Appears at the top of the window
+ * @param string  $heading Appears at the top of the page
+ * @param array   $navigation Array of $navlinks arrays (keys: name, link, type) for use as breadcrumbs links
+ * @param string  $focus Indicates form element to get cursor focus on load eg  inputform.password
+ * @param string  $meta Meta tags to be added to the header
  * @param boolean $cache Should this page be cacheable?
- * @param string $button HTML code for a button (usually for module editing)
- * @param string $menu HTML code for a popup menu
+ * @param string  $button HTML code for a button (usually for module editing)
+ * @param string  $menu HTML code for a popup menu
  * @param boolean $usexml use XML for this page
- * @param string $bodytags This text will be included verbatim in the <body> tag (useful for onload() etc)
- * @param bool   $return If true, return the visible elements of the header instead of echoing them.
+ * @param string  $bodytags This text will be included verbatim in the <body> tag (useful for onload() etc)
+ * @param bool    $return If true, return the visible elements of the header instead of echoing them.
  */
 function print_header ($title='', $heading='', $navigation='', $focus='',
                        $meta='', $cache=true, $button='&nbsp;', $menu='',
@@ -4263,7 +4263,7 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
  */
 function use_html_editor($name='', $editorhidebuttons='', $id='') {
     global $THEME;
-    
+
     $editor = 'editor_'.md5($name); //name might contain illegal characters
     if ($id === '') {
         $id = 'edit-'.$name;
@@ -4274,7 +4274,7 @@ function use_html_editor($name='', $editorhidebuttons='', $id='') {
     echo "var config = $editor.config;\n";
 
     echo print_editor_config($editorhidebuttons);
-    
+
     if (empty($THEME->htmleditorpostprocess)) {
         if (empty($name)) {
             echo "\nHTMLArea.replaceAll($editor.config);\n";
@@ -6398,7 +6398,7 @@ function print_arrow($direction='up', $strsort=null, $return=false) {
     }
 }
 
-/** 
+/**
  * Returns boolean true if the current language is right-to-left (Hebrew, Arabic etc)
  *
  */
@@ -6420,8 +6420,8 @@ function right_to_left() {
  * @return string
  */
 function fix_align_rtl($align) {
-       if (!right_to_left()) { 
-        return $align; 
+       if (!right_to_left()) {
+        return $align;
     }
        if ($align=='left')  { return 'right'; }
        if ($align=='right') { return 'left'; }
index be84dafb2e93639b2e9908c2571e7efcbb4de449..fd24b3db3749709ff9707e5a28e5c2c545dc53a1 100644 (file)
@@ -98,7 +98,7 @@ class assignment_base {
             $this->navigation[] = array('name' => $this->strassignment, 'link' => '', 'type' => 'activityinstance');
             $navigation = build_navigation($this->navigation);
 
-            print_header($pagetitle, $this->course->fullname, "$this->navigation $this->strassignment",
+            print_header($pagetitle, $this->course->fullname, $this->navigation,
                          "", "", true, '', navmenu($this->course, $this->cm));
             notice(get_string("activityiscurrentlyhidden"), "$CFG->wwwroot/course/view.php?id={$this->course->id}");
         }
@@ -690,7 +690,7 @@ class assignment_base {
                       'grade'.$submission->userid, $buttontext, 450, 700, $buttontext, 'none', true, 'button'.$submission->userid);
             $output.= 'opener.document.getElementById("up'.$submission->userid.'").innerHTML="'.addslashes_js($button).'";';
         }
-    
+
         if (!empty($CFG->enableoutcomes) and empty($SESSION->flextable['mod-assignment-submissions']->collapse['outcomes'])) {
             if ($outcomes_data = grade_get_outcomes($this->course->id, 'mod', 'assignment', $this->assignment->id, $submission->userid)) {
                 foreach($outcomes_data as $n=>$data) {
@@ -2482,9 +2482,9 @@ function assignment_count_real_submissions($assignment, $groupid=0) {
         return count_records_sql("SELECT COUNT(DISTINCT gm.userid, gm.groupid)
                                      FROM {$CFG->prefix}assignment_submissions a,
                                           {$CFG->prefix}groups_members g
-                                    WHERE a.assignment = $assignment->id 
+                                    WHERE a.assignment = $assignment->id
                                       AND a.timemodified > 0
-                                      AND g.groupid = '$groupid' 
+                                      AND g.groupid = '$groupid'
                                       AND a.userid = g.userid ");
     } else {
         $cm = get_coursemodule_from_instance('assignment', $assignment->id);
index df1343dfd83e630424cab24d12d20456fe49203a..62c7080cd2a2733d9a6acdce39622d9078aa758f 100644 (file)
@@ -1,5 +1,5 @@
 <form method="post" action="module.php" id="form">
-<div">
+<div>
 <input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
 </div>