Moodle
  1. Moodle
  2. MDL-17955

Remove experimental flag from forum settings

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.8.10, 1.9.6, 2.0, 2.8
    • Fix Version/s: None
    • Component/s: Forum
    • Labels:
    • Environment:
      en
    • Database:
      Any
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_28_STABLE

      Description

      Setting to enable in admin console suggests they are. Needs updating if all OK with this feature.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Eloy Lafuente (stronk7) added a comment -

            Assigning to Petr... do you know the status of this?

            Show
            Eloy Lafuente (stronk7) added a comment - Assigning to Petr... do you know the status of this?
            Hide
            Petr Skoda added a comment -

            They are still experimental, if I remember it correctly there are still some issues left to be solved...

            Show
            Petr Skoda added a comment - They are still experimental, if I remember it correctly there are still some issues left to be solved...
            Hide
            Ray Lawrence added a comment -

            I tried this out extensively recently all seemed well: visibility was correct based on the relevant capability inc. for groups. Emails were sent at appropriate times.

            There was no duration (period) option as noted on MDL-17955

            Show
            Ray Lawrence added a comment - I tried this out extensively recently all seemed well: visibility was correct based on the relevant capability inc. for groups. Emails were sent at appropriate times. There was no duration (period) option as noted on MDL-17955
            Hide
            Darrel Tenter added a comment -

            We've just started using this recently and have noticed a bug. The ability to view a post that has a future display start date is limited to the person that made the post.

            If I as admin make a post with a future availability date, an instructor can see the post listed on the forum page. However if they try to view it they get "Discussion ID was incorrect or no longer exists" as if the post had been removed. Likewise if an instructor makes a similar post I as admin get the same error when trying to view it.

            Permissions for both Roles are set to Allow for viewing hidden timed posts.

            Show
            Darrel Tenter added a comment - We've just started using this recently and have noticed a bug. The ability to view a post that has a future display start date is limited to the person that made the post. If I as admin make a post with a future availability date, an instructor can see the post listed on the forum page. However if they try to view it they get "Discussion ID was incorrect or no longer exists" as if the post had been removed. Likewise if an instructor makes a similar post I as admin get the same error when trying to view it. Permissions for both Roles are set to Allow for viewing hidden timed posts.
            Hide
            Ray Lawrence added a comment -

            Darrel,

            Is the behaviour the same if the poster and viewer both have "normal" course only role assignments?

            Show
            Ray Lawrence added a comment - Darrel, Is the behaviour the same if the poster and viewer both have "normal" course only role assignments?
            Hide
            Enrique Castro added a comment - - edited

            At ULPGC have enabled timed post for the full academic year. The feature was well received by teachers and used in some courses.

            We have found only three "bugs" or inconvenient behaviours that require changes in code

            a) No indication of the time-restriction on the discussion once published
            This is detailed in issue MDL-9070
            Once the post is saved the author can see it, but not the students (if out of time interval), but there is absolutely NO indication of that fact. I propose to print "invisible/hidden" discussions as DIMMED, like activities in course page.
            This would imply to modify function forum_print_discussion_header() in forum/lib.php to check timestart and timeend properties and set DIMMED class.

            b) A mechanism to change dates or REMOVE time limitation AFTER the publication of the post.
            Nos if the teacher erroneously save a post with time limitation cannot make it visible for all afterwards. Teh only way is to modify DB directly. A post in a news forum can be deleted and re-posted without limitation. But this is NOT possible for a whole discussion that was started by a time-restricted post

            c) Error "Discussion ID was incorrect or no longer exists" in NEWS forums
            Due to a) we have experienced the same confusing bug seen by Darrel Tenter
            In a NEWS forum an people with permissions (teachers and admins) can see ALL discussions, but if you try to view a discusion you have not authored you are thrown that error "Discussion ID was incorrect or no longer exists"

            I have traced the bug to some lines at the start of discussion.php script.
            There, by line 45, you can find

                if ($forum->type == 'news') {
                    if (!($USER->id == $discussion->userid || (($discussion->timestart == 0
                        || $discussion->timestart <= time())
                        && ($discussion->timeend == 0 || $discussion->timeend > time())))) {
                        print_error('invaliddiscussionid', 'forum', "$CFG->wwwroot/mod/forum/view.php?f=$forum->id");
                    }
                }
            

            (similar in 1.9 version with message "Discussion ID was incorrect or no longer exists" hardcoded)

            This is a limitation specific for NEWS forum that is quite nonsense. Students CANNOT see the hidden discussions, those are not printed in the list. This condition is affecting to teachers and admins, both with legitimate rights to access to those time-limited discussions.
            In my opinon, either the condition is eliminated completely or the regular checks for applicable permissions are added.

            Show
            Enrique Castro added a comment - - edited At ULPGC have enabled timed post for the full academic year. The feature was well received by teachers and used in some courses. We have found only three "bugs" or inconvenient behaviours that require changes in code a) No indication of the time-restriction on the discussion once published This is detailed in issue MDL-9070 Once the post is saved the author can see it, but not the students (if out of time interval), but there is absolutely NO indication of that fact. I propose to print "invisible/hidden" discussions as DIMMED, like activities in course page. This would imply to modify function forum_print_discussion_header() in forum/lib.php to check timestart and timeend properties and set DIMMED class. b) A mechanism to change dates or REMOVE time limitation AFTER the publication of the post. Nos if the teacher erroneously save a post with time limitation cannot make it visible for all afterwards. Teh only way is to modify DB directly. A post in a news forum can be deleted and re-posted without limitation. But this is NOT possible for a whole discussion that was started by a time-restricted post c) Error "Discussion ID was incorrect or no longer exists" in NEWS forums Due to a) we have experienced the same confusing bug seen by Darrel Tenter In a NEWS forum an people with permissions (teachers and admins) can see ALL discussions, but if you try to view a discusion you have not authored you are thrown that error "Discussion ID was incorrect or no longer exists" I have traced the bug to some lines at the start of discussion.php script. There, by line 45, you can find if ($forum->type == 'news') { if (!($USER->id == $discussion->userid || (($discussion->timestart == 0 || $discussion->timestart <= time()) && ($discussion->timeend == 0 || $discussion->timeend > time())))) { print_error('invaliddiscussionid', 'forum', "$CFG->wwwroot/mod/forum/view.php?f=$forum->id"); } } (similar in 1.9 version with message "Discussion ID was incorrect or no longer exists" hardcoded) This is a limitation specific for NEWS forum that is quite nonsense. Students CANNOT see the hidden discussions, those are not printed in the list. This condition is affecting to teachers and admins, both with legitimate rights to access to those time-limited discussions. In my opinon, either the condition is eliminated completely or the regular checks for applicable permissions are added.
            Hide
            Petr Skoda added a comment -

            reassigning to HQ

            Show
            Petr Skoda added a comment - reassigning to HQ
            Hide
            Amanda Doughty added a comment - - edited

            I have tested this in 2.2 and found that if display is set to more than than two days in advance then email notifications are never sent. This is by design as posts with a creation date longer than two days ago are marked as sent. See forum/lip.php line 2119:

             
            /**
             * Marks posts before a certain time as being mailed already
             *
             * @global object
             * @global object
             * @param int $endtime
             * @param int $now Defaults to time()
             * @return bool
             */
            function forum_mark_old_posts_as_mailed($endtime, $now=null) {
                global $CFG, $DB;
                if (empty($now)) {
                    $now = time();
                }
             
                if (empty($CFG->forum_enabletimedposts)) {
                    return $DB->execute("UPDATE {forum_posts}
                                           SET mailed = '1'
                                         WHERE (created < ? OR mailnow = 1)
                                               AND mailed = 0", array($endtime));
             
                } else {
                    return $DB->execute("UPDATE {forum_posts}
                                           SET mailed = '1'
                                         WHERE discussion NOT IN (SELECT d.id
                                                                    FROM {forum_discussions} d
                                                                   WHERE d.timestart > ?)
                                               AND (created < ? OR mailnow = 1)
                                               AND mailed = 0", array($now, $endtime));
                }
            }
            

            Show
            Amanda Doughty added a comment - - edited I have tested this in 2.2 and found that if display is set to more than than two days in advance then email notifications are never sent. This is by design as posts with a creation date longer than two days ago are marked as sent. See forum/lip.php line 2119: /** * Marks posts before a certain time as being mailed already * * @global object * @global object * @param int $endtime * @param int $now Defaults to time() * @return bool */ function forum_mark_old_posts_as_mailed($endtime, $now=null) { global $CFG, $DB; if (empty($now)) { $now = time(); }   if (empty($CFG->forum_enabletimedposts)) { return $DB->execute("UPDATE {forum_posts} SET mailed = '1' WHERE (created < ? OR mailnow = 1) AND mailed = 0", array($endtime));   } else { return $DB->execute("UPDATE {forum_posts} SET mailed = '1' WHERE discussion NOT IN (SELECT d.id FROM {forum_discussions} d WHERE d.timestart > ?) AND (created < ? OR mailnow = 1) AND mailed = 0", array($now, $endtime)); } }
            Hide
            Donna Hrynkiw added a comment -

            We've just turned on this feature for our faculty. Our testing teacher requests that the original posting date* be replaced with the "Display from" date – as if the teacher had just actually posted.

            * as displayed to the students and is included in e-mail if they are subscribed to the forum.

            Show
            Donna Hrynkiw added a comment - We've just turned on this feature for our faculty. Our testing teacher requests that the original posting date* be replaced with the "Display from" date – as if the teacher had just actually posted. * as displayed to the students and is included in e-mail if they are subscribed to the forum.
            Hide
            Andrew Nicols added a comment -

            This will also need to be changed to a setting on a per-forum basis and the associated upgrade handled with it.

            Show
            Andrew Nicols added a comment - This will also need to be changed to a setting on a per-forum basis and the associated upgrade handled with it.
            Hide
            Hittesh added a comment - - edited

            I cant seem to replicate error (c) or (b) listed by Enrique Castro:
            b) A mechanism to change dates or REMOVE time limitation AFTER the publication of the post.

            • Dates can be changes or disabled easily using the tick boxes

            c) Error "Discussion ID was incorrect or no longer exists" in NEWS forums

            • When Teacher 'A' posts a timed discussion under the default News forum, teacher 'B' can look at it absolutely fine without any errors.
            Show
            Hittesh added a comment - - edited I cant seem to replicate error (c) or (b) listed by Enrique Castro : b) A mechanism to change dates or REMOVE time limitation AFTER the publication of the post. Dates can be changes or disabled easily using the tick boxes c) Error "Discussion ID was incorrect or no longer exists" in NEWS forums When Teacher 'A' posts a timed discussion under the default News forum, teacher 'B' can look at it absolutely fine without any errors.

              People

              • Votes:
                15 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated: