5 require_once
'class.ilDataCollectionRecordField.php';
6 require_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
34 $this->dcl_obj_id = $dclTable->getCollectionObject()->getId();
58 return $lng->txt(
"dcl_editable_in_table_gui");
66 $ilCtrl->setParameterByClass(
"ilratinggui",
"field_id", $this->
getField()->
getId());
67 $ilCtrl->setParameterByClass(
"ilratinggui",
"record_id", $this->
getRecord()->
getId());
68 $html = $rgui->getHTML();
76 return round($val[
"avg"],1).
" (".$val[
"cnt"].
")";
87 public function delete()
91 $ilDB->manipulate(
"DELETE FROM il_rating WHERE ".
92 "obj_id = ".$ilDB->quote((
int) $this->getRecord()->getId(),
"integer").
" AND ".
93 "obj_type = ".$ilDB->quote(
"dcl_record",
"text").
" AND ".
94 "sub_obj_id = ".$ilDB->quote((
int) $this->
getField()->
getId(),
"integer").
" AND ".
95 $ilDB->equals(
"sub_obj_type",
"dcl_field",
"text",
true));
97 $query2 =
"DELETE FROM il_dcl_record_field WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
98 $ilDB->manipulate($query2);