protected function get_question_heading($attempt, $shownames, $showidnumbers) {
        $a = new stdClass();
        $a->attempt = $attempt->attempt;
        $a->fullname = fullname($attempt);
        $a->idnumber = $attempt->idnumber;

        $showidnumbers = $showidnumbers && !empty($attempt->idnumber);

        if ($shownames && $showidnumbers) {
            return get_string('gradingattemptwithidnumber', 'quiz_grading', $a);
        } else if ($shownames) {
            return get_string('gradingattempt', 'quiz_grading', $a);
        } else if ($showidnumbers) {
            $a->fullname = $attempt->idnumber;
            return get_string('gradingattempt', 'quiz_grading', $a);
        } else {
            return '';
        }
    }
protected function get_question_heading($attempt, $shownames, $showidnumbers) {
        $a = new stdClass();
        $a->attempt = $attempt->attempt;
        $a->fullname = fullname($attempt);
        $a->idnumber = $attempt->idnumber;

        $showidnumbers = $showidnumbers && !empty($attempt->idnumber);

        if ($shownames && $showidnumbers) {
            return get_string('gradingattemptwithidnumber', 'quiz_grading', $a);
        } else if ($shownames) {
            return get_string('gradingattempt', 'quiz_grading', $a);
        } else if ($showidnumbers) {
            $a->fullname = $attempt->idnumber;
            return get_string('gradingattempt', 'quiz_grading', $a);
        } else {
            return '';
        }
    }
protected function get_question_heading ( $ attempt , $ shownames , $ showidnumbers ) { $ a = new stdClass ( ) ; $ a -> attempt = $ attempt -> attempt ; $ a -> fullname = fullname ( $ attempt ) ; $ a -> idnumber = $ attempt -> idnumber ; $ showidnumbers = $ showidnumbers && ! empty ( $ attempt -> idnumber ) ; if ( $ shownames && $ showidnumbers ) { return get_string ( 'gradingattemptwithidnumber' , 'quiz_grading' , $ a ) ; } else if ( $ shownames ) { return get_string ( 'gradingattempt' , 'quiz_grading' , $ a ) ; } else if ( $ showidnumbers ) { $ a -> fullname = $ attempt -> idnumber ; return get_string ( 'gradingattempt' , 'quiz_grading' , $ a ) ; } else { return '' ; } }
Get question heading.

@param object $attempt an instance of quiz_attempt.
@param bool $shownames True to show the question name.
@param bool $showidnumbers True to show the question id number.
@return string The string text for the question heading.
@throws coding_exception
Get question heading .