diff --git a/course/lib.php b/course/lib.php
index cdc52359d58..b9872e58054 100644
--- a/course/lib.php
+++ b/course/lib.php
@@ -112,7 +112,7 @@ function print_course($course) {
echo "
id\">$course->fullname
";
if ($teachers = get_records_sql("SELECT u.* FROM user u, user_teachers t
WHERE u.id = t.user AND t.course = '$course->id'
- ORDER BY t.authority DESC")) {
+ ORDER BY t.authority ASC")) {
echo "\n";
foreach ($teachers as $teacher) {
diff --git a/course/weeks.php b/course/weeks.php
index 85b07c250cf..d70ef0054ba 100644
--- a/course/weeks.php
+++ b/course/weeks.php
@@ -16,29 +16,14 @@
$weeks[$cw->week] = $cw;
}
- // Layout the whole page as two big columns.
+ // Layout the whole page as three big columns.
echo "";
- echo "";
+ echo " |
";
echo " ";
// Layout the left column
- print_side_block("id\">What's New!",
- "", "...since your last login");
-
- // Then, print all the news items.
-
- include("../mod/discuss/lib.php");
- if ($news = get_course_news_forum($course->id)) {
- print_simple_box_start("CENTER", "100%", "#FFFFFF", 5);
- echo "Latest News ";
- echo "";
- forum_latest_topics($news->id, 5, "minimal", "DESC", false);
- echo "";
- print_simple_box_end();
- }
-
- // Now, print all the course links on the side
+ // Print all the course links on the side
// Then all the links to module types
@@ -54,59 +39,48 @@
$moddata[]="id\">Participants";
$modicon[]=" ";
+ $moddata[]="id&course=$course->id\">Edit my info";
+ $modicon[]=" ";
print_side_block("Activities", $moddata, "", $modicon);
// Admin links and controls
- $admindata[]="id&course=$course->id\">My details";
- $adminicon[]=" ";
+ if ($USER->teacher[$course->id] || isadmin()) {
+ $adminicon[]=" ";
+ if ($USER->editing) {
+ $admindata[]="id&edit=off\">Turn editing off";
+ } else {
+ $admindata[]="id&edit=on\">Turn editing on";
+ }
- if ($USER->teacher[$course->id]) {
- $admindata[]="id\">Course settings";
+ $admindata[]="id\">Course settings...";
$adminicon[]=" ";
- $admindata[]="id\">Logs";
+ $admindata[]="id\">Logs...";
$adminicon[]=" ";
- $admindata[]="id\">Send mail";
- $adminicon[]=" ";
- $admindata[]="id\">Files";
+ $admindata[]="id\">Files...";
$adminicon[]=" ";
+
+ print_side_block("Administration", $admindata, "", $adminicon);
}
- print_side_block("Administration", $admindata, "", $adminicon);
// Start main column
- echo " | ";
+ echo " | ";
+
+ echo "";
+ echo "  ";
+ echo "Weekly Outline\n";
+
+ echo "";
+ echo "
| ";
// Now all the weekly modules
-
-
$timenow = time();
$weekdate = $course->startdate; // this should be 0:00 Monday of that week
$week = 1;
$weekofseconds = 604800;
- echo " ";
- echo " ";
-
echo "";
while ($weekdate < $course->enddate) {
echo "";
@@ -176,9 +150,27 @@
$weekdate = $nextweekdate;
}
echo " ";
- echo " |
";
- echo "";
+ echo "
";
+
+ // Print What's New
+
+ print_side_block("id\">What's New!",
+ "", "...since your last login");
+
+ // Then, print all the news items.
+
+ include("../mod/discuss/lib.php");
+ if ($news = get_course_news_forum($course->id)) {
+ echo " Latest News ";
+ print_simple_box_start("CENTER", "100%", "#FFFFFF", 3);
+ echo "";
+ forum_latest_topics($news->id, 5, "minimal", "DESC", false);
+ echo "";
+ print_simple_box_end();
+ }
+
+ echo " | \n";
?>