You are here

public function TypeProcessor::generateReport in Opigno module 8

Same name and namespace in other branches
  1. 3.x ActivityTypes/opigno_h5p/src/TypeProcessors/TypeProcessor.php \Drupal\opigno_h5p\TypeProcessors\TypeProcessor::generateReport()

Generate HTML for report.

Parameters

object $xapiData: XAPI data.

bool $disableScoring: Disables scoring.

Return value

string HTML as string.

File

ActivityTypes/opigno_h5p/src/TypeProcessors/TypeProcessor.php, line 29

Class

TypeProcessor
Class TypeProcessor.

Namespace

Drupal\opigno_h5p\TypeProcessors

Code

public function generateReport($xapiData, $disableScoring = FALSE) {
  $this->xapiData = $xapiData;
  $this->disableScoring = $disableScoring;

  // Grab description.
  $description = $this
    ->getDescription($xapiData);

  // Grab correct response pattern.
  $crp = $this
    ->getCRP($xapiData);

  // Grab extras.
  $extras = $this
    ->getExtras($xapiData);
  $scoreSettings = $this
    ->getScoreSettings($xapiData);
  return $this
    ->generateHTML($description, $crp, $this
    ->getResponse($xapiData), $extras, $scoreSettings);
}