5 require_once (
'./Modules/DataCollection/classes/Fields/Base/class.ilDclBaseRecordFieldModel.php');
6 require_once (
'./Services/Rating/classes/class.ilRating.php');
32 parent::__construct($record, $field);
35 $this->dcl_obj_id = $dclTable->getCollectionObject()->getId();
75 return round($val[
"avg"],1).
" (".$val[
"cnt"].
")";
88 public function delete()
93 $ilDB->manipulate(
"DELETE FROM il_rating WHERE ".
94 "obj_id = ".
$ilDB->quote((
int) $this->getRecord()->getId(),
"integer").
" AND ".
95 "obj_type = ".
$ilDB->quote(
"dcl_record",
"text").
" AND ".
96 "sub_obj_id = ".$ilDB->quote((
int) $this->
getField()->
getId(),
"integer").
" AND ".
97 $ilDB->equals(
"sub_obj_type",
"dcl_field",
"text",
true));
99 $query2 =
"DELETE FROM il_dcl_record_field WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
100 $ilDB->manipulate($query2);
Class ilDclBaseFieldModel.
Class ilDclBaseFieldModel.
getExportValue()
return Export values
setValue($value, $omit_parsing=false)
Set value for record field.
__construct(ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)
addHiddenItemsToConfirmation(ilConfirmationGUI &$confirmation)
static getTableCache($table_id=0)
static getOverallRatingForObject($a_obj_id, $a_obj_type, $a_sub_obj_id=null, $a_sub_obj_type=null, $a_category_id=null)
Get overall rating for an object.
Class ilDclBaseFieldModel.
Class ilDclBaseRecordModel.
loadValue()
override the loadValue.
Confirmation screen class.