ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilObjRemoteGlossary.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
include_once(
'Services/WebServices/ECS/classes/class.ilRemoteObjectBase.php'
);
5
15
class
ilObjRemoteGlossary
extends
ilRemoteObjectBase
16
{
17
const
DB_TABLE_NAME
=
"rglo_settings"
;
18
19
const
ACTIVATION_OFFLINE
= 0;
20
const
ACTIVATION_ONLINE
= 1;
21
22
protected
$availability_type
;
23
24
public
function
initType
()
25
{
26
$this->type =
"rglo"
;
27
}
28
29
protected
function
getTableName
()
30
{
31
return
self::DB_TABLE_NAME;
32
}
33
34
protected
function
getECSObjectType
()
35
{
36
return
"/campusconnect/glossaries"
;
37
}
38
44
public
function
setAvailabilityType
(
$a_type
)
45
{
46
$this->availability_type =
$a_type
;
47
}
48
54
public
function
getAvailabilityType
()
55
{
56
return
$this->availability_type
;
57
}
58
65
public
static
function
_lookupOnline
($a_obj_id)
66
{
67
global
$ilDB
;
68
69
$query
=
"SELECT * FROM "
. self::DB_TABLE_NAME .
70
" WHERE obj_id = "
. $ilDB->quote($a_obj_id,
'integer'
) .
" "
;
71
$res
= $ilDB->query(
$query
);
72
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
);
73
switch
(
$row
->availability_type) {
74
case
self::ACTIVATION_ONLINE:
75
return
true
;
76
77
case
self::ACTIVATION_OFFLINE:
78
return
false
;
79
80
default
:
81
return
false
;
82
}
83
84
return
false
;
85
}
86
87
protected
function
doCreateCustomFields
(array &$a_fields)
88
{
89
$a_fields[
"availability_type"
] = array(
"integer"
, 0);
90
}
91
92
protected
function
doUpdateCustomFields
(array &$a_fields)
93
{
94
$a_fields[
"availability_type"
] = array(
"integer"
, $this->
getAvailabilityType
());
95
}
96
97
protected
function
doReadCustomFields
($a_row)
98
{
99
$this->
setAvailabilityType
($a_row->availability_type);
100
}
101
102
protected
function
updateCustomFromECSContent
(
ilECSSetting
$a_server, $a_ecs_content)
103
{
104
$this->
setAvailabilityType
($a_ecs_content->availability ==
'online'
? self::ACTIVATION_ONLINE : self::ACTIVATION_OFFLINE);
105
}
106
}
ilECSSetting
Definition:
class.ilECSSetting.php:33
ilObjRemoteGlossary\doUpdateCustomFields
doUpdateCustomFields(array &$a_fields)
Definition:
class.ilObjRemoteGlossary.php:92
ilObjRemoteGlossary
Remote glossary app class.
Definition:
class.ilObjRemoteGlossary.php:15
ilObjRemoteGlossary\getECSObjectType
getECSObjectType()
Definition:
class.ilObjRemoteGlossary.php:34
ilObjRemoteGlossary\initType
initType()
Definition:
class.ilObjRemoteGlossary.php:24
ilObjRemoteGlossary\updateCustomFromECSContent
updateCustomFromECSContent(ilECSSetting $a_server, $a_ecs_content)
Definition:
class.ilObjRemoteGlossary.php:102
ilObjRemoteGlossary\doCreateCustomFields
doCreateCustomFields(array &$a_fields)
Definition:
class.ilObjRemoteGlossary.php:87
ilObjRemoteGlossary\setAvailabilityType
setAvailabilityType($a_type)
Set Availability type.
Definition:
class.ilObjRemoteGlossary.php:44
ilObjRemoteGlossary\ACTIVATION_ONLINE
const ACTIVATION_ONLINE
Definition:
class.ilObjRemoteGlossary.php:20
$a_type
$a_type
Definition:
workflow.php:92
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
$query
$query
Definition:
proxy_ylocal.php:13
ilRemoteObjectBase
Remote object app base class.
Definition:
class.ilRemoteObjectBase.php:15
$row
$row
Definition:
migrateto20.php:360
ilObjRemoteGlossary\DB_TABLE_NAME
const DB_TABLE_NAME
Definition:
class.ilObjRemoteGlossary.php:17
ilObjRemoteGlossary\getAvailabilityType
getAvailabilityType()
get availability type
Definition:
class.ilObjRemoteGlossary.php:54
ilObjRemoteGlossary\getTableName
getTableName()
Definition:
class.ilObjRemoteGlossary.php:29
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
php
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:13
ilObjRemoteGlossary\doReadCustomFields
doReadCustomFields($a_row)
Definition:
class.ilObjRemoteGlossary.php:97
ilObjRemoteGlossary\$availability_type
$availability_type
Definition:
class.ilObjRemoteGlossary.php:22
ilObjRemoteGlossary\_lookupOnline
static _lookupOnline($a_obj_id)
Lookup online.
Definition:
class.ilObjRemoteGlossary.php:65
ilObjRemoteGlossary\ACTIVATION_OFFLINE
const ACTIVATION_OFFLINE
Definition:
class.ilObjRemoteGlossary.php:19
Modules
RemoteGlossary
classes
class.ilObjRemoteGlossary.php
Generated on Thu Jan 16 2025 19:02:07 for ILIAS by
1.8.13 (using
Doxyfile
)