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;
    }