original_string: public function col_roles($data) {
          global $OUTPUT;
  
          $roles = isset($this->allroleassignments[$data->id]) ? $this->allroleassignments[$data->id] : [];
          $editable = new \core_user\output\user_roles_editable($this->course,
                                                                $this->context,
                                                                $data,
                                                                $this->allroles,
                                                                $this->assignableroles,
                                                                $this->profileroles,
                                                                $roles,
                                                                $this->viewableroles);
  
          return $OUTPUT->render_from_template('core/inplace_editable', $editable->export_for_template($OUTPUT));
      }
code: public function col_roles($data) {
          global $OUTPUT;
  
          $roles = isset($this->allroleassignments[$data->id]) ? $this->allroleassignments[$data->id] : [];
          $editable = new \core_user\output\user_roles_editable($this->course,
                                                                $this->context,
                                                                $data,
                                                                $this->allroles,
                                                                $this->assignableroles,
                                                                $this->profileroles,
                                                                $roles,
                                                                $this->viewableroles);
  
          return $OUTPUT->render_from_template('core/inplace_editable', $editable->export_for_template($OUTPUT));
      }
code_tokens: public function col_roles ( $ data ) { global $ OUTPUT ; $ roles = isset ( $ this -> allroleassignments [ $ data -> id ] ) ? $ this -> allroleassignments [ $ data -> id ] : [ ] ; $ editable = new \ core_user \ output \ user_roles_editable ( $ this -> course , $ this -> context , $ data , $ this -> allroles , $ this -> assignableroles , $ this -> profileroles , $ roles , $ this -> viewableroles ) ; return $ OUTPUT -> render_from_template ( 'core/inplace_editable' , $ editable -> export_for_template ( $ OUTPUT ) ) ; }
docstring: User roles column.
  
  @param \stdClass $data
  @return string
docstring_tokens: User roles column .