3 declare(strict_types=1);
    54         $this->database = $DIC->database();
    61         $this->lastUpdate = 
'';
    69     public function setId(
int $id): void
   136         if ($this->
getId()) {
   145         $this->database->update(
'cmix_results', array(
   146                 'obj_id' => array(
'intger', $this->
getObjId()),
   147                 'usr_id' => array(
'intger', $this->
getUsrId()),
   148                 'version' => array(
'intger', $this->
getVersion()),
   149                 'score' => array(
'float', $this->
getScore()),
   150                 'status' => array(
'text', $this->
getStatus()),
   153                 'id' => array(
'intger', $this->
getId())
   159         $this->
setId($this->database->nextId(
'cmix_results'));
   161         $this->database->insert(
'cmix_results', array(
   162             'id' => array(
'integer', $this->
getId()),
   163             'obj_id' => array(
'integer', $this->
getObjId()),
   164             'usr_id' => array(
'integer', $this->
getUsrId()),
   165             'version' => array(
'integer', $this->
getVersion()),
   166             'score' => array(
'float', $this->
getScore()),
   167             'status' => array(
'text', $this->
getStatus()),
   174         $this->
setId((
int) $row[
'id']);
   175         $this->
setObjId((
int) $row[
'obj_id']);
   176         $this->
setUsrId((
int) $row[
'usr_id']);
   178         $this->
setScore((
float) $row[
'score']);
   179         $this->
setStatus((
string) $row[
'status']);
   190                         SELECT * FROM cmix_results   191                         WHERE obj_id = %s AND usr_id = %s   194         $res = $DIC->database()->queryF($query, array(
'integer', 
'integer'), array($objId, $usrId));
   196         while ($row = $DIC->database()->fetchAssoc(
$res)) {
   197             $result = 
new self();
   198             $result->assignFromDbRow($row);
   204             "no result record exists for: usr=$usrId obj=$objId"   220         $query = 
'SELECT * FROM cmix_results'   221             . 
' WHERE obj_id = ' . $DIC->database()->quote($objId, 
'integer');
   223         $res = $DIC->database()->query($query);
   227         while ($row = $DIC->database()->fetchAssoc(
$res)) {
   228             $result = 
new self();
   229             $result->assignFromDbRow($row);
   231             $results[$result->getUsrId()] = $result;
 
setLastUpdate(string $lastUpdate)
 
setStatus(string $status)
 
assignFromDbRow(array $row)
 
static getInstanceByObjIdAndUsrId(int $objId, int $usrId)
 
static getResultsForObject(int $objId)
 
__construct()
ilCmiXapiResult constructor. 
 
static getEmptyInstance()
 
static selectCurrentTimestamp()