LLMS_Admin_Reporting_Tab_Quizzes::breadcrumbs()

Add breadcrumb links to the tab depending on current view


Return Return

(void)


Top ↑

Source Source

File: includes/admin/reporting/tabs/class.llms.admin.reporting.tab.quizzes.php

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
public function breadcrumbs() {
 
    $links = array();
 
    // Single quiz.
    if ( isset( $_GET['quiz_id'] ) ) {
        $quiz = llms_get_post( absint( $_GET['quiz_id'] ) );
        $links[ LLMS_Admin_Reporting::get_stab_url( 'overview' ) ] = $quiz->get( 'title' );
    }
 
    if ( isset( $_GET['attempt_id'] ) ) {
 
        $attempt = new LLMS_Quiz_Attempt( absint( $_GET['attempt_id'] ) );
        $links[ LLMS_Admin_Reporting::get_stab_url( 'attempts' ) ] = $attempt->get_title();
 
    }
 
    foreach ( $links as $url => $title ) {
 
        echo '<a href="' . esc_url( $url ) . '">' . $title . '</a>';
 
    }
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.