original_string: protected function define_structure() {
  
          $paths = array();
          $userinfo = $this->get_setting_value('userinfo');
  
          $area = new restore_path_element('grading_area', '/areas/area');
          $paths[] = $area;
          // attach local plugin stucture to $area element
          $this->add_plugin_structure('local', $area);
  
          $definition = new restore_path_element('grading_definition', '/areas/area/definitions/definition');
          $paths[] = $definition;
          $this->add_plugin_structure('gradingform', $definition);
          // attach local plugin stucture to $definition element
          $this->add_plugin_structure('local', $definition);
  
  
          if ($userinfo) {
              $instance = new restore_path_element('grading_instance',
                  '/areas/area/definitions/definition/instances/instance');
              $paths[] = $instance;
              $this->add_plugin_structure('gradingform', $instance);
              // attach local plugin stucture to $intance element
              $this->add_plugin_structure('local', $instance);
          }
  
          return $paths;
      }
code: protected function define_structure() {
  
          $paths = array();
          $userinfo = $this->get_setting_value('userinfo');
  
          $area = new restore_path_element('grading_area', '/areas/area');
          $paths[] = $area;
          // attach local plugin stucture to $area element
          $this->add_plugin_structure('local', $area);
  
          $definition = new restore_path_element('grading_definition', '/areas/area/definitions/definition');
          $paths[] = $definition;
          $this->add_plugin_structure('gradingform', $definition);
          // attach local plugin stucture to $definition element
          $this->add_plugin_structure('local', $definition);
  
  
          if ($userinfo) {
              $instance = new restore_path_element('grading_instance',
                  '/areas/area/definitions/definition/instances/instance');
              $paths[] = $instance;
              $this->add_plugin_structure('gradingform', $instance);
              // attach local plugin stucture to $intance element
              $this->add_plugin_structure('local', $instance);
          }
  
          return $paths;
      }
code_tokens: protected function define_structure ( ) { $ paths = array ( ) ; $ userinfo = $ this -> get_setting_value ( 'userinfo' ) ; $ area = new restore_path_element ( 'grading_area' , '/areas/area' ) ; $ paths [ ] = $ area ; // attach local plugin stucture to $area element $ this -> add_plugin_structure ( 'local' , $ area ) ; $ definition = new restore_path_element ( 'grading_definition' , '/areas/area/definitions/definition' ) ; $ paths [ ] = $ definition ; $ this -> add_plugin_structure ( 'gradingform' , $ definition ) ; // attach local plugin stucture to $definition element $ this -> add_plugin_structure ( 'local' , $ definition ) ; if ( $ userinfo ) { $ instance = new restore_path_element ( 'grading_instance' , '/areas/area/definitions/definition/instances/instance' ) ; $ paths [ ] = $ instance ; $ this -> add_plugin_structure ( 'gradingform' , $ instance ) ; // attach local plugin stucture to $intance element $ this -> add_plugin_structure ( 'local' , $ instance ) ; } return $ paths ; }
docstring: Declares paths in the grading.xml file we are interested in
docstring_tokens: Declares paths in the grading . xml file we are interested in