You are here

public function QuizResultAnswerEntityTrait::getReportForm in Quiz 8.5

Same name and namespace in other branches
  1. 8.6 src/Entity/QuizResultAnswerEntityTrait.php \Drupal\quiz\Entity\QuizResultAnswerEntityTrait::getReportForm()
  2. 6.x src/Entity/QuizResultAnswerEntityTrait.php \Drupal\quiz\Entity\QuizResultAnswerEntityTrait::getReportForm()

Creates the report form for the admin pages.

Return value

array|null An renderable FAPI array

1 method overrides QuizResultAnswerEntityTrait::getReportForm()
QuizPageResponse::getReportForm in question_types/quiz_page/src/Plugin/quiz/QuizQuestion/QuizPageResponse.php
Implementation of getReportForm().

File

src/Entity/QuizResultAnswerEntityTrait.php, line 136

Class

QuizResultAnswerEntityTrait
Each question type must store its own response data and be able to calculate a score for that data.

Namespace

Drupal\quiz\Entity

Code

public function getReportForm() {

  // Add general data, and data from the question type implementation.
  $form = array();
  $form['display_number'] = array(
    '#type' => 'value',
    '#value' => $this->display_number,
  );
  $form['score'] = $this
    ->getReportFormScore();
  $form['answer_feedback'] = $this
    ->getReportFormAnswerFeedback();
  return $form;
}