Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-7671

On "general" type forums, setting "open" to 0 doesn't prevent the "Reply" option to appear.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.5.4
    • Fix Version/s: 1.5.4
    • Component/s: Forum
    • Labels:
      None
    • Affected Branches:
      MOODLE_15_STABLE
    • Fixed Branches:
      MOODLE_15_STABLE

      Description

      On "general" type forums, setting "open" to 0 doesn't prevent the "Reply" option to appear.

      This problem was detected when a forum had some postings and the teacher decided that the work should go on in some other place. So she set "open" to "0" but the Reply option still appeared. Of course, when students clicked on that link, a red box (in ENGLISH) appeared: "Sorry, but you can not post in this forum", so they could not really reply, even though Moodle said so.

      FIX:
      ===
      Simply check the "open" state before showing the "Reply" link.

      In discuss.php:
      Line 147: if(!$forum->open)

      { Line 148: $canreply = false; Line 149: }

      elseif ((empty($mygroupid) and $discussion->groupid == 1) || ($mygroupid == $discussion>groupid)) {
      ...

      Line 160: $canreply = ((empty($mygroupid) and $discussion->groupid == 1) || ($mygroupid == $discussion>groupid)) and $forum->open;
      ...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lazyfish Yu Zhang
              Reporter:
              petcheverry Pablo Etcheverry
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                30/May/06