original_string: protected function generate_modgrade_subelement_id($subname) {
          $gid = str_replace(array('[', ']'), array('_', ''), $this->getName());
          return clean_param('id_'.$gid.'_'.$subname, PARAM_ALPHANUMEXT);
      }
code: protected function generate_modgrade_subelement_id($subname) {
          $gid = str_replace(array('[', ']'), array('_', ''), $this->getName());
          return clean_param('id_'.$gid.'_'.$subname, PARAM_ALPHANUMEXT);
      }
code_tokens: protected function generate_modgrade_subelement_id ( $ subname ) { $ gid = str_replace ( array ( '[' , ']' ) , array ( '_' , '' ) , $ this -> getName ( ) ) ; return clean_param ( 'id_' . $ gid . '_' . $ subname , PARAM_ALPHANUMEXT ) ; }
docstring: Generates the id attribute for the subelement of the modgrade group.
  
  Uses algorithm similar to what {@link HTML_QuickForm_element::_generateId()}
  does but takes the name of the wrapping modgrade group into account.
  
  @param string $subname the name of the HTML_QuickForm_element in this modgrade group
  @return string
docstring_tokens: Generates the id attribute for the subelement of the modgrade group .