original_string: public function reset_userdata(stdClass $data) {
  
          $componentstr = get_string('pluginname', 'workshop').': '.format_string($this->name);
          $status = array();
  
          if (!empty($data->reset_workshop_assessments) or !empty($data->reset_workshop_submissions)) {
              // Reset all data related to assessments, including assessments of
              // example submissions.
              $result = $this->reset_userdata_assessments($data);
              if ($result === true) {
                  $status[] = array(
                      'component' => $componentstr,
                      'item' => get_string('resetassessments', 'mod_workshop'),
                      'error' => false,
                  );
              } else {
                  $status[] = array(
                      'component' => $componentstr,
                      'item' => get_string('resetassessments', 'mod_workshop'),
                      'error' => $result,
                  );
              }
          }
  
          if (!empty($data->reset_workshop_submissions)) {
              // Reset all remaining data related to submissions.
              $result = $this->reset_userdata_submissions($data);
              if ($result === true) {
                  $status[] = array(
                      'component' => $componentstr,
                      'item' => get_string('resetsubmissions', 'mod_workshop'),
                      'error' => false,
                  );
              } else {
                  $status[] = array(
                      'component' => $componentstr,
                      'item' => get_string('resetsubmissions', 'mod_workshop'),
                      'error' => $result,
                  );
              }
          }
  
          if (!empty($data->reset_workshop_phase)) {
              // Do not use the {@link workshop::switch_phase()} here, we do not
              // want to trigger events.
              $this->reset_phase();
              $status[] = array(
                  'component' => $componentstr,
                  'item' => get_string('resetsubmissions', 'mod_workshop'),
                  'error' => false,
              );
          }
  
          return $status;
      }
code: public function reset_userdata(stdClass $data) {
  
          $componentstr = get_string('pluginname', 'workshop').': '.format_string($this->name);
          $status = array();
  
          if (!empty($data->reset_workshop_assessments) or !empty($data->reset_workshop_submissions)) {
              // Reset all data related to assessments, including assessments of
              // example submissions.
              $result = $this->reset_userdata_assessments($data);
              if ($result === true) {
                  $status[] = array(
                      'component' => $componentstr,
                      'item' => get_string('resetassessments', 'mod_workshop'),
                      'error' => false,
                  );
              } else {
                  $status[] = array(
                      'component' => $componentstr,
                      'item' => get_string('resetassessments', 'mod_workshop'),
                      'error' => $result,
                  );
              }
          }
  
          if (!empty($data->reset_workshop_submissions)) {
              // Reset all remaining data related to submissions.
              $result = $this->reset_userdata_submissions($data);
              if ($result === true) {
                  $status[] = array(
                      'component' => $componentstr,
                      'item' => get_string('resetsubmissions', 'mod_workshop'),
                      'error' => false,
                  );
              } else {
                  $status[] = array(
                      'component' => $componentstr,
                      'item' => get_string('resetsubmissions', 'mod_workshop'),
                      'error' => $result,
                  );
              }
          }
  
          if (!empty($data->reset_workshop_phase)) {
              // Do not use the {@link workshop::switch_phase()} here, we do not
              // want to trigger events.
              $this->reset_phase();
              $status[] = array(
                  'component' => $componentstr,
                  'item' => get_string('resetsubmissions', 'mod_workshop'),
                  'error' => false,
              );
          }
  
          return $status;
      }
code_tokens: public function reset_userdata ( stdClass $ data ) { $ componentstr = get_string ( 'pluginname' , 'workshop' ) . ': ' . format_string ( $ this -> name ) ; $ status = array ( ) ; if ( ! empty ( $ data -> reset_workshop_assessments ) or ! empty ( $ data -> reset_workshop_submissions ) ) { // Reset all data related to assessments, including assessments of // example submissions. $ result = $ this -> reset_userdata_assessments ( $ data ) ; if ( $ result === true ) { $ status [ ] = array ( 'component' => $ componentstr , 'item' => get_string ( 'resetassessments' , 'mod_workshop' ) , 'error' => false , ) ; } else { $ status [ ] = array ( 'component' => $ componentstr , 'item' => get_string ( 'resetassessments' , 'mod_workshop' ) , 'error' => $ result , ) ; } } if ( ! empty ( $ data -> reset_workshop_submissions ) ) { // Reset all remaining data related to submissions. $ result = $ this -> reset_userdata_submissions ( $ data ) ; if ( $ result === true ) { $ status [ ] = array ( 'component' => $ componentstr , 'item' => get_string ( 'resetsubmissions' , 'mod_workshop' ) , 'error' => false , ) ; } else { $ status [ ] = array ( 'component' => $ componentstr , 'item' => get_string ( 'resetsubmissions' , 'mod_workshop' ) , 'error' => $ result , ) ; } } if ( ! empty ( $ data -> reset_workshop_phase ) ) { // Do not use the {@link workshop::switch_phase()} here, we do not // want to trigger events. $ this -> reset_phase ( ) ; $ status [ ] = array ( 'component' => $ componentstr , 'item' => get_string ( 'resetsubmissions' , 'mod_workshop' ) , 'error' => false , ) ; } return $ status ; }
docstring: Performs the reset of this workshop instance.
  
  @param stdClass $data The actual course reset settings.
  @return array List of results, each being array[(string)component, (string)item, (string)error]
docstring_tokens: Performs the reset of this workshop instance .