Adding if statement to verify whether user can see postings or not (Bug #4431)

This commit is contained in:
moodler
2005-12-08 05:00:41 +00:00
parent d45dbbda40
commit a8adeff529
+10
View File
@@ -138,6 +138,8 @@
$groupmode = groupmode($course, $cm);
}
if ($groupmode and !isteacheredit($course->id)) { // Groups must be kept separate
$mygroupid = mygroupid($course->id);
@@ -159,6 +161,14 @@
}
}
//if forum is hidden then only teacher and admin can see it
if ($forum->visible == 0 and !isadmin() and !isteacher($course->id)) {
print_heading("Sorry, you don't have permission to see this discussion");
print_footer($course);
die;
}
/// Print the controls across the top