original_string: protected static function transform_evidence($userid, evidence $evidence, competency $competency, performance_helper $helper) {
          $action = $evidence->get('action');
          $actiontxt = '?';
          if ($action == evidence::ACTION_LOG) {
              $actiontxt = get_string('privacy:evidence:action:log', 'core_competency');
          } else if ($action == evidence::ACTION_COMPLETE) {
              $actiontxt = get_string('privacy:evidence:action:complete', 'core_competency');
          } else if ($action == evidence::ACTION_OVERRIDE) {
              $actiontxt = get_string('privacy:evidence:action:override', 'core_competency');
          }
  
          $actionuserid = $evidence->get('actionuserid');
  
          return [
              'action' => $actiontxt,
              'actionuserid' => $actionuserid ? transform::user($actionuserid) : '-',
              'acting_user_is_you' => transform::yesno($userid == $actionuserid),
              'description' => (string) $evidence->get_description(),
              'url' => $evidence->get('url'),
              'grade' => static::transform_competency_grade($competency, $evidence->get('grade'), $helper),
              'note' => $evidence->get('note'),
              'timecreated' => transform::datetime($evidence->get('timecreated')),
              'timemodified' => transform::datetime($evidence->get('timemodified')),
              'created_or_modified_by_you' => transform::yesno($userid == $evidence->get('usermodified'))
          ];
      }
code: protected static function transform_evidence($userid, evidence $evidence, competency $competency, performance_helper $helper) {
          $action = $evidence->get('action');
          $actiontxt = '?';
          if ($action == evidence::ACTION_LOG) {
              $actiontxt = get_string('privacy:evidence:action:log', 'core_competency');
          } else if ($action == evidence::ACTION_COMPLETE) {
              $actiontxt = get_string('privacy:evidence:action:complete', 'core_competency');
          } else if ($action == evidence::ACTION_OVERRIDE) {
              $actiontxt = get_string('privacy:evidence:action:override', 'core_competency');
          }
  
          $actionuserid = $evidence->get('actionuserid');
  
          return [
              'action' => $actiontxt,
              'actionuserid' => $actionuserid ? transform::user($actionuserid) : '-',
              'acting_user_is_you' => transform::yesno($userid == $actionuserid),
              'description' => (string) $evidence->get_description(),
              'url' => $evidence->get('url'),
              'grade' => static::transform_competency_grade($competency, $evidence->get('grade'), $helper),
              'note' => $evidence->get('note'),
              'timecreated' => transform::datetime($evidence->get('timecreated')),
              'timemodified' => transform::datetime($evidence->get('timemodified')),
              'created_or_modified_by_you' => transform::yesno($userid == $evidence->get('usermodified'))
          ];
      }
code_tokens: protected static function transform_evidence ( $ userid , evidence $ evidence , competency $ competency , performance_helper $ helper ) { $ action = $ evidence -> get ( 'action' ) ; $ actiontxt = '?' ; if ( $ action == evidence :: ACTION_LOG ) { $ actiontxt = get_string ( 'privacy:evidence:action:log' , 'core_competency' ) ; } else if ( $ action == evidence :: ACTION_COMPLETE ) { $ actiontxt = get_string ( 'privacy:evidence:action:complete' , 'core_competency' ) ; } else if ( $ action == evidence :: ACTION_OVERRIDE ) { $ actiontxt = get_string ( 'privacy:evidence:action:override' , 'core_competency' ) ; } $ actionuserid = $ evidence -> get ( 'actionuserid' ) ; return [ 'action' => $ actiontxt , 'actionuserid' => $ actionuserid ? transform :: user ( $ actionuserid ) : '-' , 'acting_user_is_you' => transform :: yesno ( $ userid == $ actionuserid ) , 'description' => ( string ) $ evidence -> get_description ( ) , 'url' => $ evidence -> get ( 'url' ) , 'grade' => static :: transform_competency_grade ( $ competency , $ evidence -> get ( 'grade' ) , $ helper ) , 'note' => $ evidence -> get ( 'note' ) , 'timecreated' => transform :: datetime ( $ evidence -> get ( 'timecreated' ) ) , 'timemodified' => transform :: datetime ( $ evidence -> get ( 'timemodified' ) ) , 'created_or_modified_by_you' => transform :: yesno ( $ userid == $ evidence -> get ( 'usermodified' ) ) ] ; }
docstring: Transform an evidence.
  
  @param int $userid The user ID we are exporting for.
  @param evidence $evidence The evidence.
  @param competency $competency The associated competency.
  @param performance_helper $helper The performance helper.
  @return array
docstring_tokens: Transform an evidence .