original_string: public function render_grade_link($counts, $type, $gradestring, $gradequestionurl) {
          $output = '';
          if ($counts->$type > 0) {
              $output .= ' ' . html_writer::link(
                              $gradequestionurl,
                              get_string($gradestring, 'quiz_grading'),
                              ['class' => 'gradetheselink']);
          }
          return $output;
      }
code: public function render_grade_link($counts, $type, $gradestring, $gradequestionurl) {
          $output = '';
          if ($counts->$type > 0) {
              $output .= ' ' . html_writer::link(
                              $gradequestionurl,
                              get_string($gradestring, 'quiz_grading'),
                              ['class' => 'gradetheselink']);
          }
          return $output;
      }
code_tokens: public function render_grade_link ( $ counts , $ type , $ gradestring , $ gradequestionurl ) { $ output = '' ; if ( $ counts -> $ type > 0 ) { $ output .= ' ' . html_writer :: link ( $ gradequestionurl , get_string ( $ gradestring , 'quiz_grading' ) , [ 'class' => 'gradetheselink' ] ) ; } return $ output ; }
docstring: Render grade link for question.
  
  @param object $counts
  @param string $type Type of grade.
  @param string $gradestring Lang string.
  @param moodle_url $gradequestionurl Url to grade question.
  @return string The HTML for the question grade link.
  @throws coding_exception
docstring_tokens: Render grade link for question .