From 86e75a7b77992c0f772a2e3a766cd09f88a43127 Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Fri, 14 Apr 2006 04:51:43 +0000 Subject: [PATCH] Disable gui for forum timed posts since we are not quite ready for it. All code is still there but hidden & controlled by a config var forum_enabletimedposts. --- mod/forum/lib.php | 2 +- mod/forum/post.html | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index e1dca3b54b..7173492008 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -1140,7 +1140,7 @@ function forum_search_posts($searchterms, $courseid, $page=0, $recordsperpage=50 } $timelimit = ''; - if (!((isadmin() and !empty($CFG->admineditalways)) || isteacher($courseid))) { + if (!empty($CFG->forum_enabletimedposts) && (!((isadmin() and !empty($CFG->admineditalways)) || isteacher($courseid)))) { $now = time(); $timelimit = " AND (d.userid = $USER->id OR ((d.timestart = 0 OR d.timestart <= $now) AND (d.timeend = 0 OR d.timeend > $now)))"; } diff --git a/mod/forum/post.html b/mod/forum/post.html index c085f2d5b6..1d7d79e5af 100644 --- a/mod/forum/post.html +++ b/mod/forum/post.html @@ -113,8 +113,10 @@ if (!isset($discussion->timeend)) { -type == 'news' && !$post->parent) { // This is the first post of a discussion in news forum ?> - +forum_enabletimedposts) && + isteacher($course->id) && $forum->type == 'news' && !$post->parent) { + // This is the first post of a discussion in news forum + ?> :
(
@@ -145,9 +147,10 @@ if (!isset($discussion->timeend)) { - - - + + + + -- 2.39.5