ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilSCORM2004PageLayout.php
Go to the documentation of this file.
1
<?
php
2
/*
3
+-----------------------------------------------------------------------------+
4
| ILIAS open source |
5
+-----------------------------------------------------------------------------+
6
| Copyright (c) 1998-2008 ILIAS open source, University of Cologne |
7
| |
8
| This program is free software; you can redistribute it and/or |
9
| modify it under the terms of the GNU General Public License |
10
| as published by the Free Software Foundation; either version 2 |
11
| of the License, or (at your option) any later version. |
12
| |
13
| This program is distributed in the hope that it will be useful, |
14
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
| GNU General Public License for more details. |
17
| |
18
| You should have received a copy of the GNU General Public License |
19
| along with this program; if not, write to the Free Software |
20
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21
+-----------------------------------------------------------------------------+
22
*/
23
24
35
class
ilSCORM2004PageLayout
36
{
40
protected
$db
;
41
42
43
const
SEQ_TEMPLATE_DIR
=
'./Modules/Scorm2004/templates/editor/page_layouts_temp/thumbnails'
;
44
45
public
$layout_id
= null;
46
47
public
function
__construct
($a_id)
48
{
49
global
$DIC
;
50
51
$this->db = $DIC->database();
52
$this->layout_id = $a_id;
53
}
54
55
56
public
function
getXMLContent
()
57
{
58
$ilDB
=
$this->db
;
59
$r
=
$ilDB
->query(
"SELECT content FROM page_layout WHERE layout_id="
.
60
$ilDB
->quote($this->layout_id));
61
$row
=
$r
->fetchRow(
ilDBConstants::FETCHMODE_ASSOC
);
62
return
$row
[
'content'
];
63
}
64
65
66
public
function
getPreview
()
67
{
68
//just returns manually created previews at the moment
69
return
self::SEQ_TEMPLATE_DIR .
"/"
. $this->layout_id .
".png"
;
70
}
71
72
73
public
function
getTitle
()
74
{
75
$ilDB
=
$this->db
;
76
77
$r
=
$ilDB
->queryF(
78
'SELECT title FROM page_layout WHERE layout_id = %s'
,
79
array(
'integer'
),
80
array($this->layout_id)
81
);
82
$row
=
$ilDB
->fetchAssoc(
$r
);
83
84
return
$row
[
'title'
];
85
}
86
87
public
function
getId
()
88
{
89
return
$this->layout_id
;
90
}
91
92
93
private
function
generatePreview
()
94
{
95
96
//toimplement...generate Preview from XML
97
}
98
99
100
public
static
function
activeLayouts
()
101
{
102
global
$DIC
;
103
104
$ilDB
= $DIC->database();
105
$arr_layouts = array();
106
$query
=
"SELECT * FROM page_layout WHERE (active=1) ORDER BY title "
;
107
$result
=
$ilDB
->query(
$query
);
108
while
(
$row
=
$ilDB
->fetchAssoc(
$result
)) {
109
array_push($arr_layouts,
new
ilSCORM2004PageLayout
(
$row
[
'layout_id'
]));
110
}
111
return
$arr_layouts;
112
}
113
}
ilSCORM2004PageLayout\getId
getId()
Definition:
class.ilSCORM2004PageLayout.php:87
$result
$result
Definition:
CleanUpTest.php:463
ilSCORM2004PageLayout\__construct
__construct($a_id)
Definition:
class.ilSCORM2004PageLayout.php:47
$DIC
global $DIC
Definition:
saml.php:7
ilSCORM2004PageLayout\$db
$db
Definition:
class.ilSCORM2004PageLayout.php:40
ilSCORM2004PageLayout\SEQ_TEMPLATE_DIR
const SEQ_TEMPLATE_DIR
Definition:
class.ilSCORM2004PageLayout.php:43
$r
$r
Definition:
example_031.php:79
ilSCORM2004PageLayout\getTitle
getTitle()
Definition:
class.ilSCORM2004PageLayout.php:73
ilSCORM2004PageLayout\getPreview
getPreview()
Definition:
class.ilSCORM2004PageLayout.php:66
$query
$query
Definition:
proxy_ylocal.php:13
ilSCORM2004PageLayout\generatePreview
generatePreview()
Definition:
class.ilSCORM2004PageLayout.php:93
$row
$row
Definition:
migrateto20.php:360
ilSCORM2004PageLayout
Class ilSCORM2004PageLayout.
Definition:
class.ilSCORM2004PageLayout.php:35
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilSCORM2004PageLayout\activeLayouts
static activeLayouts()
Definition:
class.ilSCORM2004PageLayout.php:100
ilDBConstants\FETCHMODE_ASSOC
const FETCHMODE_ASSOC
Definition:
class.ilDBConstants.php:12
php
ilSCORM2004PageLayout\$layout_id
$layout_id
Definition:
class.ilSCORM2004PageLayout.php:45
ilSCORM2004PageLayout\getXMLContent
getXMLContent()
Definition:
class.ilSCORM2004PageLayout.php:56
Modules
Scorm2004
classes
class.ilSCORM2004PageLayout.php
Generated on Thu Feb 27 2025 19:01:43 for ILIAS by
1.8.13 (using
Doxyfile
)