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

prevent students from being able to start new discussion in Q and A forum type

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Inactive
    • Minor
    • None
    • 1.9
    • Forum
    • None
    • MOODLE_19_STABLE
    • Easy

    Description

      teachers asked me to disable the "start new discussion" button from student's view
      when they navigate into a "Q and A" forum type. since most of them just start a new
      discussion instead of opening a discussion started by the teacher and answering it
      (as the teacher expect them too) and thus missing the whole point of Q and A forum.

      to patch...
      open moodle/mod/forum/lib.php (line 4692~)

      change :
      if (forum_user_can_post_discussion($forum, $currentgroup, $groupmode, $cm, $context) ||
      ($forum->type != 'news' and (isguestuser() or !isloggedin() or has_capability('moodle/legacy:guest', $context, NULL, false))) )
      {

      to:
      if ( (forum_user_can_post_discussion($forum, $currentgroup, $groupmode, $cm, $context) ||
      ($forum->type != 'news' and (isguestuser() or !isloggedin() or has_capability('moodle/legacy:guest', $context, NULL, false))) )
      and !(has_capability('moodle/legacy:student', $context, NULL, false) and $forum->type == 'qanda') )
      {

      maybe we should have a $CFG for this ? or maybe a better way to implement this ?
      not sure. any feedback is very welcome

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nadavkav Nadav Kavalerchik
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.