To set groups for your course activities do the following.
  1. On your Moodle page Turn Edit mode on

    Edit mode button
  2. After you have added a resource or an activity you can update its settings by clicking the Edit link, then select Edit settings:

    Edit dropdown menu indicating Edit settings.
  3. On the editing page pay particular attention to Common module settings, and Restrict access.
  4. To restrict to a certain Group, click Add restriction. 
  5. Select Group.Editing page sections Common module settings, and Restrict access.
  6. Choose the group you wish to restrict access to from the dropdown. 
    Note: Click on the eye icon to hide section/activity entirely from other groups who do not match the group chosen. 
    restrict access settings for test group 1
  7. Click Save and Display