17 const SEQ_TEMPLATE_DIR =
'./Modules/Scorm2004/templates/editor/page_layouts_temp/thumbnails';
28 $this->layout_id = $ilDB->nextId(
"page_layout");
29 $ilDB->insert(
"page_layout", array(
30 "layout_id" => array(
"integer", $this->layout_id),
31 "active" => array(
"integer", 0),
32 "title" => array(
"text",
""),
33 "content" => array(
"clob",
""),
34 "description" => array(
"text",
"")
42 $this->active =
false;
45 $this->layout_id = $a_id;
58 $this->description = $a_description;
66 $this->title = $a_title;
76 $query =
"UPDATE page_layout SET active=".$ilDB->quote($a_setting,
"integer").
77 " WHERE layout_id =".$ilDB->quote($this->layout_id,
"integer");
78 $result = $ilDB->manipulate(
$query);
81 public function delete($a_setting=
true) {
83 $query =
"DELETE FROM page_layout WHERE layout_id =".$ilDB->quote($this->layout_id,
"integer");
84 $result = $ilDB->manipulate(
$query);
89 $query =
"UPDATE page_layout SET title=".$ilDB->quote($this->title,
"text").
90 ",description =".$ilDB->quote($this->description,
"text").
91 ",active =".$ilDB->quote($this->active,
"integer").
92 " WHERE layout_id =".$ilDB->quote($this->layout_id,
"integer");
93 $result = $ilDB->manipulate(
$query);
98 $query =
"SELECT * FROM page_layout WHERE layout_id =".$ilDB->quote($this->layout_id,
"integer");
99 $result = $ilDB->query(
$query);
100 $row = $ilDB->fetchAssoc($result);
101 $this->title=
$row[
'title'];
102 $this->description=
$row[
'description'];
103 $this->active=
$row[
'active'];
107 global $ilias,
$ilDB;
108 $r = $ilias->db->query(
"SELECT content FROM page_object WHERE parent_type='stys' AND page_id=".
109 $ilDB->quote($this->layout_id));
111 return $row[
'content'];
121 return "./Services/Style/xml/layout2html.xsl";
130 $path =
"////PlaceHolder";
133 foreach (
$res->nodeset as $item){
134 $height = $item->get_attribute(
"Height");
136 $height = eregi_replace(
"px",
"",$height);
138 $item->set_attribute(
"Height",$height.
"px");
140 $xsl = file_get_contents($this->
getXSLPath());
142 $xml = $dom->dump_mem(0,
"UTF-8");
144 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
147 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl", NULL, $args, NULL);
161 $arr_layouts = array();
163 $add =
"WHERE (active=1)";
165 $query =
"SELECT * FROM page_layout $add ORDER BY title ";
166 $result = $ilDB->query(
$query);
169 array_push($arr_layouts,
$row);
177 $arr_layouts = array();
180 $add =
"WHERE (active=1)";
182 $query =
"SELECT layout_id FROM page_layout $add ORDER BY title ";
183 $result = $ilDB->query(
$query);