Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions classes/Quiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -1834,16 +1834,18 @@ public static function render_quiz_summary( $total_questions, $quiz_item_readabl
),
);

$quiz_summary[] = array(
'columns' => array(
array(
'content' => '<div class="tutor-flex tutor-gap-3 tutor-items-center">
if ( $earned_marks ) {
$quiz_summary[] = array(
'columns' => array(
array(
'content' => '<div class="tutor-flex tutor-gap-3 tutor-items-center">
' . SvgIcon::make()->name( Icon::STAR )->size( 20 )->get() . __( 'Earned Grade', 'tutor' ) . '
</div>',
),
array( 'content' => $earned_marks . '%' ),
),
array( 'content' => $earned_marks . '%' ),
),
);
);
}

$quiz_summary[] = array(
'columns' => array(
Expand Down
5 changes: 3 additions & 2 deletions templates/dashboard/courses/course-card.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<?php if ( $course_progress['total_count'] > 0 ) : ?>
<div class="tutor-progress-card-details">
<?php
printf(
$progress_msg = sprintf(
esc_html(
// translators: %1$s is the completed count, %2$s is the total count.
_n(
Expand All @@ -70,7 +70,8 @@
esc_html( $course_progress['completed_count'] ),
esc_html( $course_progress['total_count'] )
);

// phpcs:ignore -- already sanitized
echo apply_filters( 'tutor_course_progress_message', esc_html( $progress_msg ), $course_progress['completed_count'], $course_progress['total_count'] );
?>
<span class="tutor-progress-card-separator">•</span>
<?php
Expand Down
11 changes: 8 additions & 3 deletions templates/dashboard/student-dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,14 @@ class="tutor-btn tutor-btn-link tutor-btn-x-small tutor-text-brand tutor-p-none
<div class="tutor-progress-card-details">
<?php
echo esc_html(
sprintf(
/* translators: 1: completed lesson count, 2: total lesson count */
__( '%1$s of %2$s lessons', 'tutor' ),
apply_filters(
'tutor_course_progress_message',
sprintf(
/* translators: 1: completed lesson count, 2: total lesson count */
__( '%1$s of %2$s lessons', 'tutor' ),
$course_progress['completed_count'],
$course_progress['total_count']
),
$course_progress['completed_count'],
$course_progress['total_count']
)
Expand Down
Loading