Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <?php
  2.  
  3. if($question_data["user_answer_entry"][0] !="" && $question_data["question_right_answer"][0] != $question_data["user_answer_entry"][0]):
  4.  
  5. $feedback = get_post_meta( $question_data["ID"], '_answer_feedback', true );
  6. // Check if the custom field has a value.
  7. if ( ! empty( $feedback ) ) {
  8.  
  9. ?>
  10.  
  11. <div class="alert alert-warning" role="alert" style="font-size: 14px;max-width: 70%;padding: 7px;line-height: 20px;">
  12. <?php echo "<b>Atenção:</b> ", $feedback; ?>
  13. </div>
  14.  
  15. <?php
  16.  
  17. }
  18.  
  19. endif;
  20.  
  21. if($question_data["user_answer_entry"][0] !="" && $question_data["question_right_answer"][0] == $question_data["user_answer_entry"][0]):
  22.  
  23. ?>
  24.  
  25. <div class="alert alert-success" role="alert" style="font-size: 14px;max-width: 70%;padding: 7px;line-height: 20px;">
  26. <?php echo "<b>Parabéns:</b> Você assinalou a alternativa correta."; ?>
  27. </div>
  28.  
  29. <?php endif; ?>
  30.  
  31. <hr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement