MDL-9070 forum: Show timed post display period
authorAdam Olley <adam.olley@netspot.com.au>
Thu, 17 Sep 2015 04:03:07 +0000 (13:33 +0930)
committerAdam Olley <adam.olley@netspot.com.au>
Tue, 29 Sep 2015 23:48:31 +0000 (09:18 +0930)
commit05f1455b35df96be0a0368cd70b79ec8e4b5ee32
tree19049a0bab24854f28eb3bc4015e597892d68b10
parentfd57d685c785ac2900098b0aea87556d4696fa84
MDL-9070 forum: Show timed post display period

This adds the following changes when viewing a list of discussions and
forum_enabletimedposts is turned on.

* Discussions a student wouldnt see right now are dimmed (timestart in
  future or timeend in the past).
* A icon appears next to the discussion subject, the tooltip for this
  icon displays the display start and/or end time. This only appears for
  the user that made the discussion or has permission to
  viewhiddentimedposts.

These two changes achieve a couple of important things, namely, teachers
will not mistakenly think their students can see a discussion when
viewing the list if they've later forgot that they set a time limit on
it (or indeed if someone else put it on their discussion without them
realising). Additionally it makes it easy to see from the list when
different discussions are set to be released without having to go in and
edit them to find out.

Change-Id: Ia1818b33c00adae0dad72df8e170a078fb66cd76
mod/forum/lang/en/forum.php
mod/forum/lib.php
mod/forum/renderer.php
mod/forum/styles.css
mod/forum/tests/behat/timed_discussions.feature [new file with mode: 0644]