Skip to content

Commit

Permalink
Get info from $attempt_question instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
ideadude committed Jan 29, 2025
1 parent 4673500 commit 910fc31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/quiz/results-attempt-questions-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
$quiz_question = $attempt_question->get_question();
if ( ! $quiz_question ) { // Question missing/deleted.
?>
<li class="llms-quiz-attempt-question type--<?php echo esc_attr( $quiz_question->get( 'question_type' ) ); ?> status--<?php echo esc_attr( $attempt_question->get_status() ); ?> <?php echo $attempt_question->is_correct() ? 'correct' : 'incorrect'; ?>"
data-question-id="<?php echo esc_attr( $quiz_question->get( 'id' ) ); ?>"
<li class="llms-quiz-attempt-question type--deleted status--<?php echo esc_attr( $attempt_question->get_status() ); ?> <?php echo $attempt_question->is_correct() ? 'correct' : 'incorrect'; ?>"
data-question-id="<?php echo esc_attr( $attempt_question->get( 'id' ) ); ?>"
data-grading-manual="<?php echo $attempt_question->can_be_manually_graded() ? 'yes' : 'no'; ?>"
data-points="<?php echo esc_attr( $attempt_question->get( 'points' ) ); ?>"
data-points-curr="<?php echo esc_attr( $attempt_question->get( 'earned' ) ); ?>">
<header class="llms-quiz-attempt-question-header">
<span class="toggle-answer">
<h3 class="llms-question-title"><?php esc_html_e( 'This question has been deleted', 'lifterlms' ); ?></h3>
<span class="llms-points">
<?php if ( $quiz_question->get( 'points' ) ) : ?>
<?php if ( $attempt_question->get( 'points' ) ) : ?>
<?php echo esc_html( sprintf( __( '%1$d / %2$d points', 'lifterlms' ), $attempt_question->get( 'earned' ), $attempt_question->get( 'points' ) ) ); ?>
<?php endif; ?>
</span>
Expand Down

0 comments on commit 910fc31

Please sign in to comment.