From 0d97d1e35fbedacf2731c3fbabff6b86785afa88 Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 3 Apr 2002 06:36:04 +0000 Subject: [PATCH] Fixed up use of isteacher (removed isadmin check because it's done in isteacher now) --- course/edit.php | 2 +- course/log.php | 2 +- course/loglive.php | 2 +- course/mod.php | 6 +++--- course/social.php | 4 ++-- course/view.php | 2 +- course/weeks.php | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/course/edit.php b/course/edit.php index 31ff510e6a5..3f4977f6e1d 100644 --- a/course/edit.php +++ b/course/edit.php @@ -12,7 +12,7 @@ require_login($course->id); - if (!isteacher($course->id) && ! isadmin()) { + if (!isteacher($course->id)) { error("Only teachers can edit the course!"); } } else { // Admin is creating a new course diff --git a/course/log.php b/course/log.php index bae4f7cef67..2153f4d21ac 100644 --- a/course/log.php +++ b/course/log.php @@ -11,7 +11,7 @@ error("That's an invalid course id"); } - if ( ! isteacher($course->id) && ! isadmin()) { + if ( ! isteacher($course->id)) { error("Only teachers can view logs"); } diff --git a/course/loglive.php b/course/loglive.php index 3b6f687dce2..71d09bd65ff 100644 --- a/course/loglive.php +++ b/course/loglive.php @@ -11,7 +11,7 @@ error("That's an invalid course id"); } - if ( ! isteacher($course->id) && ! isadmin()) { + if (! isteacher($course->id)) { error("Only teachers can view logs"); } diff --git a/course/mod.php b/course/mod.php index ded225188cd..832f6e7a201 100644 --- a/course/mod.php +++ b/course/mod.php @@ -9,7 +9,7 @@ require_login($mod->course); - if (!isteacher($mod->course) && !isadmin()) { + if (!isteacher($mod->course)) { error("You can't modify this course!"); } @@ -93,7 +93,7 @@ require_login($course->id); - if (!isteacher($course->id) && !isadmin()) { + if (!isteacher($course->id)) { error("You can't modify this course!"); } @@ -177,7 +177,7 @@ require_login($course->id); - if (!isteacher($course->id) && !isadmin()) { + if (!isteacher($course->id)) { error("You can't modify this course!"); } diff --git a/course/social.php b/course/social.php index aa695e63ece..81a2c693410 100644 --- a/course/social.php +++ b/course/social.php @@ -78,13 +78,13 @@ } else { $subtext = "Subscribe me by mail"; } - $headertext = "
Discussion Topicsid\">$subtext
"; + $headertext = "
Social Forum - Current Topicsid\">$subtext
"; print_simple_box("$headertext", $align="CENTER", $width="100%", $color="$THEME->cellheading"); ?>
id)) { - forum_latest_topics($social->id, 5, "plain", "DESC", false); + forum_latest_topics($social->id, 10, "plain", "DESC", false); } else { error("Could not find or create a social forum here"); } diff --git a/course/view.php b/course/view.php index f86e47a777c..1a1d932aa7e 100644 --- a/course/view.php +++ b/course/view.php @@ -14,7 +14,7 @@ add_to_log("View course: $course->shortname", $id); - if ( isteacher($course->id) || isadmin() ) { + if ( isteacher($course->id) ) { if ($edit == "on") { $USER->editing = true; } else if ($edit == "off") { diff --git a/course/weeks.php b/course/weeks.php index d70ef0054ba..68fddb89116 100644 --- a/course/weeks.php +++ b/course/weeks.php @@ -46,7 +46,7 @@ // Admin links and controls - if ($USER->teacher[$course->id] || isadmin()) { + if (isteacher($course->id)) { $adminicon[]="\"Edit\""; if ($USER->editing) { $admindata[]="id&edit=off\">Turn editing off";