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

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 1.5.4
    • 1.5.4
    • Forum
    • None
    • MOODLE_15_STABLE
    • 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

              lazyfish Yu Zhang
              petcheverry Pablo Etcheverry
              Andrew Lyons, 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:
                30/May/06