lifterlms_template_student_dashboard_my_grades()
Output the “My Grades” template screen on the student dashboard.
Return Return
(void)
Source Source
File: includes/functions/llms.functions.templates.dashboard.php
* 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(
Expand full source code Collapse full source code View on GitHub
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. |