]> git.mjollnir.org Git - moodle.git/commitdiff
Changes to enable jumping between activity modules, using a new menu in
authormoodler <moodler>
Sun, 10 Nov 2002 07:37:15 +0000 (07:37 +0000)
committermoodler <moodler>
Sun, 10 Nov 2002 07:37:15 +0000 (07:37 +0000)
the upper-right corner.   Caution: Not well tested at this stage.

24 files changed:
course/lib.php
course/mod.php
course/social.php
course/topics.php
course/weeks.php
lang/en/moodle.php
lib/db/mysql.php
lib/db/mysql.sql
lib/moodlelib.php
lib/weblib.php
mod/assignment/view.php
mod/choice/view.php
mod/forum/view.php
mod/journal/view.php
mod/quiz/view.php
mod/resource/view.php
mod/survey/view.php
theme/standard/header.html
theme/standard/styles.css
theme/standardblue/styles.css
theme/standardgreen/styles.css
theme/standardlogo/styles.css
theme/standardred/styles.css
version.php

index 1343763413b04d2dd6f9ae4fc598a8e2a7bd7f3b..6da45412d4fbc8ca9946715919c8824feaa23e68 100644 (file)
@@ -384,6 +384,42 @@ function print_recent_activity($course) {
 }
 
 
+function get_array_of_activities($courseid) {
+// For a given course, returns an array of course activity objects 
+// Each item in the array contains he following properties:
+//  cm - course module id
+//  mod - name of the module (eg forum)
+//  section - the number of the section (eg week or topic)
+//  name - the name of the instance
+
+    $mod = array();
+
+    if (!$rawmods = get_records_sql("SELECT cm.*, m.name as modname
+                                     FROM modules m, course_modules cm
+                                     WHERE cm.course = '$courseid' 
+                                       AND cm.deleted = '0'
+                                       AND cm.module = m.id ") ) {
+        return NULL;
+    }
+
+    if ($sections = get_records("course_sections", "course", $courseid, "section ASC")) {
+       foreach ($sections as $section) {
+           if ($section->sequence) {
+               $sequence = explode(",", $section->sequence);
+               foreach ($sequence as $seq) {
+                   $mod[$seq]->cm = $rawmods[$seq]->id;
+                   $mod[$seq]->mod = $rawmods[$seq]->modname;
+                   $mod[$seq]->section = $section->section;
+                   $mod[$seq]->name = urlencode(get_field($rawmods[$seq]->modname, "name", "id", $rawmods[$seq]->instance));
+               }
+            }
+        }
+    }
+    return $mod;
+}
+
+
+
 
 function get_all_mods($courseid, &$mods, &$modnames, &$modnamesplural, &$modnamesused) {
 // Returns a number of useful structures for course displays
@@ -429,7 +465,7 @@ function get_all_categories() {
     return get_records_sql("SELECT * FROM course_categories ORDER by name");
 }
 
-function print_section($courseid, $section, $mods, $modnamesused, $absolute=false, $width="100%") {
+function print_section($course, $section, $mods, $modnamesused, $absolute=false, $width="100%") {
     global $CFG;
 
 
@@ -444,7 +480,7 @@ function print_section($courseid, $section, $mods, $modnamesused, $absolute=fals
             echo "<IMG SRC=\"$CFG->wwwroot/mod/$mod->modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\">";
             echo " <FONT SIZE=2><A TITLE=\"$mod->modfullname\"";
             echo "   HREF=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">$instancename</A></FONT>";
-            if (isediting($courseid)) {
+            if (isediting($course->id)) {
                 echo make_editing_buttons($mod->id, $absolute);
             }
             echo "<BR>\n";
index 5d48b09f4eec9f1e51c2ee4360b7c65635eba416..77908b7ac80c878930bc860d39bf48bbd17fc8f6 100644 (file)
 
         }
 
+        $modinfo = serialize(get_array_of_activities($mod->course));
+
+        if (!set_field("course", "modinfo", $modinfo, "id", $mod->course)) {
+            error("Could not cache module information!");
+        }
+
         if ($SESSION->returnpage) {
             $return = $SESSION->returnpage;
             unset($SESSION->returnpage);
index 334083e386e3f188fa9d737f7e6295d2e2fa69d4..4b2de15fe7848bd00085c2b709cdb0f3d3d6c1ca 100644 (file)
@@ -27,7 +27,7 @@
 
 /// Then, print all the available resources (Section 0)
       print_simple_box(get_string("resources"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
-      print_section($course->id, $sections[0], $mods, $modnamesused, true);
+      print_section($course, $sections[0], $mods, $modnamesused, true);
 
       if (isediting($course->id)) {
           echo "<DIV ALIGN=right>";
index 1436533ee5892709f25f726115a6847dc7c76c99..82df112dba5bbf3634ee46bae05b227e9558cf3f 100644 (file)
         $news = forum_get_course_forum($course->id, "news");
     }
 
+    $streditsummary = get_string("editsummary");
+    $stradd         = get_string("add");
+    $stractivities  = get_string("activities");
+
 
 /// Layout the whole page as three big columns.
     echo "<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 WIDTH=100%>";
@@ -68,7 +72,7 @@
             $modicon[] = "<IMG SRC=\"../mod/$modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
         }
     }
-    print_simple_box(get_string("activities"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
+    print_simple_box($stractivities, $align="CENTER", $width="100%", $color="$THEME->cellheading");
     print_side_block("", $moddata, "", $modicon);
 
 /// Print a form to search forums
@@ -87,8 +91,6 @@
 
     print_simple_box(get_string("topicoutline"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
     
-    $streditsummary = get_string("editsummary");
-    $stradd         = get_string("add");
 
 
     echo "<TABLE BORDER=0 CELLPADDING=8 CELLSPACING=0 WIDTH=100%>";
     
         echo text_to_html($thistopic->summary);
     
-        print_section($course->id, $thistopic, $mods, $modnamesused);
+        print_section($course, $thistopic, $mods, $modnamesused);
     
         if (isediting($course->id)) {
             echo "<DIV ALIGN=right>";
             popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&section=$topic&add=", 
-                        $modnames, "section$topic", "", "$stradd...", "mods", get_string("activities"));
+                        $modnames, "section$topic", "", "$stradd...", "mods", $stractivities);
             echo "</DIV>";
         }
     
 
         echo text_to_html($thissection->summary);
 
-        print_section($course->id, $thissection, $mods, $modnamesused);
+        print_section($course, $thissection, $mods, $modnamesused);
 
         if (isediting($course->id)) {
             echo "<DIV ALIGN=right>";
             popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&section=$section&add=", 
-                        $modnames, "section$section", "", "$stradd...", "mods", get_string("activities"));
+                        $modnames, "section$section", "", "$stradd...", "mods", $stractivities);
             echo "</DIV>";
         }
 
index 1db585b50dd1e68ad23b5072128c25881665f386..7faa92cfdf9ffb5fb09dfbfe4f0dc2db72ca3ad1 100644 (file)
     if ($course->newsitems) {
         $news = forum_get_course_forum($course->id, "news");
     }
+    
+    $streditsummary = get_string("editsummary");
+    $stradd         = get_string("add");
+    $stractivities  = get_string("activities");
 
 
 /// Layout the whole page as three big columns.
@@ -57,7 +61,7 @@
             $modicon[] = "<IMG SRC=\"../mod/$modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
         }
     }
-    print_simple_box(get_string("activities"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
+    print_simple_box($stractivities, $align="CENTER", $width="100%", $color="$THEME->cellheading");
     print_side_block("", $moddata, "", $modicon);
 
 /// Print a form to search forums
@@ -77,9 +81,6 @@
     echo "</TD><TD WIDTH=\"*\">";
 
     print_simple_box(get_string("weeklyoutline"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
-    
-    $streditsummary = get_string("editsummary");
-    $stradd         = get_string("add");
 
     echo "<TABLE BORDER=0 CELLPADDING=8 CELLSPACING=0 WIDTH=100%>";
 
     
         echo text_to_html($thisweek->summary);
     
-        print_section($course->id, $thisweek, $mods, $modnamesused);
+        print_section($course, $thisweek, $mods, $modnamesused);
 
         if (isediting($course->id)) {
             echo "<DIV ALIGN=right>";
             popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&section=$week&add=", 
-                        $modnames, "section$week", "", "$stradd...", "mods", get_string("activities"));
+                        $modnames, "section$week", "", "$stradd...", "mods", $stractivities);
             echo "</DIV>";
         }
 
 
         echo text_to_html($thisweek->summary);
 
-        print_section($course->id, $thisweek, $mods, $modnamesused);
+        print_section($course, $thisweek, $mods, $modnamesused);
 
         if (isediting($course->id)) {
             echo "<DIV ALIGN=right>";
             popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&section=$week&add=", 
-                        $modnames, "section$week", "", "$stradd...", "mods", get_string("activities"));
+                        $modnames, "section$week", "", "$stradd...", "mods", $stractivities);
             echo "</DIV>";
         }
 
index a8aa1c95e8fabf3b5c7ac622478fedde353acc8c..009f5b4e7bd45a88f8485582e3a66102cb0f0aa5 100644 (file)
@@ -223,6 +223,7 @@ $string['htmleditordisabledbrowser'] = "The Richtext editor is unavailable becau
 $string['htmlformat'] = "Pretty HTML format";
 $string['icqnumber'] = "ICQ number";
 $string['idnumber'] = "ID number";
+$string['jumpto'] = "Jump to...";
 $string['leavetokeep'] = "Leave blank to keep current password";
 $string['invalidlogin'] = "Invalid login, please try again";
 $string['invalidemail'] = "Invalid email address";
index 1807473fed0fa7317b2c797d1659938d165e2eb0..3801e236c4340e743e31ec879a9a08c2869dce39 100644 (file)
@@ -167,6 +167,22 @@ function main_upgrade($oldversion=0) {
         }
     }
 
+    if ($oldversion < 2002111003) {
+        execute_sql(" ALTER TABLE `course` ADD `modinfo` TEXT NOT NULL AFTER `format` ");
+        if ($courses = get_records_sql("SELECT * FROM course")) {
+            require_once("$CFG->dirroot/course/lib.php");
+            foreach ($courses as $course) {
+                
+                $modinfo = serialize(get_array_of_activities($course->id));
+
+                if (!set_field("course", "modinfo", $modinfo, "id", $course->id)) {
+                    notify("Could not cache module information for course '$course->fullname'!");
+                }
+            }
+        }
+    }
+
+
     return true;
 }
 
index 692e557cd8099f006edadc0a3f5527d7640bc897..53199240f3ed90324ef443cd935f853c00972be4 100644 (file)
@@ -35,6 +35,7 @@ CREATE TABLE `course` (
   `shortname` varchar(15) NOT NULL default '',
   `summary` text NOT NULL,
   `format` enum('weeks','social','topics') NOT NULL default 'weeks',
+  `modinfo` text NOT NULL,
   `newsitems` smallint(5) unsigned NOT NULL default '1',
   `teacher` varchar(100) NOT NULL default 'Teacher',
   `teachers` varchar(100) NOT NULL default 'Teachers',
index eb301d3ab1b4294e97d077b76eab8bd4186827e9..b07cc449f1944fe16f9df88a6724e1d729a27bc0 100644 (file)
 
 /// STANDARD WEB PAGE PARTS ///////////////////////////////////////////////////
 
-function print_header ($title="", $heading="", $navigation="", $focus="", $meta="", $cache=true, $button="") {
+function print_header ($title="", $heading="", $navigation="", $focus="", $meta="", $cache=true, $button="", $menu="") {
 // $title - appears top of window
 // $heading - appears top of page
 // $navigation - premade navigation string
 // $focus - indicates form element eg  inputform.password
 // $meta - meta tags in the header
 // $cache - should this page be cacheable?
-// $button - code for a button in the top-right
+// $button - HTML code for a button (usually for module editing)
+// $menu - HTML code for a popup menu 
     global $USER, $CFG, $THEME;
 
     if (file_exists("$CFG->dirroot/theme/$CFG->theme/styles.css")) {
@@ -31,11 +32,11 @@ function print_header ($title="", $heading="", $navigation="", $focus="", $meta=
         $navigation = "";
     }
 
-    if (!$button and $navigation) {
+    if (!$menu and $navigation) {
         if (isset($USER->id)) {
-            $button = "<FONT SIZE=2><A TARGET=_parent HREF=\"$CFG->wwwroot/login/logout.php\">".get_string("logout")."</A></FONT>";
+            $menu = "<FONT SIZE=2><A TARGET=_parent HREF=\"$CFG->wwwroot/login/logout.php\">".get_string("logout")."</A></FONT>";
         } else {
-            $button = "<FONT SIZE=2><A TARGET=_parent HREF=\"$CFG->wwwroot/login/index.php\">".get_string("login")."</A></FONT>";
+            $menu = "<FONT SIZE=2><A TARGET=_parent HREF=\"$CFG->wwwroot/login/index.php\">".get_string("login")."</A></FONT>";
         }
     }
 
@@ -386,6 +387,46 @@ function update_module_button($moduleid, $courseid, $string) {
 }
 
 
+function navmenu($course, $cm) {
+// Given a course and a (current) coursemodule
+// This function returns a small popup menu with all the 
+// course activity modules in it, as a navigation menu
+// The data is taken from the serialised array stored in 
+// the course record
+
+    global $CFG;
+
+    if ($course->format = 'weeks') {
+        $strsection = get_string("week");
+    } else {
+        $strsection = get_string("topic");
+    }
+
+    if (!$array = unserialize($course->modinfo)) {
+        return "";
+    }
+    $section = -1;
+    $selected = "";
+    foreach ($array as $mod) {
+        if ($mod->section > 0 and $section <> $mod->section) {
+            $menu[] = "-------------- $strsection $mod->section --------------";
+        }
+        $section = $mod->section;
+        $url = "$mod->mod/view.php?id=$mod->cm";
+        if ($cm->id == $mod->cm) {
+            $selected = $url;
+        }
+        $mod->name = urldecode($mod->name);
+        if (strlen($mod->name) > 55) {
+            $mod->name = substr($mod->name, 0, 50)."...";
+        }
+        $menu[$url] = $mod->name; 
+    }
+
+    return popup_form("$CFG->wwwroot/mod/", $menu, "navmenu", $selected, get_string("jumpto"), "", "", true);
+}   
+
+
 function print_date_selector($day, $month, $year, $currenttime=0) {
 // Currenttime is a default timestamp in GMT
 // Prints form items with the names $day, $month and $year
@@ -433,6 +474,7 @@ function make_timestamp($year, $month=1, $day=1, $hour=0, $minute=0, $second=0)
    return mktime((int)$hour,(int)$minute,(int)$second,(int)$month,(int)$day,(int)$year);
 }
 
+
 function format_time($totalsecs, $str=NULL) {
 // Given an amount of time in seconds, prints it 
 // nicely as months, days, hours etc as needed
@@ -1659,6 +1701,11 @@ function get_directory_list($rootdir, $excludefile="", $descend=true) {
    
     $dir = opendir($rootdir);
 
+    if (!$dir) {
+        notify("Error: unable to read this directory! : $rootdir");
+        return $dirs;
+    }
+
     while ($file = readdir($dir)) {
         if ($file != "." and $file != ".." and $file != "CVS" and $file != $excludefile) {
             $fullfile = $rootdir."/".$file;
index 129e164becfcc5af3ac1d407e7fe08096e1929c6..8b3d22e3157458a4036e6457e09b57680a411287 100644 (file)
@@ -273,7 +273,7 @@ function choose_from_menu ($options, $name, $selected="", $nothing="choose", $sc
     }
 }   
 
-function popup_form ($common, $options, $formname, $selected="", $nothing="choose", $help="", $helptext="") {
+function popup_form ($common, $options, $formname, $selected="", $nothing="choose", $help="", $helptext="", $return=false) {
 ///  Implements a complete little popup form
 ///  $common   = the URL up to the point of the variable that changes
 ///  $options  = A list of value-label pairs for the popup list
@@ -287,29 +287,39 @@ function popup_form ($common, $options, $formname, $selected="", $nothing="choos
         $nothing = get_string("choose")."...";
     }
 
-    echo "<FORM NAME=$formname>";
-    echo "<SELECT NAME=popup onChange=\"window.location=document.$formname.popup.options[document.$formname.popup.selectedIndex].value\">\n";
+    $output = "<FORM NAME=$formname>";
+    $output .= "<SELECT NAME=popup onChange=\"window.location=document.$formname.popup.options[document.$formname.popup.selectedIndex].value\">\n";
 
     if ($nothing != "") {
-        echo "   <OPTION VALUE=\"javascript:void(0)\">$nothing</OPTION>\n";
+        $output .= "   <OPTION VALUE=\"javascript:void(0)\">$nothing</OPTION>\n";
     }
 
     foreach ($options as $value => $label) {
-        echo "   <OPTION VALUE=\"$common$value\"";
-        if ($value == $selected) {
-            echo " SELECTED";
+        if (substr($label,0,1) == "-") {
+            $output .= "   <OPTION VALUE=\"\"";
+        } else {
+            $output .= "   <OPTION VALUE=\"$common$value\"";
+            if ($value == $selected) {
+                $output .= " SELECTED";
+            }
         }
         if ($label) {
-            echo ">$label</OPTION>\n";
+            $output .= ">$label</OPTION>\n";
         } else {
-            echo ">$value</OPTION>\n";
+            $output .= ">$value</OPTION>\n";
         }
     }
-    echo "</SELECT>";
-    if ($help) {
+    $output .= "</SELECT>";
+    if (!$return and $help) {
         helpbutton($help, $helptext);
     }
-    echo "</FORM>\n";
+    $output .= "</FORM>\n";
+
+    if ($return) {
+        return $output;
+    } else {
+        echo $output;
+    }
 }
 
 
index fbe3dfdd10a451d45f3d4998bf269739ba38e5c0..9ad6df9fcda6fc2b744997e42056b97d4f5cd3de 100644 (file)
@@ -44,7 +44,7 @@
 
     print_header("$course->shortname: $assignment->name", "$course->fullname",
                  "$navigation <A HREF=index.php?id=$course->id>$strassignments</A> -> $assignment->name", 
-                  "", "", true, update_module_button($cm->id, $course->id, $strassignment));
+                  "", "", true, update_module_button($cm->id, $course->id, $strassignment), navmenu($course, $cm));
 
     if (isteacher($course->id)) {
         if ($assignment->type == OFFLINE) {
index e1d842e408cedc3425b759e499bc937284257b99..e41f248d23ce43f9c6b7521ac5ccc4eb6dfe63d9 100644 (file)
@@ -59,7 +59,7 @@
     }
     print_header("$course->shortname: $choice->name", "$course->fullname",
                  "$navigation <A HREF=index.php?id=$course->id>$strchoices</A> -> $choice->name", "", "", true,
-                  update_module_button($cm->id, $course->id, $strchoice));
+                  update_module_button($cm->id, $course->id, $strchoice), navmenu($course, $cm));
 
     if (isteacher($course->id)) {
         if ( $allanswers = get_records("choice_answers", "choice", $choice->id)) {
index befd2d4be379fa1eed41c997c85d1822e907c18e..3b0ba90618bc73073585ec106a8b0f3271f50a61 100644 (file)
@@ -58,7 +58,7 @@
     add_to_log($course->id, "forum", "view forum", "view.php?f=$forum->id", "$forum->id");
 
     print_header("$course->shortname: $forum->name", "$course->fullname",
-                 "$navigation $forum->name", "", "", true, $buttontext);
+                 "$navigation $forum->name", "", "", true, $buttontext, navmenu($course, $cm));
 
     if ($USER) {
         $SESSION->fromdiscussion = "$FULLME";
index b4839eb9179789ac0ed572ef304a0052e2c04d21..ad49c945d99d2cfb124e9c497d4fdfd23d7bbcd8 100644 (file)
@@ -34,7 +34,7 @@
 
     print_header("$course->shortname: $journal->name", "$course->fullname",
                  "$navigation <A HREF=index.php?id=$course->id>$strjournals</A> -> $journal->name", "", "", true,
-                  update_module_button($cm->id, $course->id, $strjournal));
+                  update_module_button($cm->id, $course->id, $strjournal), navmenu($course, $cm));
 
     if (isteacher($course->id)) {
         if ($allentries = get_records("journal_entries", "journal", $journal->id)) {
index 9474d03fc24c4205f159e62c9deb204c46c4ca00..cd8c68132baca5afa1994fc4138e7bc56117ace6 100644 (file)
@@ -51,7 +51,7 @@
 
     print_header("$course->shortname: $quiz->name", "$course->fullname",
                  "$navigation <A HREF=index.php?id=$course->id>$strquizzes</A> -> $quiz->name", 
-                 "", "", true, update_module_button($cm->id, $course->id, $strquiz));
+                 "", "", true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
 
     if (isteacher($course->id)) {
         if ($allanswers = get_records("quiz_grades", "quiz", $quiz->id)) {
index a85ab7be79dda7ecf2a9fb0b511ce54ee5022890..016c3ad8e6424ec062cb2ddc074f207953154fb2 100644 (file)
@@ -33,7 +33,7 @@
         case 1:  // Reference (eg Journal or Book etc)
             add_to_log($course->id, "resource", "view", "view.php?id=$cm->id", "$resource->id");
             print_header("$course->shortname: $resource->name", "$course->fullname", "$navigation $resource->name",
-                         "", "", true, update_module_button($cm->id, $course->id, $strresource));
+                         "", "", true, update_module_button($cm->id, $course->id, $strresource), navmenu($course, $cm));
 
             print_simple_box($resource->reference, "center");
             echo "<CENTER><P>";
@@ -54,7 +54,7 @@
             if ($frameset) {
                 print_header("$course->shortname: $resource->name", "$course->fullname", 
                 "$navigation <A TARGET=_top HREF=\"$resource->reference\" TITLE=\"$resource->reference\">$resource->name</A>",
-                "", "", true, update_module_button($cm->id, $course->id, $strresource));
+                "", "", true, update_module_button($cm->id, $course->id, $strresource), navmenu($course, $cm));
                 echo "<CENTER><FONT SIZE=-1>".text_to_html($resource->summary, true, false)."</FONT></CENTER>";
 
             } else {
@@ -70,7 +70,7 @@
         case 3:  // Uploaded File
             if ($frameset) {
                 print_header("$course->shortname: $resource->name", "$course->fullname", "$navigation $resource->name",
-                         "", "", true, update_module_button($cm->id, $course->id, $strresource));
+                         "", "", true, update_module_button($cm->id, $course->id, $strresource), navmenu($course, $cm));
                 echo "<CENTER><FONT SIZE=-1>".text_to_html($resource->summary, true, false)."</FONT></CENTER>";
 
             } else {
@@ -91,7 +91,7 @@
         case 4:  // Plain text
             add_to_log($course->id, "resource", "view", "view.php?id=$cm->id", "$resource->id");
             print_header("$course->shortname: $resource->name", "$course->fullname", "$navigation $resource->name",
-                         "", "", true, update_module_button($cm->id, $course->id, $strresource));
+                         "", "", true, update_module_button($cm->id, $course->id, $strresource), navmenu($course, $cm));
 
             print_simple_box(text_to_html($resource->alltext), "CENTER", "", "$THEME->cellcontent", "20");
 
         case 6:  // HTML text
             add_to_log($course->id, "resource", "view", "view.php?id=$cm->id", "$resource->id");
             print_header("$course->shortname: $resource->name", "$course->fullname", "$navigation $resource->name",
-                         "", "", true, update_module_button($cm->id, $course->id, $strresource));
+                         "", "", true, update_module_button($cm->id, $course->id, $strresource), navmenu($course, $cm));
 
             print_simple_box_start("CENTER", "", "$THEME->cellcontent", "20");
 
 
         default:
             print_header("$course->shortname: $resource->name", "$course->fullname", "$navigation $resource->name",
-                         "", "", true, update_module_button($cm->id, $course->id, $strresource));
+                         "", "", true, update_module_button($cm->id, $course->id, $strresource), navmenu($course, $cm));
             print_heading($resource->name);
 
             print_simple_box("Error: unknown type of resource", "center");
index 6c019c18a976f53998b13540e4fcea29c35216f5..c243466187663419b8aa2f2416dced8a09c35b19 100644 (file)
@@ -28,7 +28,7 @@
 
     print_header("$course->shortname: $survey->name", "$course->fullname",
                  "$navigation <A HREF=index.php?id=$course->id>$strsurveys</A> -> $survey->name", "", "", true,
-                  update_module_button($cm->id, $course->id, $strsurvey));
+                  update_module_button($cm->id, $course->id, $strsurvey), navmenu($course, $cm));
 
     if (isteacher($course->id)) {
         $numusers = survey_count_responses($survey->id);
index c39fb09991a836f58ed6ea53d82db1b59b3b0469..3340847538b094786ff068dcd2bf5b5ad2043b00 100644 (file)
@@ -15,7 +15,7 @@
      <TABLE WIDTH=100% CELLPADDING=10 CELLSPACING=0 BORDER=0>
        <TR>
          <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=4><B><?=$heading?></B></FONT></TD>
-         <TD ALIGN=RIGHT VALIGN=TOP><?=$button ?></TD>
+         <TD ALIGN=RIGHT VALIGN=TOP><?=$menu ?></TD>
        </TR>
      </TABLE>
 
@@ -25,7 +25,7 @@
      <TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
        <TR>
          <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=4><B><?=$heading?></B></FONT></TD>
-         <TD ALIGN=RIGHT VALIGN=TOP><?=$button ?></TD>
+         <TD ALIGN=RIGHT VALIGN=TOP><?=$menu ?></TD>
        </TR>
      </TABLE>
 
@@ -39,6 +39,7 @@
          <TD BGCOLOR="<?=$THEME->cellheading?>">
            <FONT SIZE=2><B><? print_navigation("$navigation"); ?></B></FONT>
          </TD>
+         <TD BGCOLOR="<?=$THEME->cellheading?>" ALIGN=RIGHT WIDTH=20 VALIGN=TOP><?=$button ?></TD>
        </TR>
      </TABLE>
      <IMG SRC="<?=$CFG->wwwroot?>/pix/spacer.gif" ALT="" HEIGHT=5 WIDTH=1><BR>
index 2ab964116a23b68920bd372a88a4bc2362c51a44..4272ce4de86a81b5d654150314de8b46fb8ec377 100644 (file)
@@ -21,6 +21,9 @@ td   {font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;}
 \r
 li   {font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;}\r
 \r
+form { margin-bottom: 0 ; }\r
+\r
 .highlight {\r
     background-color: #AAFFAA;\r
 }\r
+\r
index e11bb08cc77cc196f3183a953c35422183abe262..d25b6e0edbf0fa566400d386302df7a0d422d140 100644 (file)
@@ -13,6 +13,8 @@ td   {font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;}
 
 li   {font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;}
 
+form { margin-bottom: 0 ; }
+
 .highlight {
     background-color: #AAFFAA;
 }
index 4bd26f5c516085ec64b8d5628ecce4db5ee6f477..8c96053c3243d33ffdaa5760d20a442845f19371 100644 (file)
@@ -13,6 +13,8 @@ td   {font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;}
 
 li   {font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;}
 
+form { margin-bottom: 0 ; }
+
 .highlight {
     background-color: #FFAAAA;
 }
index 2ab964116a23b68920bd372a88a4bc2362c51a44..46c1c225810027a8a819ef1621fa01c81bcfaee2 100644 (file)
@@ -21,6 +21,9 @@ td   {font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;}
 \r
 li   {font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;}\r
 \r
+form { margin-bottom: 0 ; }\r
+\r
+\r
 .highlight {\r
     background-color: #AAFFAA;\r
 }\r
index 4036004416270efe2d0678037e823824c963437c..c75a4dcf4f017e69180e7cc5a5f56507e0c47d97 100644 (file)
@@ -13,6 +13,9 @@ td   {font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;}
 
 li   {font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;}
 
+form { margin-bottom: 0 ; }
+
+
 .highlight {
     background-color: #FFAAAA;
 }
index 15c360b43b9822ebdb134963cc00a0dc90bb2ed3..2e70916a1b438189342c0474161e6e7f3edb1fd2 100644 (file)
@@ -5,7 +5,7 @@
 // database to determine whether upgrades should
 // be performed (see lib/db/*.php)
 
-$version = 2002110900;   // The current version is a date (YYYYMMDDXX)
+$version = 2002111003;   // The current version is a date (YYYYMMDDXX)
 
 $release = "1.0.6.2";  // User-friendly version number