ILIAS
Release_4_4_x_branch Revision 61816
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilDidacticTemplateObjSettings.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
10
class
ilDidacticTemplateObjSettings
11
{
12
19
public
static
function
lookupTemplateId
($a_ref_id)
20
{
21
global $ilDB;
22
23
$query
=
'SELECT tpl_id FROM didactic_tpl_objs '
.
24
'WHERE ref_id = '
.$ilDB->quote($a_ref_id,
'integer'
);
25
$res
= $ilDB->query(
$query
);
26
while
(
$row
=
$res
->fetchRow(
DB_FETCHMODE_OBJECT
))
27
{
28
return
$row
->tpl_id;
29
}
30
return
0;
31
}
32
33
40
public
static
function
deleteByObjId
($a_obj_id)
41
{
42
global $ilDB;
43
44
$query
=
'DELETE FROM didactic_tpl_objs '
.
45
'WHERE obj_id = '
.$ilDB->quote($a_obj_id,
'integer'
);
46
$ilDB->manipulate(
$query
);
47
return
true
;
48
}
49
56
public
static
function
deleteByTemplateId
($a_tpl_id)
57
{
58
global $ilDB;
59
60
$query
=
'DELETE FROM didactic_tpl_objs '
.
61
'WHERE tpl_id = '
.$ilDB->quote($a_tpl_id,
'integer'
);
62
$ilDB->manipulate(
$query
);
63
return
true
;
64
}
65
71
public
static
function
deleteByRefId
($a_ref_id)
72
{
73
global $ilDB;
74
75
$query
=
'DELETE FROM didactic_tpl_objs '
.
76
'WHERE ref_id = '
.$ilDB->quote($a_ref_id,
'integer'
);
77
$ilDB->manipulate(
$query
);
78
}
79
87
public
static
function
assignTemplate
($a_ref_id,$a_obj_id,$a_tpl_id)
88
{
89
global $ilDB;
90
91
self::deleteByRefId
($a_ref_id);
92
93
$query
=
'INSERT INTO didactic_tpl_objs (ref_id,obj_id,tpl_id) '
.
94
'VALUES ( '
.
95
$ilDB->quote($a_ref_id,
'integer'
).
', '
.
96
$ilDB->quote($a_obj_id,
'integer'
).
', '
.
97
$ilDB->quote($a_tpl_id,
'integer'
).
' '
.
98
')'
;
99
$ilDB->manipulate(
$query
);
100
return
true
;
101
}
102
103
}
104
?>
Services
DidacticTemplate
classes
class.ilDidacticTemplateObjSettings.php
Generated on Wed Apr 27 2016 20:01:40 for ILIAS by
1.8.1.2 (using
Doxyfile
)