From c8b8b71645b2cf99ebffd560db6e59f41f1780a8 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 7 May 2008 11:30:59 +0000 Subject: [PATCH] MDL-14724 Students cannot see discussions in forums made by teachers if timedposts enabled --- mod/forum/lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index bf107fc2f73..3d99f90ecec 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -2174,7 +2174,7 @@ function forum_get_discussions($cm, $forumsort="d.timemodified DESC", $fullpost= $modcontext = get_context_instance(CONTEXT_MODULE, $cm->id); if (!has_capability('mod/forum:viewhiddentimedposts', $modcontext)) { - $timelimit = " AND ((d.timestart = < $now) AND (d.timeend = 0 OR d.timeend > $now)"; + $timelimit = " AND ((d.timestart <= $now AND (d.timeend = 0 OR d.timeend > $now))"; if (isloggedin()) { $timelimit .= " OR d.userid = $USER->id"; } @@ -2346,7 +2346,7 @@ function forum_get_discussions_count($cm) { $modcontext = get_context_instance(CONTEXT_MODULE, $cm->id); if (!has_capability('mod/forum:viewhiddentimedposts', $modcontext)) { - $timelimit = " AND ((d.timestart = < $now) AND (d.timeend = 0 OR d.timeend > $now)"; + $timelimit = " AND ((d.timestart <= $now AND (d.timeend = 0 OR d.timeend > $now))"; if (isloggedin()) { $timelimit .= " OR d.userid = $USER->id"; }