24 include_once(
"./Services/Container/classes/class.ilContainerContentGUI.php");
45 parent::__construct($container_gui_obj);
62 return self::DETAILS_DEACTIVATED;
64 if(isset(
$_SESSION[
'sess'][
'expanded'][$a_session_id]))
66 return $_SESSION[
'sess'][
'expanded'][$a_session_id];
68 if(in_array($a_session_id,$this->force_details))
70 return self::DETAILS_ALL;
74 return self::DETAILS_TITLE;
90 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
93 "Services/Container");
115 global $ilAccess,
$lng;
123 if ($output_html !=
"")
129 $done_sessions =
false;
132 is_array($this->items[
"sess"]) or
133 $this->items[
'sess_link'][
'prev'][
'value'] or
134 $this->items[
'sess_link'][
'next'][
'value'])
136 $this->items[
'sess'] =
ilUtil::sortArray($this->items[
'sess'],
'start',
'ASC',
true,
true);
139 $item_html = array();
142 if($this->items[
'sess_link'][
'prev'][
'value'])
147 foreach($this->items[
"sess"] as $item_data)
149 if ($this->rendered_items[$item_data[
"child"]] !==
true)
151 $html = $this->
renderItem($item_data,$position++,
true);
155 $item_html[] = $html;
159 if($this->items[
'sess_link'][
'next'][
'value'])
165 if (count($item_html) > 0)
168 foreach($item_html as $h)
172 $done_sessions =
true;
186 if (is_array($this->items[
"_all"]))
189 $item_html = array();
191 foreach($this->items[
"_all"] as $item_data)
193 if ($this->rendered_items[$item_data[
"child"]] !==
true)
195 if ($item_data[
"type"] ==
"sess" || $item_data[
"type"] ==
"itgr")
199 $html = $this->
renderItem($item_data,$position++,
true);
202 $item_html[] = $html;
208 if (count($item_html) > 0)
211 foreach($item_html as $h)
218 $output_html .=
$tpl->get();
220 $a_tpl->setVariable(
"CONTAINER_PAGE_CONTENT", $output_html);
231 $lng->loadLanguageModule(
'crs');
234 "Services/Container");
235 $tpl->setVariable(
'DIV_CLASS',
'ilContainerListItemOuter');
236 $tpl->setCurrentBlock(
'item_title_linked');
240 $prefp = $ilUser->getPref(
'crs_sess_show_prev_'.$this->
getContainerObject()->getId());
244 $tpl->setVariable(
'TXT_TITLE_LINKED',$lng->txt(
'crs_link_hide_prev_sessions'));
245 $ilCtrl->setParameterByClass(get_class($this->
getContainerGUI()),
'crs_prev_sess',(
int) !$prefp);
246 $tpl->setVariable(
'HREF_TITLE_LINKED',$ilCtrl->getLinkTargetByClass(get_class($this->
getContainerGUI())));
251 $tpl->setVariable(
'TXT_TITLE_LINKED',$lng->txt(
'crs_link_show_all_prev_sessions'));
252 $ilCtrl->setParameterByClass(get_class($this->
getContainerGUI()),
'crs_prev_sess',(
int) !$prefp);
253 $tpl->setVariable(
'HREF_TITLE_LINKED',$ilCtrl->getLinkTargetByClass(get_class($this->
getContainerGUI())));
259 $prefn = $ilUser->getPref(
'crs_sess_show_next_'.$this->
getContainerObject()->getId());
263 $tpl->setVariable(
'TXT_TITLE_LINKED',$lng->txt(
'crs_link_hide_next_sessions'));
264 $ilCtrl->setParameterByClass(get_class($this->
getContainerGUI()),
'crs_next_sess',(
int) !$prefn);
265 $tpl->setVariable(
'HREF_TITLE_LINKED',$ilCtrl->getLinkTargetByClass(get_class($this->
getContainerGUI())));
270 $tpl->setVariable(
'TXT_TITLE_LINKED',$lng->txt(
'crs_link_show_all_next_sessions'));
271 $ilCtrl->setParameterByClass(get_class($this->
getContainerGUI()),
'crs_next_sess',(
int) !$prefn);
272 $tpl->setVariable(
'HREF_TITLE_LINKED',$ilCtrl->getLinkTargetByClass(get_class($this->
getContainerGUI())));
276 $tpl->parseCurrentBlock();
293 $tpl->setCurrentBlock(
'details_img');
295 $append = $this->details_level == 1 ?
'off' :
'';
296 $tpl->setCurrentBlock(
'details_img');
298 $tpl->setVariable(
'DETAILS_ALT',$this->lng->txt(
'details').
' 1');
299 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->
getContainerObject()->getRefId());
300 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"details_level",
"1");
301 $tpl->setVariable(
'DETAILS_LINK',
302 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
""));
303 $tpl->parseCurrentBlock();
305 $append = $this->details_level == 2 ?
'off' :
'';
306 $tpl->setCurrentBlock(
'details_img');
308 $tpl->setVariable(
'DETAILS_ALT',$this->lng->txt(
'details').
' 2');
309 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"details_level",
"2");
310 $tpl->setVariable(
'DETAILS_LINK',
311 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
""));
312 $tpl->parseCurrentBlock();
314 $append = $this->details_level == 3 ?
'off' :
'';
315 $tpl->setCurrentBlock(
'details_img');
317 $tpl->setVariable(
'DETAILS_ALT',$this->lng->txt(
'details').
' 3');
318 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"details_level",
"3");
319 $tpl->setVariable(
'DETAILS_LINK',
320 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
""));
321 $tpl->parseCurrentBlock();
323 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
325 $tpl->setCurrentBlock(
'container_details_row');
326 $tpl->setVariable(
'TXT_DETAILS',$this->lng->txt(
'details'));
327 $tpl->parseCurrentBlock();
343 if(
$_GET[
'expand'] > 0)
345 $_SESSION[
'sess'][
'expanded'][abs((
int)
$_GET[
'expand'])] = self::DETAILS_ALL;
349 $_SESSION[
'sess'][
'expanded'][abs((
int)
$_GET[
'expand'])] = self::DETAILS_TITLE;
353 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
356 $this->force_details = $session;
360 $this->force_details = array($session);
newBlockTemplate()
returns a new list block template
addSeparatorRow(&$a_tpl)
Add separator row between two blocks.
getMainContent()
Get content HTML for main column.
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
addHeaderRow($a_tpl, $a_type="", $a_text="")
Add header row to block template.
insertPageEmbeddedBlocks($a_output_html)
Insert blocks into container page.
Parent class of all container content GUIs.
getDetailsLevel($a_session_id)
get details level
renderSessionLimitLink($a_previous=true)
Show link to show/hide all previous/next sessions.
getItemGroupsHTML($a_tpl)
Get item groups HTML.
addStandardRow(&$a_tpl, $a_html, $a_ref_id=0)
add item row to template
__showMaterials($a_tpl)
Show Materials.
getContainerGUI()
Get container GUI object.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
getContainerObject()
Get container object.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
renderItem($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
Render an item.
addFooterRow($tpl)
add footer row
clearAdminCommandsDetermination()
cleaer administration commands determination
static lookupLastSessionByCourse($a_ref_id)
public
__construct($container_gui_obj)
Constructor.
Shows all items in one block.
initDetails()
init details
static lookupNextSessionByCourse($a_ref_id)
public