lifterlms_template_student_dashboard_my_grades()

Output the “My Grades” template screen on the student dashboard.


Return Return

(void)


Top ↑

Source Source

File: includes/functions/llms.functions.templates.dashboard.php

521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
     *                      on the view-certificates endpoint.
     * @return void
     */
    function lifterlms_template_student_dashboard_my_certificates( $preview = false ) {
 
        $student = llms_get_student();
        if ( ! $student ) {
            return;
        }
 
        $enabled = LLMS_Student_Dashboard::is_endpoint_enabled( 'view-certificates' );
        if ( ! $enabled ) {
            return;
        }
 
        $more = false;
        if ( $preview ) {
            $more = array(
                'url'  => llms_get_endpoint_url( 'view-certificates', '', llms_get_page_url( 'myaccount' ) ),
                'text' => __( 'View All My Certificates', 'lifterlms' ),
            );
        }
 
        ob_start();
        lifterlms_template_certificates_loop( $student, $preview ? llms_get_certificates_loop_columns() : false );
 
        llms_get_template(
            'myaccount/dashboard-section.php',
            array(
                'action'  => 'my_certificates',
                'slug'    => 'llms-my-certificates',
                'title'   => $preview ? __( 'My Certificates', 'lifterlms' ) : '',
                'content' => ob_get_clean(),
                'more'    => $more,
            )
        );
 
    }
}
 
if ( ! function_exists( 'lifterlms_template_student_dashboard_my_courses' ) ) {
 
    /**
     * Template for My Courses section on dashboard index
     *
     * @since 3.14.0
     * @since 3.19.0 Unknown.
     *
     * @param bool $preview Optional. If true, outputs a short list of courses (based on dashboard_recent_courses filter). Default `false`.
     * @return void
     */
    function lifterlms_template_student_dashboard_my_courses( $preview = false ) {
 
        $student = llms_get_student();
        if ( ! $student ) {
            return;
        }
 
        $more = false;
        if ( $preview && LLMS_Student_Dashboard::is_endpoint_enabled( 'view-courses' ) ) {
            $more = array(
                'url'  => llms_get_endpoint_url( 'view-courses', '', llms_get_page_url( 'myaccount' ) ),
                'text' => __( 'View All My Courses', 'lifterlms' ),
            );
        }
 
        ob_start();
        lifterlms_template_my_courses_loop( $student, $preview );
 
        llms_get_template(
            'myaccount/dashboard-section.php',
            array(
                'action'  => 'my_courses',
                'slug'    => 'llms-my-courses',
                'title'   => $preview ? __( 'My Courses', 'lifterlms' ) : '',
                'content' => ob_get_clean(),
                'more'    => $more,
            )
        );
 
    }
}
 
if ( ! function_exists( 'llms_template_student_dashboard_my_favorites' ) ) {
 
    /**
     * Template for My Favorites section on dashboard index.
     *
     * @since 7.5.0
     *
     * @return void
     */
    function llms_template_student_dashboard_my_favorites() {
 
        $student = llms_get_student();
 
        if ( ! $student || ! llms_is_favorites_enabled() ) {
            return;
        }
 
        ob_start();
        llms_template_my_favorites_loop( $student );
 
        llms_get_template(
            'myaccount/my-favorites.php',
            array(


Top ↑

Changelog Changelog

Changelog
Version Description
6.3.0 Prevent trying to access to a non existing index when retrieving the slug from the $wp_query. Fixed pagination not working when using plain permalinks.
6.0.0 Use updated method signature for LLMS_Student::get_achievements().
5.9.0 Stop using deprecated FILTER_SANITIZE_STRING.
5.3.2 Cast achievement_template ID to string when comparing to the list of achievement IDs related the course/membership (list of strings).
3.26.3 Unknown.
3.24.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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