original_string: protected function define_structure() {
  
          $paths = array();
          // To know if we are including userinfo.
          $userinfo = $this->get_setting_value('userinfo');
  
          // Define each element separated.
          $paths[] = new restore_path_element('assign', '/activity/assign');
          if ($userinfo) {
              $submission = new restore_path_element('assign_submission',
                                                     '/activity/assign/submissions/submission');
              $paths[] = $submission;
              $this->add_subplugin_structure('assignsubmission', $submission);
              $grade = new restore_path_element('assign_grade', '/activity/assign/grades/grade');
              $paths[] = $grade;
              $this->add_subplugin_structure('assignfeedback', $grade);
              $userflag = new restore_path_element('assign_userflag',
                                                     '/activity/assign/userflags/userflag');
              $paths[] = $userflag;
          }
  
          $paths[] = new restore_path_element('assign_override', '/activity/assign/overrides/override');
          $paths[] = new restore_path_element('assign_plugin_config',
                                              '/activity/assign/plugin_configs/plugin_config');
  
          return $this->prepare_activity_structure($paths);
      }
code: protected function define_structure() {
  
          $paths = array();
          // To know if we are including userinfo.
          $userinfo = $this->get_setting_value('userinfo');
  
          // Define each element separated.
          $paths[] = new restore_path_element('assign', '/activity/assign');
          if ($userinfo) {
              $submission = new restore_path_element('assign_submission',
                                                     '/activity/assign/submissions/submission');
              $paths[] = $submission;
              $this->add_subplugin_structure('assignsubmission', $submission);
              $grade = new restore_path_element('assign_grade', '/activity/assign/grades/grade');
              $paths[] = $grade;
              $this->add_subplugin_structure('assignfeedback', $grade);
              $userflag = new restore_path_element('assign_userflag',
                                                     '/activity/assign/userflags/userflag');
              $paths[] = $userflag;
          }
  
          $paths[] = new restore_path_element('assign_override', '/activity/assign/overrides/override');
          $paths[] = new restore_path_element('assign_plugin_config',
                                              '/activity/assign/plugin_configs/plugin_config');
  
          return $this->prepare_activity_structure($paths);
      }
code_tokens: protected function define_structure ( ) { $ paths = array ( ) ; // To know if we are including userinfo. $ userinfo = $ this -> get_setting_value ( 'userinfo' ) ; // Define each element separated. $ paths [ ] = new restore_path_element ( 'assign' , '/activity/assign' ) ; if ( $ userinfo ) { $ submission = new restore_path_element ( 'assign_submission' , '/activity/assign/submissions/submission' ) ; $ paths [ ] = $ submission ; $ this -> add_subplugin_structure ( 'assignsubmission' , $ submission ) ; $ grade = new restore_path_element ( 'assign_grade' , '/activity/assign/grades/grade' ) ; $ paths [ ] = $ grade ; $ this -> add_subplugin_structure ( 'assignfeedback' , $ grade ) ; $ userflag = new restore_path_element ( 'assign_userflag' , '/activity/assign/userflags/userflag' ) ; $ paths [ ] = $ userflag ; } $ paths [ ] = new restore_path_element ( 'assign_override' , '/activity/assign/overrides/override' ) ; $ paths [ ] = new restore_path_element ( 'assign_plugin_config' , '/activity/assign/plugin_configs/plugin_config' ) ; return $ this -> prepare_activity_structure ( $ paths ) ; }
docstring: Define the structure of the restore workflow.
  
  @return restore_path_element $structure
docstring_tokens: Define the structure of the restore workflow .