From: mjollnir_ Date: Fri, 14 Apr 2006 04:51:43 +0000 (+0000) Subject: Disable gui for forum timed posts since we are not quite ready for it. All code is... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=86e75a7b77992c0f772a2e3a766cd09f88a43127;p=moodle.git 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. --- 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)) { - - - + + + +