25 $query =
'SELECT tpl_id FROM didactic_tpl_objs ' .
26 'WHERE ref_id = ' .
$ilDB->quote($a_ref_id,
'integer');
47 $query =
'DELETE FROM didactic_tpl_objs ' .
48 'WHERE obj_id = ' .
$ilDB->quote($a_obj_id,
'integer');
65 $query =
'DELETE FROM didactic_tpl_objs ' .
66 'WHERE tpl_id = ' .
$ilDB->quote($a_tpl_id,
'integer');
82 $query =
'DELETE FROM didactic_tpl_objs ' .
83 'WHERE ref_id = ' .
$ilDB->quote($a_ref_id,
'integer');
100 self::deleteByRefId($a_ref_id);
102 $query =
'INSERT INTO didactic_tpl_objs (ref_id,obj_id,tpl_id) ' .
104 $ilDB->quote($a_ref_id,
'integer') .
', ' .
105 $ilDB->quote($a_obj_id,
'integer') .
', ' .
106 $ilDB->quote($a_tpl_id,
'integer') .
' ' .
121 $ilDB = $DIC[
'ilDB'];
123 $query =
'SELECT * FROM didactic_tpl_objs ' .
124 'WHERE tpl_id = ' .
$ilDB->quote($a_tpl_id,
'integer');
126 $assignments = array();
129 $assignments[] = array(
"ref_id" =>
$row->ref_id,
"obj_id" =>
$row->obj_id);
146 $ilDB = $DIC[
'ilDB'];
148 $query =
'SELECT auto_generated FROM didactic_tpl_settings ' .
149 'WHERE id = ' .
$ilDB->quote($a_src,
'integer');
154 if (
$row->auto_generated == 0) {
158 $query =
'UPDATE didactic_tpl_settings ' .
160 'auto_generated = ' .
$ilDB->quote(1,
'integer') .
161 ' WHERE id = ' .
$ilDB->quote($a_dest,
'integer');
164 $query =
'UPDATE didactic_tpl_settings ' .
166 'auto_generated = ' .
$ilDB->quote(0,
'integer') .
167 ' WHERE id = ' .
$ilDB->quote($a_src,
'integer');
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.
foreach($_POST as $key=> $value) $res
static deleteByTemplateId($a_tpl_id)
Delete by template id ilDB $ilDB.
static deleteByObjId($a_obj_id)
Delete by obj id ilDB $ilDB.