The ability to view the group dropdown was too closely related to the
movediscussions capability when posting, or editing a forum post.
The movedicussions capability should only be considered for some parts of
this logic. Users should be able to select the group to post to when
writing message, as long as they have access to that group.
If the user has posted in the forum before, follow their previous
discussion preference.
If the user has not posted before, but is subscribed to the forum, follow
their forum preference.
Otherwise, follow their user-preference.
This has the result that if a user has unsubscribed from a forum and writes
their first response; the user preference will be followed. This may
override the forum subscription.
This commit also changes from a dropdown to a checkbox in the post form.
In order to post to all groups in a forum, you must have the
moodle/site:accessallgroups capability.
Thanks to Jakob Ackermann <jackermann@onlineschool.ca> for part of the fix
on this one.