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


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

      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))) )

      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

            Unassigned Unassigned
            nadavkav Nadav Kavalerchik
            3 Vote for this issue
            3 Start watching this issue


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