Created
July 10, 2019 16:55
-
-
Save diogenesjup/2009acba5854a8122e8fe4799e82055c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if($question_data["user_answer_entry"][0] !="" && $question_data["question_right_answer"][0] != $question_data["user_answer_entry"][0]): | |
$feedback = get_post_meta( $question_data["ID"], '_answer_feedback', true ); | |
// Check if the custom field has a value. | |
if ( ! empty( $feedback ) ) { | |
?> | |
<div class="alert alert-warning" role="alert" style="font-size: 14px;max-width: 70%;padding: 7px;line-height: 20px;"> | |
<?php echo "<b>Atenção:</b> ", $feedback; ?> | |
</div> | |
<?php | |
} | |
endif; | |
if($question_data["user_answer_entry"][0] !="" && $question_data["question_right_answer"][0] == $question_data["user_answer_entry"][0]): | |
?> | |
<div class="alert alert-success" role="alert" style="font-size: 14px;max-width: 70%;padding: 7px;line-height: 20px;"> | |
<?php echo "<b>Parabéns:</b> Você assinalou a alternativa correta."; ?> | |
</div> | |
<?php endif; ?> | |
<hr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment