original_string: public function add_module_config($name, $config, $group = null) {
          if ($group) {
              if (!isset($this->groups[$name])) {
                  throw new coding_exception('The Moodle YUI module does not exist. You must define the moodle module config using YUI_config->add_module_config first.');
              }
              if (!isset($this->groups[$group]['modules'])) {
                  $this->groups[$group]['modules'] = array();
              }
              $modules = &$this->groups[$group]['modules'];
          } else {
              $modules = &$this->modules;
          }
          $modules[$name] = $config;
      }
code: public function add_module_config($name, $config, $group = null) {
          if ($group) {
              if (!isset($this->groups[$name])) {
                  throw new coding_exception('The Moodle YUI module does not exist. You must define the moodle module config using YUI_config->add_module_config first.');
              }
              if (!isset($this->groups[$group]['modules'])) {
                  $this->groups[$group]['modules'] = array();
              }
              $modules = &$this->groups[$group]['modules'];
          } else {
              $modules = &$this->modules;
          }
          $modules[$name] = $config;
      }
code_tokens: public function add_module_config ( $ name , $ config , $ group = null ) { if ( $ group ) { if ( ! isset ( $ this -> groups [ $ name ] ) ) { throw new coding_exception ( 'The Moodle YUI module does not exist. You must define the moodle module config using YUI_config->add_module_config first.' ) ; } if ( ! isset ( $ this -> groups [ $ group ] [ 'modules' ] ) ) { $ this -> groups [ $ group ] [ 'modules' ] = array ( ) ; } $ modules = & $ this -> groups [ $ group ] [ 'modules' ] ; } else { $ modules = & $ this -> modules ; } $ modules [ $ name ] = $ config ; }
docstring: Add configuration for a specific module.
  
  @param String $name The name of the module to add configuration for.
  @param Array $config The configuration for the specified module.
  @param String $group The name of the group to add configuration for.
  If not specified, then this module is added to the global
  configuration.
  @return void
docstring_tokens: Add configuration for a specific module .