private function H5PReportXAPIData::getScore in Opigno module 3.x
Same name and namespace in other branches
- 8 ActivityTypes/opigno_h5p/src/H5PReportXAPIData.php \Drupal\opigno_h5p\H5PReportXAPIData::getScore()
Get score of given type from statement result.
4 calls to H5PReportXAPIData::getScore()
- H5PReportXAPIData::getScoreMax in ActivityTypes/
opigno_h5p/ src/ H5PReportXAPIData.php - Get the optional max. score.
- H5PReportXAPIData::getScoreMin in ActivityTypes/
opigno_h5p/ src/ H5PReportXAPIData.php - Get the optional min. score.
- H5PReportXAPIData::getScoreRaw in ActivityTypes/
opigno_h5p/ src/ H5PReportXAPIData.php - Get the required raw score for the interaction.
- H5PReportXAPIData::getScoreScaled in ActivityTypes/
opigno_h5p/ src/ H5PReportXAPIData.php - Get the optional scaled score.
File
- ActivityTypes/
opigno_h5p/ src/ H5PReportXAPIData.php, line 77
Class
- H5PReportXAPIData
- Class H5PReportXAPIData.
Namespace
Drupal\opigno_h5pCode
private function getScore($type) {
return isset($this->statement->result->score->{$type}) ? (double) $this->statement->result->score->{$type} : NULL;
}