original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Helper function generate assignment submission output object for exporting.
  
  @param object $submissiondata    Object containing assignment submission data.
  @return object                   Formatted assignment submission output for exporting.
docstring_tokens: Helper function generate assignment submission output object for exporting .