original_string: protected function get_group_options($coursecontext) {
          $groups = array(0 => get_string('none'));
          if (has_capability('moodle/course:managegroups', $coursecontext)) {
              $groups[COHORT_CREATE_GROUP] = get_string('creategroup', 'enrol_cohort');
          }
  
          foreach (groups_get_all_groups($coursecontext->instanceid) as $group) {
              $groups[$group->id] = format_string($group->name, true, array('context' => $coursecontext));
          }
  
          return $groups;
      }
code: protected function get_group_options($coursecontext) {
          $groups = array(0 => get_string('none'));
          if (has_capability('moodle/course:managegroups', $coursecontext)) {
              $groups[COHORT_CREATE_GROUP] = get_string('creategroup', 'enrol_cohort');
          }
  
          foreach (groups_get_all_groups($coursecontext->instanceid) as $group) {
              $groups[$group->id] = format_string($group->name, true, array('context' => $coursecontext));
          }
  
          return $groups;
      }
code_tokens: protected function get_group_options ( $ coursecontext ) { $ groups = array ( 0 => get_string ( 'none' ) ) ; if ( has_capability ( 'moodle/course:managegroups' , $ coursecontext ) ) { $ groups [ COHORT_CREATE_GROUP ] = get_string ( 'creategroup' , 'enrol_cohort' ) ; } foreach ( groups_get_all_groups ( $ coursecontext -> instanceid ) as $ group ) { $ groups [ $ group -> id ] = format_string ( $ group -> name , true , array ( 'context' => $ coursecontext ) ) ; } return $ groups ; }
docstring: Return an array of valid options for the groups.
  
  @param context $coursecontext
  @return array
docstring_tokens: Return an array of valid options for the groups .