ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ 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
{
37
38
const
SEQ_TEMPLATE_DIR
=
'./Modules/Scorm2004/templates/editor/page_layouts_temp/thumbnails'
;
39
40
var
$layout_id
= null;
41
42
function
__construct
($a_id) {
43
$this->layout_id = $a_id;
44
}
45
46
47
public
function
getXMLContent
() {
48
global $ilias,
$ilDB
;
49
$r
= $ilias->db->query(
"SELECT content FROM page_layout WHERE layout_id="
.
50
$ilDB->quote($this->layout_id));
51
$row
=
$r
->fetchRow(
ilDBConstants::FETCHMODE_ASSOC
);
52
return
$row
[
'content'
];
53
}
54
55
56
public
function
getPreview
() {
57
//just returns manually created previews at the moment
58
return
self::SEQ_TEMPLATE_DIR.
"/"
.$this->layout_id.
".png"
;
59
}
60
61
62
public
function
getTitle
() {
63
global $ilias,
$ilDB
;
64
65
$r
= $ilDB->queryF(
'SELECT title FROM page_layout WHERE layout_id = %s'
,
66
array
(
'integer'
),
array
($this->layout_id));
67
$row
->$ilDB->fetchAssoc(
$r
);
68
69
return
$row
[
'title'
];
70
}
71
72
public
function
getId
() {
73
return
$this->layout_id
;
74
}
75
76
77
private
function
generatePreview
() {
78
79
//toimplement...generate Preview from XML
80
81
}
82
83
84
public
static
function
activeLayouts
()
85
{
86
global
$ilDB
;
87
$arr_layouts =
array
();
88
$query
=
"SELECT * FROM page_layout WHERE (active=1) ORDER BY title "
;
89
$result
= $ilDB->query(
$query
);
90
while
(
$row
= $ilDB->fetchAssoc(
$result
))
91
{
92
array_push($arr_layouts,
new
ilSCORM2004PageLayout
(
$row
[
'layout_id'
]));
93
}
94
return
$arr_layouts;
95
}
96
97
}
ilSCORM2004PageLayout\getId
getId()
Definition:
class.ilSCORM2004PageLayout.php:72
$result
$result
Definition:
CleanUpTest.php:407
ilSCORM2004PageLayout\__construct
__construct($a_id)
Definition:
class.ilSCORM2004PageLayout.php:42
$query
$query
Definition:
examplelayouts.sql.php:24
ilSCORM2004PageLayout\SEQ_TEMPLATE_DIR
const SEQ_TEMPLATE_DIR
Definition:
class.ilSCORM2004PageLayout.php:38
$r
$r
Definition:
example_031.php:79
ilSCORM2004PageLayout\getTitle
getTitle()
Definition:
class.ilSCORM2004PageLayout.php:62
ilSCORM2004PageLayout\getPreview
getPreview()
Definition:
class.ilSCORM2004PageLayout.php:56
ilSCORM2004PageLayout\generatePreview
generatePreview()
Definition:
class.ilSCORM2004PageLayout.php:77
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
ilSCORM2004PageLayout
Class ilSCORM2004PageLayout.
Definition:
class.ilSCORM2004PageLayout.php:35
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilSCORM2004PageLayout\activeLayouts
static activeLayouts()
Definition:
class.ilSCORM2004PageLayout.php:84
ilDBConstants\FETCHMODE_ASSOC
const FETCHMODE_ASSOC
Definition:
class.ilDBConstants.php:12
php
$row
$row
Definition:
10autofilter-selection-1.php:74
ilSCORM2004PageLayout\$layout_id
$layout_id
Definition:
class.ilSCORM2004PageLayout.php:40
ilSCORM2004PageLayout\getXMLContent
getXMLContent()
Definition:
class.ilSCORM2004PageLayout.php:47
Modules
Scorm2004
classes
class.ilSCORM2004PageLayout.php
Generated on Fri Jan 17 2025 19:01:01 for ILIAS by
1.8.13 (using
Doxyfile
)