mirror of
https://github.com/moodle/moodle.git
synced 2025-02-13 12:34:28 +01:00
Adding if statement to verify whether user can see postings or not (Bug #4431)
This commit is contained in:
parent
fa7be56710
commit
d0087b2f5c
@ -146,6 +146,8 @@
|
|||||||
$groupmode = groupmode($course, $cm);
|
$groupmode = groupmode($course, $cm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($groupmode and !isteacheredit($course->id)) { // Groups must be kept separate
|
if ($groupmode and !isteacheredit($course->id)) { // Groups must be kept separate
|
||||||
//change this to ismember
|
//change this to ismember
|
||||||
$mygroupid = mygroupid($course->id);//only useful if 0, otherwise it's an array now
|
$mygroupid = mygroupid($course->id);//only useful if 0, otherwise it's an array now
|
||||||
@ -167,6 +169,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
|
/// Print the controls across the top
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user