original_string: public function col_groups($data) {
          global $OUTPUT;
  
          $usergroups = [];
          foreach ($this->groups as $coursegroup) {
              if (isset($coursegroup->members[$data->id])) {
                  $usergroups[] = $coursegroup->id;
              }
          }
          $editable = new \core_group\output\user_groups_editable($this->course, $this->context, $data, $this->groups, $usergroups);
          return $OUTPUT->render_from_template('core/inplace_editable', $editable->export_for_template($OUTPUT));
      }
code: public function col_groups($data) {
          global $OUTPUT;
  
          $usergroups = [];
          foreach ($this->groups as $coursegroup) {
              if (isset($coursegroup->members[$data->id])) {
                  $usergroups[] = $coursegroup->id;
              }
          }
          $editable = new \core_group\output\user_groups_editable($this->course, $this->context, $data, $this->groups, $usergroups);
          return $OUTPUT->render_from_template('core/inplace_editable', $editable->export_for_template($OUTPUT));
      }
code_tokens: public function col_groups ( $ data ) { global $ OUTPUT ; $ usergroups = [ ] ; foreach ( $ this -> groups as $ coursegroup ) { if ( isset ( $ coursegroup -> members [ $ data -> id ] ) ) { $ usergroups [ ] = $ coursegroup -> id ; } } $ editable = new \ core_group \ output \ user_groups_editable ( $ this -> course , $ this -> context , $ data , $ this -> groups , $ usergroups ) ; return $ OUTPUT -> render_from_template ( 'core/inplace_editable' , $ editable -> export_for_template ( $ OUTPUT ) ) ; }
docstring: Generate the groups column.
  
  @param \stdClass $data
  @return string
docstring_tokens: Generate the groups column .