23 $query =
'SELECT tpl_id FROM didactic_tpl_objs '.
24 'WHERE ref_id = '.$ilDB->quote($a_ref_id,
'integer');
44 $query =
'DELETE FROM didactic_tpl_objs '.
45 'WHERE obj_id = '.$ilDB->quote($a_obj_id,
'integer');
60 $query =
'DELETE FROM didactic_tpl_objs '.
61 'WHERE tpl_id = '.$ilDB->quote($a_tpl_id,
'integer');
75 $query =
'DELETE FROM didactic_tpl_objs '.
76 'WHERE ref_id = '.$ilDB->quote($a_ref_id,
'integer');
91 self::deleteByRefId($a_ref_id);
93 $query =
'INSERT INTO didactic_tpl_objs (ref_id,obj_id,tpl_id) '.
95 $ilDB->quote($a_ref_id,
'integer').
', '.
96 $ilDB->quote($a_obj_id,
'integer').
', '.
97 $ilDB->quote($a_tpl_id,
'integer').
' '.
112 $query =
'SELECT * FROM didactic_tpl_objs '.
113 'WHERE tpl_id = '.$ilDB->quote($a_tpl_id,
'integer');
115 $assignments =
array();
119 $assignments[] =
array(
"ref_id" =>
$row->ref_id,
"obj_id" =>
$row->obj_id);
136 $query =
'SELECT auto_generated FROM didactic_tpl_settings '.
137 'WHERE id = '.$ilDB->quote($a_src,
'integer');
142 if(
$row->auto_generated == 0)
147 $query =
'UPDATE didactic_tpl_settings '.
149 'auto_generated = '.$ilDB->quote(1,
'integer').
150 ' WHERE id = '.$ilDB->quote($a_dest,
'integer');
151 $ilDB->manipulate(
$query);
153 $query =
'UPDATE didactic_tpl_settings '.
155 'auto_generated = '.$ilDB->quote(0,
'integer').
156 ' WHERE id = '.$ilDB->quote($a_src,
'integer');
157 $ilDB->manipulate(
$query);
static lookupTemplateId($a_ref_id)
Lookup template id ilDB $ilDB.
static deleteByRefId($a_ref_id)
Delete by ref_id ilDB $ilDB.
static transferAutoGenerateStatus($a_src, $a_dest)
transfer auto generated flag if source is auto generated
static getAssignmentsByTemplateID($a_tpl_id)
Lookup template id ilDB $ilDB.
Stores the applied template id for objects.
static assignTemplate($a_ref_id, $a_obj_id, $a_tpl_id)
Assign template to object ilDB $ilDB.
static deleteByTemplateId($a_tpl_id)
Delete by template id ilDB $ilDB.
Create styles array
The data for the language used.
static deleteByObjId($a_obj_id)
Delete by obj id ilDB $ilDB.