You are here

public function QuizResult::hasReview in Quiz 8.6

Same name and namespace in other branches
  1. 8.5 src/Entity/QuizResult.php \Drupal\quiz\Entity\QuizResult::hasReview()
  2. 6.x src/Entity/QuizResult.php \Drupal\quiz\Entity\QuizResult::hasReview()

Can the quiz taker view any reviews right now?

Return value

bool

File

src/Entity/QuizResult.php, line 556

Class

QuizResult
Defines the Quiz entity class.

Namespace

Drupal\quiz\Entity

Code

public function hasReview() {
  foreach (quiz_get_feedback_options() as $option => $label) {
    if ($this
      ->canReview($option)) {
      return TRUE;
    }
  }
  return FALSE;
}