protected static function get_assignment_submission_output($submissiondata) {
        $submission = (object) [
            'assignment' => $submissiondata->assignment,
            'numfiles' => $submissiondata->numfiles,
            'data1' => $submissiondata->data1,
            'data2' => $submissiondata->data2,
            'grade' => $submissiondata->grade,
            'submissioncomment' => $submissiondata->submissioncomment,
            'teacher' => transform::user($submissiondata->teacher)
        ];

        if ($submissiondata->timecreated != 0) {
            $submission->timecreated = transform::datetime($submissiondata->timecreated);
        }

        if ($submissiondata->timemarked != 0) {
            $submission->timemarked = transform::datetime($submissiondata->timemarked);
        }

        if ($submissiondata->timemodified != 0) {
            $submission->timemodified = transform::datetime($submissiondata->timemodified);
        }

        return $submission;
    }