Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement