Skip to content

Commit

Permalink
deploy: 4442766
Browse files Browse the repository at this point in the history
  • Loading branch information
renatho committed Mar 7, 2024
1 parent 7764f78 commit a896870
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 37 deletions.
66 changes: 34 additions & 32 deletions includes_class-sensei-question.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ <h1 class="page-title">Source: includes/class-sensei-question.php</h1>
$quiz_graded = $user_quiz_progress &amp;&amp; ! in_array( $user_quiz_progress->get_status(), array( 'ungraded', 'in-progress' ) );

$quiz_required_pass_grade = intval( get_post_meta( $quiz_id, '_quiz_passmark', true ) );
$succeeded = $user_quiz_grade >= $quiz_required_pass_grade;
$succeeded = ! Sensei_Quiz::is_pass_required( $lesson_id ) || $user_quiz_grade >= $quiz_required_pass_grade;

if ( ! $quiz_graded ) {
return;
Expand Down Expand Up @@ -1071,33 +1071,35 @@ <h1 class="page-title">Source: includes/class-sensei-question.php</h1>
$has_answer_notes = $answer_notes &amp;&amp; wp_strip_all_tags( $answer_notes );

?>
&lt;div class="sensei-lms-question__answer-feedback &lt;?php echo esc_attr( implode( ' ', $answer_notes_classnames ) ); ?>">
&lt;?php if ( $indicate_incorrect ) { ?>
&lt;div class="sensei-lms-question__answer-feedback__header">
&lt;span class="sensei-lms-question__answer-feedback__icon">&lt;/span>
&lt;span
class="sensei-lms-question__answer-feedback__title">&lt;?php echo wp_kses_post( $answer_feedback_title ); ?>&lt;/span>
&lt;?php if ( $grade &amp;&amp; $question_grade > 0 ) { ?>
&lt;span class="sensei-lms-question__answer-feedback__points">&lt;?php echo wp_kses_post( $grade ); ?>&lt;/span>
&lt;?php } ?>
&lt;/div>
&lt;?php } ?>
&lt;?php if ( $has_answer_notes || $correct_answer ) { ?>
&lt;div class="sensei-lms-question__answer-feedback__content">
&lt;?php if ( $correct_answer ) { ?>
&lt;div class="sensei-lms-question__answer-feedback__correct-answer">
&lt;?php echo wp_kses_post( __( 'Right Answer:', 'sensei-lms' ) ); ?>
&lt;?php echo wp_kses_post( $correct_answer ); ?>
&lt;/div>
&lt;?php } ?>
&lt;?php if ( $has_answer_notes ) { ?>
&lt;div class="sensei-lms-question__answer-feedback__answer-notes">
&lt;?php echo wp_kses_post( $answer_notes ); ?>
&lt;/div>
&lt;?php } ?>
&lt;/div>
&lt;?php } ?>
&lt;/div>
&lt;?php if ( $indicate_incorrect || $has_answer_notes || $correct_answer ) { ?>
&lt;div class="sensei-lms-question__answer-feedback &lt;?php echo esc_attr( implode( ' ', $answer_notes_classnames ) ); ?>">
&lt;?php if ( $indicate_incorrect ) { ?>
&lt;div class="sensei-lms-question__answer-feedback__header">
&lt;span class="sensei-lms-question__answer-feedback__icon">&lt;/span>
&lt;span
class="sensei-lms-question__answer-feedback__title">&lt;?php echo wp_kses_post( $answer_feedback_title ); ?>&lt;/span>
&lt;?php if ( $grade &amp;&amp; $question_grade > 0 ) { ?>
&lt;span class="sensei-lms-question__answer-feedback__points">&lt;?php echo wp_kses_post( $grade ); ?>&lt;/span>
&lt;?php } ?>
&lt;/div>
&lt;?php } ?>
&lt;?php if ( $has_answer_notes || $correct_answer ) { ?>
&lt;div class="sensei-lms-question__answer-feedback__content">
&lt;?php if ( $correct_answer ) { ?>
&lt;div class="sensei-lms-question__answer-feedback__correct-answer">
&lt;?php echo wp_kses_post( __( 'Right Answer:', 'sensei-lms' ) ); ?>
&lt;?php echo wp_kses_post( $correct_answer ); ?>
&lt;/div>
&lt;?php } ?>
&lt;?php if ( $has_answer_notes ) { ?>
&lt;div class="sensei-lms-question__answer-feedback__answer-notes">
&lt;?php echo wp_kses_post( $answer_notes ); ?>
&lt;/div>
&lt;?php } ?>
&lt;/div>
&lt;?php } ?>
&lt;/div>
&lt;?php } ?>
&lt;?php if ( $grade ) { ?>
&lt;style> .question-title .grade { display: none; } &lt;/style>
&lt;?php } ?>
Expand Down Expand Up @@ -1271,16 +1273,16 @@ <h1 class="page-title">Source: includes/class-sensei-question.php</h1>
*/
public static function get_template_data( $question_id, $quiz_id ) {

$lesson_id = Sensei()->quiz->get_lesson_id( $quiz_id );
$user_id = get_current_user_id();
$lesson_id = (int) Sensei()->quiz->get_lesson_id( $quiz_id );
$user_id = (int) get_current_user_id();

$reset_allowed = get_post_meta( $quiz_id, '_enable_quiz_reset', true );
// backwards compatibility
// Backwards compatibility.
if ( 'on' === $reset_allowed ) {
$reset_allowed = 1;
}

// setup the question data
// Setup the question data.
$data = [];
$data['ID'] = $question_id;
$data['title'] = get_the_title( $question_id );
Expand Down
2 changes: 1 addition & 1 deletion sensei_get_question_template_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-question.php.html">includes/class-sensei-question.php</a>, <a href="includes_class-sensei-question.php.html#line1269">line 1269</a>
<a href="includes_class-sensei-question.php.html">includes/class-sensei-question.php</a>, <a href="includes_class-sensei-question.php.html#line1271">line 1271</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_question_answer_message_css_class.html
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-question.php.html">includes/class-sensei-question.php</a>, <a href="includes_class-sensei-question.php.html#line1192">line 1192</a>
<a href="includes_class-sensei-question.php.html">includes/class-sensei-question.php</a>, <a href="includes_class-sensei-question.php.html#line1194">line 1194</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_question_answer_message_text.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-question.php.html">includes/class-sensei-question.php</a>, <a href="includes_class-sensei-question.php.html#line1206">line 1206</a>
<a href="includes_class-sensei-question.php.html">includes/class-sensei-question.php</a>, <a href="includes_class-sensei-question.php.html#line1208">line 1208</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_question_show_answers.html
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-question.php.html">includes/class-sensei-question.php</a>, <a href="includes_class-sensei-question.php.html#line1130">line 1130</a>
<a href="includes_class-sensei-question.php.html">includes/class-sensei-question.php</a>, <a href="includes_class-sensei-question.php.html#line1132">line 1132</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_questions_get_correct_answer.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-question.php.html">includes/class-sensei-question.php</a>, <a href="includes_class-sensei-question.php.html#line1586">line 1586</a>
<a href="includes_class-sensei-question.php.html">includes/class-sensei-question.php</a>, <a href="includes_class-sensei-question.php.html#line1588">line 1588</a>
</li></ul></dd>


Expand Down

0 comments on commit a896870

Please sign in to comment.