public function H5PReportXAPIData::__construct in Opigno module 3.x
Same name and namespace in other branches
- 8 ActivityTypes/opigno_h5p/src/H5PReportXAPIData.php \Drupal\opigno_h5p\H5PReportXAPIData::__construct()
H5PReportXAPIData constructor.
File
- ActivityTypes/
opigno_h5p/ src/ H5PReportXAPIData.php, line 23
Class
- H5PReportXAPIData
- Class H5PReportXAPIData.
Namespace
Drupal\opigno_h5pCode
public function __construct(OpignoActivityInterface $activity, OpignoAnswerInterface $answer, $data, $parentID = NULL) {
// Keep track of statement and children.
if (isset($data->statement)) {
$this->statement = $data->statement;
}
elseif (isset($data->onlyScore)) {
$this->onlyScore = $data->onlyScore;
}
$this->parentID = $parentID;
if (!empty($data->children)) {
$this->children = $data->children;
}
$this->question = $activity;
$this->answer = $answer;
}