You are here

public function QuizResult::hasReview in Quiz 6.x

Same name and namespace in other branches
  1. 8.6 src/Entity/QuizResult.php \Drupal\quiz\Entity\QuizResult::hasReview()
  2. 8.5 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 568

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;
}