You are here

protected function TypeProcessor::getExtras 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::getExtras()

Decode extras from xAPI data.

1 call to TypeProcessor::getExtras()
TypeProcessor::generateReport in ActivityTypes/opigno_h5p/src/TypeProcessors/TypeProcessor.php
Generate HTML for report.

File

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

Class

TypeProcessor
Class TypeProcessor.

Namespace

Drupal\opigno_h5p\TypeProcessors

Code

protected function getExtras($xapiData) {
  $extras = $xapiData->additionals === '' ? new stdClass() : json_decode($xapiData->additionals);
  if (isset($xapiData->children)) {
    $extras->children = $xapiData->children;
  }
  return $extras;
}