31 parent::__construct($record, $field);
34 $this->dcl_obj_id = $dclTable->getCollectionObject()->getId();
86 return round($val[
"avg"], 1) .
" (" . $val[
"cnt"] .
")";
102 public function delete()
105 $ilDB = $DIC[
'ilDB'];
108 "DELETE FROM il_rating WHERE " .
109 "obj_id = " .
$ilDB->quote((
int) $this->getRecord()->getId(),
"integer") .
" AND " .
110 "obj_type = " .
$ilDB->quote(
"dcl_record",
"text") .
" AND " .
111 "sub_obj_id = " .
$ilDB->quote((
int) $this->
getField()->
getId(),
"integer") .
" AND " .
112 $ilDB->equals(
"sub_obj_type",
"dcl_field",
"text",
true)
115 $query2 =
"DELETE FROM il_dcl_record_field WHERE id = " .
$ilDB->quote($this->
getId(),
"integer");
116 $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.