public static function get_quiz_attempt_subcontext(\stdClass $attempt, \stdClass $user) {
        $subcontext = [
            get_string('attempts', 'mod_quiz'),
        ];
        if ($attempt->userid != $user->id) {
            $subcontext[] = fullname($user);
        }
        $subcontext[] = $attempt->attempt;

        return $subcontext;
    }
public static function get_quiz_attempt_subcontext(\stdClass $attempt, \stdClass $user) {
        $subcontext = [
            get_string('attempts', 'mod_quiz'),
        ];
        if ($attempt->userid != $user->id) {
            $subcontext[] = fullname($user);
        }
        $subcontext[] = $attempt->attempt;

        return $subcontext;
    }
public static function get_quiz_attempt_subcontext ( \ stdClass $ attempt , \ stdClass $ user ) { $ subcontext = [ get_string ( 'attempts' , 'mod_quiz' ) , ] ; if ( $ attempt -> userid != $ user -> id ) { $ subcontext [ ] = fullname ( $ user ) ; } $ subcontext [ ] = $ attempt -> attempt ; return $ subcontext ; }
Determine the subcontext for the specified quiz attempt.

@param   \stdClass       $attempt    The attempt data retrieved from the database.
@param   \stdClass       $user       The user record.
@return  \array                      The calculated subcontext.
Determine the subcontext for the specified quiz attempt .