original_string: protected static function export_grade_data(\stdClass $grade, \context $context, array $currentpath) {
          $gradedata = (object)[
              'timecreated' => transform::datetime($grade->timecreated),
              'timemodified' => transform::datetime($grade->timemodified),
              'grader' => transform::user($grade->grader),
              'grade' => $grade->grade,
              'attemptnumber' => ($grade->attemptnumber + 1)
          ];
          writer::with_context($context)
                  ->export_data(array_merge($currentpath, [get_string('privacy:gradepath', 'mod_assign')]), $gradedata);
      }
code: protected static function export_grade_data(\stdClass $grade, \context $context, array $currentpath) {
          $gradedata = (object)[
              'timecreated' => transform::datetime($grade->timecreated),
              'timemodified' => transform::datetime($grade->timemodified),
              'grader' => transform::user($grade->grader),
              'grade' => $grade->grade,
              'attemptnumber' => ($grade->attemptnumber + 1)
          ];
          writer::with_context($context)
                  ->export_data(array_merge($currentpath, [get_string('privacy:gradepath', 'mod_assign')]), $gradedata);
      }
code_tokens: protected static function export_grade_data ( \ stdClass $ grade , \ context $ context , array $ currentpath ) { $ gradedata = ( object ) [ 'timecreated' => transform :: datetime ( $ grade -> timecreated ) , 'timemodified' => transform :: datetime ( $ grade -> timemodified ) , 'grader' => transform :: user ( $ grade -> grader ) , 'grade' => $ grade -> grade , 'attemptnumber' => ( $ grade -> attemptnumber + 1 ) ] ; writer :: with_context ( $ context ) -> export_data ( array_merge ( $ currentpath , [ get_string ( 'privacy:gradepath' , 'mod_assign' ) ] ) , $ gradedata ) ; }
docstring: Formats and then exports the user's grade data.
  
  @param  \stdClass $grade The assign grade object
  @param  \context $context The context object
  @param  array $currentpath Current directory path that we are exporting to.
docstring_tokens: Formats and then exports the user s grade data .