Once groups are set-up in Moodle
“Turn editing on” > in selected section, click “Add an activity or resource” > “Forum” > complete the required fields > in “Common module settings” > “Group mode” > separate groups > scroll to bottom of the page and click “Save”. Students will only see the posts made by their group members. The instructor has the option to see All participants in the Forum (members of all the groups) or can select to view individual group discussions.
You may need to “Expand all” to see all the options in “Common module settings”
Select how you wish to view the activity either by group or everyone in the class