Permalink
Browse files

Allow admin to do anything the teacher can do

  • Loading branch information...
1 parent 1c1238c commit a69023cf464d136d601ad45bf22d74b6f323e6e6 martin committed Mar 16, 2002
Showing with 7 additions and 7 deletions.
  1. +1 −1 course/edit.php
  2. +1 −1 course/log.php
  3. +1 −1 course/loglive.php
  4. +3 −3 course/mod.php
  5. +1 −1 course/view.php
View
2 course/edit.php
@@ -12,7 +12,7 @@
require_login($course->id);
- if (!isteacher($course->id)) {
+ if (!isteacher($course->id) && ! isadmin()) {
error("Only teachers can edit the course!");
}
} else { // Admin is creating a new course
View
2 course/log.php
@@ -11,7 +11,7 @@
error("That's an invalid course id");
}
- if ( ! isteacher($course->id)) {
+ if ( ! isteacher($course->id) && ! isadmin()) {
error("Only teachers can view logs");
}
View
2 course/loglive.php
@@ -11,7 +11,7 @@
error("That's an invalid course id");
}
- if ( ! isteacher($course->id)) {
+ if ( ! isteacher($course->id) && ! isadmin()) {
error("Only teachers can view logs");
}
View
6 course/mod.php
@@ -9,7 +9,7 @@
require_login($mod->course);
- if (!isteacher($mod->course)) {
+ if (!isteacher($mod->course) && !isadmin()) {
error("You can't modify this course!");
}
@@ -93,7 +93,7 @@
require_login($course->id);
- if (!isteacher($course->id)) {
+ if (!isteacher($course->id) && !isadmin()) {
error("You can't modify this course!");
}
@@ -177,7 +177,7 @@
require_login($course->id);
- if (!isteacher($course->id)) {
+ if (!isteacher($course->id) && !isadmin()) {
error("You can't modify this course!");
}
View
2 course/view.php
@@ -14,7 +14,7 @@
add_to_log("View course: $course->shortname", $id);
- if ( $USER->teacher[$course->id] ) {
+ if ( isteacher($course->id) || isadmin() ) {
if ($edit == "on") {
$USER->editing = true;
} else if ($edit == "off") {

0 comments on commit a69023c

Please sign in to comment.