original_string: public static function export_overrides(\context $context, \assign $assign, \stdClass $user) {
  
          $overrides = $assign->override_exists($user->id);
          // Overrides returns an array with data in it, but an override with actual data will have the assign ID set.
          if (isset($overrides->assignid)) {
              $data = new \stdClass();
              if (!empty($overrides->duedate)) {
                  $data->duedate = transform::datetime($overrides->duedate);
              }
              if (!empty($overrides->cutoffdate)) {
                  $data->cutoffdate = transform::datetime($overrides->cutoffdate);
              }
              if (!empty($overrides->allowsubmissionsfromdate)) {
                  $data->allowsubmissionsfromdate = transform::datetime($overrides->allowsubmissionsfromdate);
              }
              if (!empty($data)) {
                  writer::with_context($context)->export_data([get_string('overrides', 'mod_assign')], $data);
              }
          }
      }
code: public static function export_overrides(\context $context, \assign $assign, \stdClass $user) {
  
          $overrides = $assign->override_exists($user->id);
          // Overrides returns an array with data in it, but an override with actual data will have the assign ID set.
          if (isset($overrides->assignid)) {
              $data = new \stdClass();
              if (!empty($overrides->duedate)) {
                  $data->duedate = transform::datetime($overrides->duedate);
              }
              if (!empty($overrides->cutoffdate)) {
                  $data->cutoffdate = transform::datetime($overrides->cutoffdate);
              }
              if (!empty($overrides->allowsubmissionsfromdate)) {
                  $data->allowsubmissionsfromdate = transform::datetime($overrides->allowsubmissionsfromdate);
              }
              if (!empty($data)) {
                  writer::with_context($context)->export_data([get_string('overrides', 'mod_assign')], $data);
              }
          }
      }
code_tokens: public static function export_overrides ( \ context $ context , \ assign $ assign , \ stdClass $ user ) { $ overrides = $ assign -> override_exists ( $ user -> id ) ; // Overrides returns an array with data in it, but an override with actual data will have the assign ID set. if ( isset ( $ overrides -> assignid ) ) { $ data = new \ stdClass ( ) ; if ( ! empty ( $ overrides -> duedate ) ) { $ data -> duedate = transform :: datetime ( $ overrides -> duedate ) ; } if ( ! empty ( $ overrides -> cutoffdate ) ) { $ data -> cutoffdate = transform :: datetime ( $ overrides -> cutoffdate ) ; } if ( ! empty ( $ overrides -> allowsubmissionsfromdate ) ) { $ data -> allowsubmissionsfromdate = transform :: datetime ( $ overrides -> allowsubmissionsfromdate ) ; } if ( ! empty ( $ data ) ) { writer :: with_context ( $ context ) -> export_data ( [ get_string ( 'overrides' , 'mod_assign' ) ] , $ data ) ; } } }
docstring: Export overrides for this assignment.
  
  @param  \context $context Context
  @param  \assign $assign The assign object.
  @param  \stdClass $user The user object.
docstring_tokens: Export overrides for this assignment .