Skip to content
Browse files

Lots of work on site display, over many files. Improved front page

and display of site modules.
  • Loading branch information...
1 parent 3f63fdf commit 94361e021e65d20cd5f0197fe727c627e39f2da7 martin committed Aug 3, 2002
View
15 admin/index.php
@@ -162,16 +162,17 @@
// At this point, the databases exist, and the user is an admin
- print_header("$site->fullname: Administration Page","$site->fullname: Administration Page", "Admin");
+ $stradministration = get_string("administration");
+ print_header("$site->fullname: $stradministration","$site->fullname: $stradministration", "$stradministration");
$table->head = array ("Site Management", "Course Setup", "Other");
$table->align = array ("CENTER", "CENTER", "CENTER");
- $table->data[0][0] = "<P><A HREF=\"site.php\">Site settings</A></P>".
- "<P><A HREF=\"../course/log.php?id=$site->id\">Site logs</A></P>";
- $table->data[0][1] = "<P><A HREF=\"../course/edit.php\">Create a new course</A></P>".
- "<P><A HREF=\"../course/teacher.php\">Assign teachers to a course</A></P>".
- "<P><A HREF=\"../course/delete.php\">Delete a course</A></P>";
- $table->data[0][2] = "<P><A HREF=\"user.php\">Edit a user's account</A></P>";
+ $table->data[0][0] = "<P><A HREF=\"site.php\">".get_string("sitesettings")."</A></P>".
+ "<P><A HREF=\"../course/log.php?id=$site->id\">".get_string("sitelogs")."</A></P>";
+ $table->data[0][1] = "<P><A HREF=\"../course/edit.php\">".get_string("addnewcourse")."</A></P>".
+ "<P><A HREF=\"../course/teacher.php\">".get_string("assignteachers")."</A></P>".
+ "<P><A HREF=\"../course/delete.php\">".get_string("deletecourse")."</A></P>";
+ $table->data[0][2] = "<P><A HREF=\"user.php\">".get_string("edituser")."</A></P>";
print_table($table);
View
1 admin/site.html
@@ -44,4 +44,5 @@
</TABLE>
<INPUT type="hidden" name="id" value="<?=$form->id ?>">
<INPUT type="hidden" name="category" value="<?=$form->category ?>">
+<INPUT type="hidden" name="format" value="<?=$form->format ?>">
</FORM>
View
3 admin/site.php
@@ -3,6 +3,7 @@
require("../config.php");
$course = get_site();
+ $course->format = "social"; // override
/// If data submitted, then process and store.
@@ -49,7 +50,7 @@
$form = $course;
} else {
$form->category = 0;
- $form->newsitems = 1;
+ $form->format = "social";
}
print_header("Admin: Setting up site", "Administration: Setting up site",
View
2 course/edit.php
@@ -60,7 +60,7 @@
$section->id = insert_record("course_sections", $section);
add_to_log($newid, "course", "new", "view.php?id=$newid", "");
- redirect("$CFG->wwwroot/admin/teacher.php?id=$newid", get_string("changessaved"));
+ redirect("teacher.php?id=$newid", get_string("changessaved"));
} else {
error("Serious Error! Could not create the new course!");
}
View
78 course/lib.php
@@ -174,12 +174,28 @@ function print_log($course, $user=0, $date=0, $order="ORDER BY l.time ASC") {
}
-function print_all_courses($cat=1) {
+function print_all_courses($cat=1, $style="full", $maxcount=999) {
+ global $CFG;
if ($courses = get_records("course", "category", $cat, "fullname ASC")) {
- foreach ($courses as $course) {
- print_course($course);
- echo "<BR>\n";
+ if ($style == "minimal") {
+ $count = 0;
+ $icon = "<IMG SRC=\"pix/i/course.gif\" HEIGHT=16 WIDTH=16 ALT=\"Course\">";
+ foreach ($courses as $course) {
+ $moddata[]="<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</A>";
+ $modicon[]=$icon;
+ if ($count++ >= $maxcount) {
+ break;
+ }
+ }
+ $fulllist = "<P><A HREF=\"$CFG->wwwroot/course/\">".get_string("fulllistofcourses")."</A>...";
+ print_side_block("", $moddata, "$fulllist", $modicon);
+
+ } else {
+ foreach ($courses as $course) {
+ print_course($course);
+ echo "<BR>\n";
+ }
}
} else {
@@ -398,6 +414,7 @@ function get_all_mods($courseid, &$mods, &$modnames, &$modnamesplural, &$modname
$mods = NULL; // course modules indexed by id
$modnames = NULL; // all course module names
+ $modnamesplural= NULL; // all course module names (plural form)
$modnamesused = NULL; // course module names used
if ($allmods = get_records_sql("SELECT * FROM modules") ) {
@@ -414,7 +431,7 @@ function get_all_mods($courseid, &$mods, &$modnames, &$modnamesplural, &$modname
FROM modules m, course_modules cm
WHERE cm.course = '$courseid'
AND cm.deleted = '0'
- AND cm.module = m.id") ) {
+ AND cm.module = m.id ") ) {
foreach($rawmods as $mod) { // Index the mods
$mods[$mod->id] = $mod;
$mods[$mod->id]->modfullname = $modnames[$mod->modname];
@@ -432,6 +449,31 @@ function get_all_sections($courseid) {
ORDER BY section");
}
+function print_section($courseid, $section, $mods, $modnamesused, $absolute=false) {
+ global $CFG;
+
+
+ echo "<P>";
+ if ($section->sequence) {
+
+ $sectionmods = explode(",", $section->sequence);
+
+ foreach ($sectionmods as $modnumber) {
+ $mod = $mods[$modnumber];
+ $instancename = get_field("$mod->modname", "name", "id", "$mod->instance");
+ echo "<IMG SRC=\"$CFG->wwwroot/mod/$mod->modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\">";
+ echo " <A TITLE=\"$mod->modfullname\"";
+ echo " HREF=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">$instancename</A>";
+ if (isediting($courseid)) {
+ echo make_editing_buttons($mod->id, $absolute);
+ }
+ echo "<BR>\n";
+ }
+ }
+ echo "</P>\n";
+}
+
+
function print_log_graph($course, $userid=0, $type="course.png", $date=0) {
global $CFG;
echo "<IMG BORDER=0 SRC=\"$CFG->wwwroot/course/loggraph.php?id=$course->id&user=$userid&type=$type&date=$date\">";
@@ -654,20 +696,28 @@ function move_module($id, $move) {
}
}
-function make_editing_buttons($moduleid) {
+function make_editing_buttons($moduleid, $absolute=false) {
+ global $CFG;
+
$delete = get_string("delete");
$moveup = get_string("moveup");
$movedown = get_string("movedown");
$update = get_string("update");
+
+ if ($absolute) {
+ $path = "$CFG->wwwroot/course/";
+ } else {
+ $path = "";
+ }
return "&nbsp; &nbsp;
- <A HREF=mod.php?delete=$moduleid><IMG
- SRC=../pix/t/delete.gif BORDER=0 ALT=\"$delete\"></A>
- <A HREF=mod.php?id=$moduleid&move=-1><IMG
- SRC=../pix/t/up.gif BORDER=0 ALT=\"$moveup\"></A>
- <A HREF=mod.php?id=$moduleid&move=1><IMG
- SRC=../pix/t/down.gif BORDER=0 ALT=\"$movedown\"></A>
- <A HREF=mod.php?update=$moduleid><IMG
- SRC=../pix/t/edit.gif BORDER=0 ALT=\"$update\"></A>";
+ <A HREF=\"".$path."mod.php?delete=$moduleid\"><IMG
+ SRC=".$path."../pix/t/delete.gif BORDER=0 ALT=\"$delete\"></A>
+ <A HREF=\"".$path."mod.php?id=$moduleid&move=-1\"><IMG
+ SRC=".$path."../pix/t/up.gif BORDER=0 ALT=\"$moveup\"></A>
+ <A HREF=\"".$path."mod.php?id=$moduleid&move=1\"><IMG
+ SRC=".$path."../pix/t/down.gif BORDER=0 ALT=\"$movedown\"></A>
+ <A HREF=\"".$path."mod.php?update=$moduleid\"><IMG
+ SRC=".$path."../pix/t/edit.gif BORDER=0 ALT=\"$update\"></A>";
}
function print_side_block($heading="", $list=NULL, $footer="", $icons=NULL) {
View
19 course/topics.php
@@ -151,24 +151,7 @@
echo text_to_html($thissection->summary);
- echo "<P>";
- if ($thissection->sequence) {
-
- $thissectionmods = explode(",", $thissection->sequence);
-
- foreach ($thissectionmods as $modnumber) {
- $mod = $mods[$modnumber];
- $instancename = get_field("$mod->modname", "name", "id", "$mod->instance");
- echo "<IMG SRC=\"../mod/$mod->modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\">";
- echo " <A TITLE=\"$mod->modfullname\"";
- echo " HREF=\"../mod/$mod->modname/view.php?id=$mod->id\">$instancename</A>";
- if (isediting($course->id)) {
- echo make_editing_buttons($mod->id);
- }
- echo "<BR>\n";
- }
- }
- echo "</UL></P>\n";
+ print_section($course->id, $thissection, $mods, $modnamesused);
if (isediting($course->id)) {
echo "<DIV ALIGN=right>";
View
2 course/user.php
@@ -56,7 +56,7 @@
echo "</TR></TABLE>";
- get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused);
+ get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused, $modsectioncounts);
switch ($mode) {
case "today" :
View
2 course/view.php
@@ -48,7 +48,7 @@
print_header("$courseword: $course->fullname", "$course->fullname", "$course->shortname", "search.search", "", true,
update_course_icon($course->id));
- get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused);
+ get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused, $modsectioncounts);
switch ($course->format) {
case "weeks":
View
23 course/weeks.php
@@ -4,11 +4,11 @@
include("../mod/forum/lib.php");
- if (! $sections = get_all_sections($course->id, $course->numsections) ) {
+ if (! $sections = get_all_sections($course->id)) {
$section->course = $course->id; // Create a default section.
$section->section = 0;
$section->id = insert_record("course_sections", $section);
- if (! $sections = get_all_sections($course->id, $course->numsections) ) {
+ if (! $sections = get_all_sections($course->id) ) {
error("Error finding or creating section structures for this course");
}
}
@@ -141,24 +141,7 @@
echo text_to_html($thisweek->summary);
- echo "<P>";
- if ($thisweek->sequence) {
-
- $thisweekmods = explode(",", $thisweek->sequence);
-
- foreach ($thisweekmods as $modnumber) {
- $mod = $mods[$modnumber];
- $instancename = get_field("$mod->modname", "name", "id", "$mod->instance");
- echo "<IMG SRC=\"../mod/$mod->modname/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"$mod->modfullname\">";
- echo " <A TITLE=\"$mod->modfullname\"";
- echo " HREF=\"../mod/$mod->modname/view.php?id=$mod->id\">$instancename</A>";
- if (isediting($course->id)) {
- echo make_editing_buttons($mod->id);
- }
- echo "<BR>\n";
- }
- }
- echo "</UL></P>\n";
+ print_section($course->id, $thisweek, $mods, $modnamesused);
if (isediting($course->id)) {
echo "<DIV ALIGN=right>";
View
56 index.php
@@ -26,39 +26,51 @@
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="5" CELLPADDING="5">
<TR>
<TD VALIGN="TOP" NOWRAP>
- <? $readings = reading_list_all_readings();
+ <?
+
+ $sections = get_all_sections($site->id);
- if ($site->newsitems > 0 or $readings or isediting($site->id)) {
+ if ($site->newsitems > 0 or $sections[0]->sequence or isediting($site->id)) {
- print_simple_box(get_string("mainmenu"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
-
if ($site->newsitems > 0 ) {
- echo "<LI><A TITLE=\"".
- get_string("availablecourses").
- "\" HREF=\"course/\"><B>".
- get_string("courses").
- "</B></A><BR></LI>";
+ print_simple_box(get_string("courses"), "CENTER", "100%", "$THEME->cellheading");
+
+ print_all_courses($cat=1, "minimal", 10);
}
- if ($readings) {
- foreach ($readings as $reading) {
- echo "<LI>$reading";
- }
+ if ($sections[0]->sequence or isediting($site->id)) {
+ get_all_mods($site->id, $mods, $modnames, $modnamesplural, $modnamesused);
+ print_simple_box(get_string("mainmenu"), "CENTER", "100%", "$THEME->cellheading");
+ }
+
+ if ($sections[0]->sequence) {
+ print_section($site->id, $sections[0], $mods, $modnamesused, true);
}
+
if (isediting($site->id)) {
- echo "<P align=right><A HREF=\"$CFG->wwwroot/course/mod.php?id=$site->id&section=0&add=reading\">".
- get_string("addreading", "reading")."</A>...</P>";
- } else {
- echo "<BR><BR>";
+ echo "<DIV ALIGN=right>";
+ popup_form("$CFG->wwwroot/course/mod.php?id=$site->id&section=0&add=",
+ $modnames, "section0", "", "Add...");
+ echo "</DIV>";
}
}
-
if (isadmin()) {
- print_simple_box(get_string("admin"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
- echo "<LI><A HREF=\"$CFG->wwwroot/admin/\">".get_string("adminpage")."...</A></LI>";
- echo "<LI><A HREF=\"$CFG->wwwroot/course/log.php?id=$site->id\">".get_string("sitelogs")."...</A></LI>";
- echo "<LI><A HREF=\"$CFG->wwwroot/admin/site.php\">".get_string("sitesettings")."...</A></LI>";
+ print_simple_box(get_string("administration"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
+ $icon = "<IMG SRC=\"pix/i/settings.gif\" HEIGHT=16 WIDTH=16 ALT=\"\">";
+ $moddata[]="<A HREF=\"course/log.php?id=$site->id\">".get_string("sitelogs")."</A>";
+ $modicon[]=$icon;
+ $moddata[]="<A HREF=\"admin/site.php\">".get_string("sitesettings")."</A>";
+ $modicon[]=$icon;
+ $moddata[]="<A HREF=\"course/edit.php\">".get_string("addnewcourse")."</A>";
+ $modicon[]=$icon;
+ $moddata[]="<A HREF=\"course/teacher.php\">".get_string("assignteachers")."</A>";
+ $modicon[]=$icon;
+ $moddata[]="<A HREF=\"course/delete.php\">".get_string("deletecourse")."</A>";
+ $modicon[]=$icon;
+ $moddata[]="<A HREF=\"admin/user.php\">".get_string("edituser")."</A>";
+ $modicon[]=$icon;
+ print_side_block("", $moddata, "", $modicon);
}
?>
View
2 lang/en/forum.php
@@ -20,7 +20,7 @@
$string[generalforum] = "Standard forum for general use";
$string[generalforums] = "General forums";
$string[inforum] = "in \$a";
-$string[intronews] = "General news and announcements about this course";
+$string[intronews] = "General news and announcements";
$string[introsocial] = "An open forum for chatting about anything you want to";
$string[introteacher] = "A forum for teacher-only notes and discussion";
$string[learningforums] = "Learning forums";
View
13 lang/en/moodle.php
@@ -1,21 +1,17 @@
<?PHP // $Id$
-#------------------------------------------------------------
-$string[modulename] = "Site";
-$string[modulenameplural] = "Sites";
-#------------------------------------------------------------
-
-
$string[activity] = "Activity";
$string[activityreport] = "Activity report";
+$string[addnewcourse] = "Add a new course";
$string[address] = "Address";
$string[admin] = "Admin";
-$string[adminpage] = "Admin page";
+$string[administration] = "Administration";
$string[again] = "again";
$string[alllogs] = "All logs";
$string[allfieldsrequired] = "All fields are required";
$string[alphanumerical] = "Can only contain alphabetical letters or numbers";
$string[alreadyconfirmed] = "Registration has already been confirmed";
+$string[assignteachers] = "Assign teachers";
$string[availablecourses] = "Available Courses";
$string[category] = "Category";
$string[changepassword] = "Change password";
@@ -31,8 +27,10 @@
$string[createuserandpass] = "Create a new username and password to log in with";
$string[currentlocaltime] = "your current local time";
$string[delete] = "Delete";
+$string[deletecourse] = "Delete a course";
$string[editcoursesettings] = "Edit course settings";
$string[editmyprofile] = "Edit my profile";
+$string[edituser] = "Edit user accounts";
$string[email] = "Email address";
$string[emailformat] = "Email format";
$string[emailconfirm] = "Confirm your account";
@@ -68,6 +66,7 @@
$string[firsttime] = "Is this your first time here?";
$string[forgotten] = "Forgotten your username or password?";
$string[format] = "Format";
+$string[fulllistofcourses] = "Full list of courses";
$string[fullprofile] = "Full profile";
$string[fullname] = "Full name";
$string[guestsno] = "No, do not allow guests in";
View
6 mod/choice/index.php
@@ -12,8 +12,12 @@
add_to_log($course->id, "choice", "view all", "index?id=$course->id", "");
+ if ($course->category) {
+ $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
+ }
+
print_header("$course->shortname: Choices", "$course->fullname",
- "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> -> Choices", "");
+ "$navigation Choices", "");
if (! $choices = get_all_instances_in_course("choice", $course->id, "cw.section ASC")) {
View
6 mod/choice/view.php
@@ -46,9 +46,11 @@
add_to_log($course->id, "choice", "view", "view.php?id=$cm->id", "$choice->id");
+ if ($course->category) {
+ $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
+ }
print_header("$course->shortname: $choice->name", "$course->fullname",
- "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> ->
- <A HREF=index.php?id=$course->id>Choices</A> -> $choice->name", "", "", true,
+ "$navigation <A HREF=index.php?id=$course->id>Choices</A> -> $choice->name", "", "", true,
update_module_icon($cm->id, $course->id));
if (isteacher($course->id)) {
View
2 mod/forum/discuss.php
@@ -11,7 +11,7 @@
optional_variable($mode); // If set, changes the layout of the thread
if (! $discussion = get_record("forum_discussions", "id", $d)) {
- error("Discussion ID was incorrect");
+ error("Discussion ID was incorrect or no longer exists");
}
if (! $course = get_record("course", "id", $discussion->course)) {
View
65 mod/forum/index.php
@@ -58,6 +58,11 @@
$generalforums[] = $forum;
}
break;
+ default:
+ if (!$course->category) {
+ $generalforums[] = $forum;
+ }
+ break;
}
}
}
@@ -91,38 +96,44 @@
unset($table->data);
}
- // Add extra field for section number, at the front
- array_unshift($table->head, "");
- array_unshift($table->align, "CENTER");
-
- if ($learningforums = get_all_instances_in_course("forum", $course->id)) {
- foreach ($learningforums as $forum) {
- $count = count_records("forum_discussions", "forum", "$forum->id");
-
- $forum->intro = forum_shorten_post($forum->intro);
-
- if ($can_subscribe) {
- if (forum_is_forcesubscribed($forum->id)) {
- $sublink = get_string("yes");
- } else {
- if (forum_is_subscribed($USER->id, $forum->id)) {
- $subscribed = get_string("yes");
- $subtitle = get_string("unsubscribe", "forum");
+ if ($course->category) { // Only real courses have learning forums
+ // Add extra field for section number, at the front
+ array_unshift($table->head, "");
+ array_unshift($table->align, "CENTER");
+
+ if ($learningforums = get_all_instances_in_course("forum", $course->id)) {
+ foreach ($learningforums as $forum) {
+ $count = count_records("forum_discussions", "forum", "$forum->id");
+
+ $forum->intro = forum_shorten_post($forum->intro);
+
+ if (!$forum->section) { // some forums are in the "0" section
+ $forum->section = "";
+ }
+
+ if ($can_subscribe) {
+ if (forum_is_forcesubscribed($forum->id)) {
+ $sublink = get_string("yes");
} else {
- $subscribed = get_string("no");
- $subtitle = get_string("subscribe", "forum");
+ if (forum_is_subscribed($USER->id, $forum->id)) {
+ $subscribed = get_string("yes");
+ $subtitle = get_string("unsubscribe", "forum");
+ } else {
+ $subscribed = get_string("no");
+ $subtitle = get_string("subscribe", "forum");
+ }
+ $sublink = "<A TITLE=\"$subtitle\" HREF=\"subscribe.php?id=$forum->id\">$subscribed</A>";
}
- $sublink = "<A TITLE=\"$subtitle\" HREF=\"subscribe.php?id=$forum->id\">$subscribed</A>";
+ $table->data[] = array ("$forum->section", "<A HREF=\"view.php?f=$forum->id\">$forum->name</A>",
+ "$forum->intro", "$count", "$sublink");
+ } else {
+ $table->data[] = array ("$forum->section", "<A HREF=\"view.php?f=$forum->id\">$forum->name</A>",
+ "$forum->intro", "$count");
}
- $table->data[] = array ("$forum->section", "<A HREF=\"view.php?f=$forum->id\">$forum->name</A>",
- "$forum->intro", "$count", "$sublink");
- } else {
- $table->data[] = array ("$forum->section", "<A HREF=\"view.php?f=$forum->id\">$forum->name</A>",
- "$forum->intro", "$count");
}
+ print_heading(get_string("learningforums", "forum"));
+ print_table($table);
}
- print_heading(get_string("learningforums", "forum"));
- print_table($table);
}
echo "<DIV ALIGN=CENTER>";
View
4 mod/forum/search.php
@@ -12,7 +12,9 @@
error("Course id is incorrect.");
}
- require_login($course->id);
+ if ($course->category) {
+ require_login($course->id);
+ }
add_to_log($course->id, "forum", "search", "search.php?id=$course->id&search=$search", "$search");
View
2 mod/forum/view.php
@@ -22,7 +22,7 @@
} else if ($f) {
if (! $forum = get_record("forum", "id", $f)) {
- error("Forum ID was incorrect");
+ error("Forum ID was incorrect or no longer exists");
}
if (! $course = get_record("course", "id", $forum->course)) {
error("Forum is misconfigured - don't know what course it's from");
View
7 mod/journal/index.php
@@ -12,8 +12,11 @@
require_login($course->id);
add_to_log($course->id, "journal", "view all", "index.php?id=$course->id", "");
- print_header("$course->shortname: Journals", "$course->fullname",
- "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> -> Journals", "");
+ if ($course->category) {
+ $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
+ }
+
+ print_header("$course->shortname: Journals", "$course->fullname", "$navigation Journals", "");
if (! $journals = get_all_instances_in_course("journal", $course->id, "cw.section ASC")) {
View
6 mod/journal/view.php
@@ -25,9 +25,11 @@
error("Course module is incorrect");
}
+ if ($course->category) {
+ $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
+ }
print_header("$course->shortname: $journal->name", "$course->fullname",
- "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> ->
- <A HREF=index.php?id=$course->id>Journals</A> -> $journal->name", "", "", true,
+ "$navigation <A HREF=index.php?id=$course->id>Journals</A> -> $journal->name", "", "", true,
update_module_icon($cm->id, $course->id));
if (isteacher($course->id)) {
View
6 mod/survey/index.php
@@ -13,8 +13,10 @@
add_to_log($course->id, "survey", "view all", "index.php?id=$course->id", "");
- print_header("$course->shortname: Surveys", "$course->fullname",
- "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> -> Surveys", "");
+ if ($course->category) {
+ $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
+ }
+ print_header("$course->shortname: Surveys", "$course->fullname", "$navigation Surveys", "");
if (! $surveys = get_all_instances_in_course("survey", $course->id, "cw.section ASC")) {
View
8 mod/survey/view.php
@@ -18,10 +18,12 @@
if (! $survey = get_record("survey", "id", $cm->instance)) {
error("Survey ID was incorrect");
}
-
+
+ if ($course->category) {
+ $navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
+ }
print_header("$course->shortname: $survey->name", "$course->fullname",
- "<A HREF=../../course/view.php?id=$course->id>$course->shortname</A> ->
- <A HREF=index.php?id=$course->id>Surveys</A> -> $survey->name", "", "", true,
+ "$navigation <A HREF=index.php?id=$course->id>Surveys</A> -> $survey->name", "", "", true,
update_module_icon($cm->id, $course->id));
if (isteacher($course->id)) {
View
BIN pix/i/course.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 94361e0

Please sign in to comment.
Something went wrong with that request. Please try again.