From: moodler Date: Sat, 16 Aug 2003 06:44:03 +0000 (+0000) Subject: Only editing teachers see controls and things X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b6c1273289fc9ed08345b50c5d0ee1f8b684c10b;p=moodle.git Only editing teachers see controls and things --- diff --git a/lib/weblib.php b/lib/weblib.php index 0c27d72af6..155ed61e03 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1076,7 +1076,7 @@ function print_table($table) { function print_editing_switch($courseid) { global $CFG, $USER; - if (isteacher($courseid)) { + if (isteacheredit($courseid)) { if ($USER->editing) { echo "wwwroot/course/view.php?id=$courseid&edit=off\">turn editing off"; } else { @@ -1116,7 +1116,7 @@ function update_course_icon($courseid) { // Used to be an icon, but it's now a simple form button global $CFG, $USER; - if (isteacher($courseid) and iscreator()) { + if (isteacheredit($courseid)) { if (!empty($USER->editing)) { $string = get_string("turneditingoff"); $edit = "off"; @@ -1135,12 +1135,14 @@ function update_module_button($moduleid, $courseid, $string) { // Prints the editing button on a module "view" page global $CFG; - if (isteacher($courseid)) { + if (isteacheredit($courseid)) { $string = get_string("updatethis", "", $string); return "
wwwroot/course/mod.php\">". "". "". "
"; + } else { + return ""; } }