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;
    }