ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilContainerObjectiveGUI Class Reference

GUI class for course objective view. More...

+ Inheritance diagram for ilContainerObjectiveGUI:
+ Collaboration diagram for ilContainerObjectiveGUI:

Public Member Functions

 __construct ($a_container_gui)
 Constructor. More...
 
 getDetailsLevel ($a_objective_id)
 get details level More...
 
 getMainContent ()
 Impementation of abstract method getMainContent. More...
 
 showStatus ($tpl)
 show status More...
 
 showObjectives ($a_tpl)
 show objectives More...
 
 addFooterRow ($tpl)
 add footer row More...
 
 showMaterials ($a_tpl, $a_mode)
 Show all other (no assigned tests, no assigned materials) materials. More...
 
- Public Member Functions inherited from ilContainerContentGUI
 __construct (&$container_gui_obj)
 Constructor. More...
 
 getContainerObject ()
 Get container object. More...
 
 getContainerGUI ()
 Get container GUI object. More...
 
 setOutput ()
 Sets view output into column layout. More...
 
 getMainContent ()
 Get content HTML for main column, this one must be overwritten in derived classes. More...
 
 determinePageEmbeddedBlocks ($a_container_page_html)
 Determine all blocks that are embedded in the container page. More...
 
 addEmbeddedBlock ($block_type, $block_parameter)
 Add embedded block. More...
 
 getEmbeddedBlocks ()
 Get page embedded blocks. More...
 
 renderPageEmbeddedBlocks ()
 Render Page Embedded Blocks. More...
 
 renderItem ($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
 Render an item. More...
 
 newBlockTemplate ()
 returns a new list block template More...
 
 addStandardRow (&$a_tpl, $a_html, $a_ref_id=0)
 add item row to template More...
 
 addHeaderRow ($a_tpl, $a_type="", $a_text="")
 Add header row to block template. More...
 
 resetRowType ()
 Reset row type (toggling background colors) More...
 
 insertPageEmbeddedBlocks ($a_output_html)
 Insert blocks into container page. More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 addSeparatorRow (&$a_tpl)
 Add separator row between two blocks. More...
 
 getGroupedObjTypes ()
 Get grouped repository object types. More...
 
 getIntroduction ()
 Get introduction. More...
 
 getItemGroupsHTML ($a_tpl)
 Get item groups HTML. More...
 
 renderItemGroup ($a_tpl, $a_itgr)
 Render item group. More...
 

Data Fields

const MATERIALS_TESTS = 1
 
const MATERIALS_OTHER = 2
 
- Data Fields inherited from ilContainerContentGUI
const DETAILS_DEACTIVATED = 0
 
const DETAILS_TITLE = 1
 
const DETAILS_ALL = 2
 
 $container_gui
 
 $container_obj
 

Protected Member Functions

 renderObjective ($a_objective_id)
 render objective More...
 
 initDetails ()
 init details More...
 
 showButton ($a_cmd, $a_text, $a_target='')
 show action button More...
 
- Protected Member Functions inherited from ilContainerContentGUI
 getDetailsLevel ($a_item_id)
 get details level More...
 
 getRightColumnHTML ()
 Get HTML for right column. More...
 
 getCenterColumnHTML ()
 Get HTML for center column. More...
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
 determineAdminCommands ($a_ref_id, $a_admin_com_included_in_list=false)
 determin admin commands More...
 
 getItemGUI ($item_data, $a_show_path=false)
 Get ListGUI object for item. More...
 

Protected Attributes

 $force_details = 0
 
- Protected Attributes inherited from ilContainerContentGUI
 $details_level = self::DETAILS_DEACTIVATED
 

Private Attributes

 $output_html = ''
 

Detailed Description

GUI class for course objective view.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 35 of file class.ilContainerObjectiveGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilContainerObjectiveGUI::__construct (   $a_container_gui)

Constructor.

public

Parameters
objectcontainer gui object
Returns

Definition at line 51 of file class.ilContainerObjectiveGUI.php.

References $lng, and initDetails().

52  {
53  global $lng;
54 
55  $this->lng = $lng;
56  parent::__construct($a_container_gui);
57 
58  $this->initDetails();
59  }
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

Member Function Documentation

◆ addFooterRow()

ilContainerObjectiveGUI::addFooterRow (   $tpl)

add footer row

public

Parameters

Definition at line 214 of file class.ilContainerObjectiveGUI.php.

References $_GET, $ilCtrl, $tpl, ilContainerContentGUI\getContainerObject(), and ilUtil\getImagePath().

Referenced by showObjectives().

215  {
216  global $ilCtrl;
217 
218  $tpl->setCurrentBlock('details_img');
219 
220  $append = $this->details_level == self::DETAILS_TITLE ? 'off' : '';
221  $tpl->setCurrentBlock('details_img');
222  $tpl->setVariable('DETAILS_SRC',ilUtil::getImagePath('details2'.$append.'.png'));
223  $tpl->setVariable('DETAILS_ALT',$this->lng->txt('details').' 2');
224  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->getContainerObject()->getRefId());
225  $ilCtrl->setParameterByClass("ilrepositorygui", "details_level", "1");
226  $tpl->setVariable('DETAILS_LINK',
227  $ilCtrl->getLinkTargetByClass("ilrepositorygui", ""));
228  $tpl->parseCurrentBlock();
229 
230  $append = $this->details_level == self::DETAILS_ALL ? 'off' : '';
231  $tpl->setCurrentBlock('details_img');
232  $tpl->setVariable('DETAILS_SRC',ilUtil::getImagePath('details3'.$append.'.png'));
233  $tpl->setVariable('DETAILS_ALT',$this->lng->txt('details').' 3');
234  $ilCtrl->setParameterByClass("ilrepositorygui", "details_level", "2");
235  $tpl->setVariable('DETAILS_LINK',
236  $ilCtrl->getLinkTargetByClass("ilrepositorygui", ""));
237  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
238  $tpl->parseCurrentBlock();
239 
240  $tpl->setCurrentBlock('container_details_row');
241  $tpl->setVariable('TXT_DETAILS',$this->lng->txt('details'));
242  $tpl->parseCurrentBlock();
243  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
getContainerObject()
Get container object.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDetailsLevel()

ilContainerObjectiveGUI::getDetailsLevel (   $a_objective_id)

get details level

public

Parameters

Definition at line 68 of file class.ilContainerObjectiveGUI.php.

References ilContainerContentGUI\$details_level.

Referenced by renderObjective().

69  {
70  if($a_objective_id == $this->force_details)
71  {
72  return self::DETAILS_ALL;
73  }
74  return $this->details_level;
75  }
+ Here is the caller graph for this function:

◆ getMainContent()

ilContainerObjectiveGUI::getMainContent ( )

Impementation of abstract method getMainContent.

public

Returns

Definition at line 83 of file class.ilContainerObjectiveGUI.php.

References $lng, $tpl, ilContainerContentGUI\getContainerGUI(), ilContainerContentGUI\getContainerObject(), showButton(), showMaterials(), showObjectives(), and showStatus().

84  {
85  global $lng,$ilTabs,$ilAccess;
86 
87  // see bug #7452
88 // $ilTabs->setSubTabActive($this->getContainerObject()->getType().'_content');
89 
90 
91  include_once 'Services/Object/classes/class.ilObjectListGUIFactory.php';
92 
93  $tpl = new ilTemplate("tpl.container_page.html", true, true,"Services/Container");
94 
95  // Feedback
96  // @todo
97 // $this->__showFeedBack();
98 
99  if($ilAccess->checkAccess('write','',$this->getContainerObject()->getRefId()) or 1)
100  {
101  $this->showButton('askReset',$lng->txt('crs_reset_results'));
102  }
103 
104  $this->items = $this->getContainerObject()->getSubItems($this->getContainerGUI()->isActiveAdministrationPanel());
105 
106  $this->showStatus($tpl);
107  $this->showObjectives($tpl);
108  $this->showMaterials($tpl,self::MATERIALS_TESTS);
109 
110  $this->showMaterials($tpl,self::MATERIALS_OTHER);
111 
112  $tpl->setVariable('CONTAINER_PAGE_CONTENT',$this->output_html);
113  #$tpl->setVariable('cont_page_content',$info_tpl->get());
114  #$tpl->parseCurrentBlock('CONTAINER_PAGE_CONTENT',$this->output_html);
115  #$tpl->parseCurrentBlock();
116 
117  return $tpl->get();
118  }
showMaterials($a_tpl, $a_mode)
Show all other (no assigned tests, no assigned materials) materials.
showButton($a_cmd, $a_text, $a_target='')
show action button
getContainerGUI()
Get container GUI object.
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
global $lng
Definition: privfeed.php:40
showObjectives($a_tpl)
show objectives
+ Here is the call graph for this function:

◆ initDetails()

ilContainerObjectiveGUI::initDetails ( )
protected

init details

protected

Parameters

Definition at line 444 of file class.ilContainerObjectiveGUI.php.

References $_GET, ilContainerContentGUI\$details_level, $force_details, $ilUser, ilCourseObjective\_getObjectiveIds(), ilContainerContentGUI\getContainerObject(), and ilCourseObjectiveResultCache\isSuggested().

Referenced by __construct().

445  {
446  global $ilUser;
447 
448  if(isset($_GET['details_level']))
449  {
450  $this->details_level = (int) $_GET['details_level'];
451  ilObjUser::_writePref($ilUser->getId(),'crs_objectives_details',$this->details_level);
452  }
453  else
454  {
455  $this->details_level = $ilUser->getPref('crs_objectives_details') ? $ilUser->getPref('crs_objectives_details') : self::DETAILS_TITLE;
456  }
457  if(isset($_GET['objective_details']))
458  {
459  $this->force_details = (int) $_GET['objective_details'];
460  ilObjUser::_writePref($ilUser->getId(),'crs_objectives_force_details_'.$this->getContainerObject()->getId(),$this->force_details);
461  }
462  elseif($details_id = $ilUser->getPref('crs_objectives_force_details_'.$this->getContainerObject()->getId()))
463  {
464  $this->force_details = $details_id;
465  }
466  else
467  {
468  include_once './Modules/Course/classes/class.ilCourseObjective.php';
469  include_once('./Modules/Course/classes/class.ilCourseObjectiveResultCache.php');
470  foreach(ilCourseObjective::_getObjectiveIds($this->getContainerObject()->getId()) as $objective_id)
471  {
472  if(ilCourseObjectiveResultCache::isSuggested($ilUser->getId(),$this->getContainerObject()->getId(),$objective_id))
473  {
474  $this->force_details = $objective_id;
475  break;
476  }
477  }
478  }
479  return true;
480  }
$_GET["client_id"]
static isSuggested($a_usr_id, $a_crs_id, $a_objective_id)
check if objective is suggested
getContainerObject()
Get container object.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderObjective()

ilContainerObjectiveGUI::renderObjective (   $a_objective_id)
protected

render objective

protected

Parameters
intobjective id
Returns
string html

Definition at line 345 of file class.ilContainerObjectiveGUI.php.

References $ilUser, $lng, ilContainerSorting\_getInstance(), ilLMObject\_lookupTitle(), ilContainerContentGUI\determineAdminCommands(), ilContainerContentGUI\getContainerGUI(), ilContainerContentGUI\getContainerObject(), getDetailsLevel(), ilContainerContentGUI\getItemGUI(), ilObjectActivation\getItemsByObjective(), and ilContainer\SORT_MANUAL.

Referenced by showObjectives().

346  {
347  global $ilUser,$lng;
348 
349  include_once('./Modules/Course/classes/class.ilCourseObjective.php');
350  $objective = new ilCourseObjective($this->getContainerObject(),$a_objective_id);
351 
352  include_once('./Services/Container/classes/class.ilContainerSorting.php');
353  include_once('./Services/Object/classes/class.ilObjectActivation.php');
354  $items = ilObjectActivation::getItemsByObjective($a_objective_id);
355  $items = ilContainerSorting::_getInstance($this->getContainerObject()->getId())->sortSubItems('lobj',$a_objective_id,$items);
356 
357  include_once('./Modules/Course/classes/class.ilCourseObjectiveMaterials.php');
358  $objectives_lm_obj = new ilCourseObjectiveMaterials($a_objective_id);
359 
360  $pos = 1;
361  foreach($items as $item)
362  {
363  if($this->getDetailsLevel($a_objective_id) < self::DETAILS_ALL)
364  {
365  continue;
366  }
367 
368  $chapters = $objectives_lm_obj->getChapters();
369 
370  $item_list_gui2 = $this->getItemGUI($item);
371  $item_list_gui2->enableIcon(true);
372 
373  if(count($chapters))
374  {
375  $num = 0;
376  $has_sections = false;
377  foreach($chapters as $chapter)
378  {
379  if($chapter['ref_id'] != $item['child'])
380  {
381  continue;
382  }
383  $has_sections = true;
384  include_once './Modules/LearningModule/classes/class.ilLMObject.php';
385 
386  $details[$num]['desc'] = $lng->txt('obj_'.$chapter['type']).' -> ';
387  $details[$num]['target'] = '_top';
388  $details[$num]['link'] = "ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$chapter['ref_id'].'&obj_id='.$chapter['obj_id'];
389  $details[$num]['name'] = ilLMObject::_lookupTitle($chapter['obj_id']);
390  $num++;
391  }
392  if($has_sections)
393  {
394  $item_list_gui2->enableItemDetailLinks(true);
395  $item_list_gui2->setItemDetailLinks($details,$lng->txt('crs_suggested_sections').': ');
396  }
397  }
398 
399  if ($this->getContainerGUI()->isActiveAdministrationPanel())
400  {
401  $item_list_gui2->enableCheckbox(true);
402  if ($this->getContainerObject()->getOrderType() == ilContainer::SORT_MANUAL)
403  {
404  $item_list_gui2->setPositionInputField("[lobj][".$a_objective_id."][".$item["ref_id"]."]",
405  sprintf('%.1f', $pos));
406  $pos++;
407  }
408 
409  }
410  $this->rendered_items[$item['child']] = true;
411  $sub_item_html = $item_list_gui2->getListItemHTML($item['ref_id'],
412  $item['obj_id'], $item['title'], $item['description']);
413 
414  $this->determineAdminCommands($item["ref_id"],
415  $item_list_gui2->adminCommandsIncluded());
416  $this->objective_list_gui->addSubItemHTML($sub_item_html);
417  }
418 
419  if($this->getDetailsLevel($a_objective_id) == self::DETAILS_ALL)
420  {
421  $this->objective_list_gui->enableCommands(false);
422  }
423  else
424  {
425  $this->objective_list_gui->enableCommands(true);
426  }
427 
428  $html = $this->objective_list_gui->getListItemHTML(
429  0,
430  $a_objective_id,
431  $objective->getTitle(),
432  $objective->getDescription());
433 
434  return $html;
435  }
determineAdminCommands($a_ref_id, $a_admin_com_included_in_list=false)
determin admin commands
getItemGUI($item_data, $a_show_path=false)
Get ListGUI object for item.
static _lookupTitle($a_obj_id)
Lookup title.
class ilCourseObjectiveMaterials
getContainerGUI()
Get container GUI object.
class ilcourseobjective
getContainerObject()
Get container object.
global $ilUser
Definition: imgupload.php:15
static getItemsByObjective($a_objective_id)
Get objective items.
global $lng
Definition: privfeed.php:40
static _getInstance($a_obj_id)
get instance by obj_id
getDetailsLevel($a_objective_id)
get details level
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showButton()

ilContainerObjectiveGUI::showButton (   $a_cmd,
  $a_text,
  $a_target = '' 
)
protected

show action button

protected

Parameters

Definition at line 489 of file class.ilContainerObjectiveGUI.php.

References $ilCtrl.

Referenced by getMainContent().

490  {
491  global $ilToolbar, $ilCtrl;
492 
493  // #11842
494  $ilToolbar->addButton($a_text,
495  $ilCtrl->getLinkTarget($this->getContainerGUI(),$a_cmd),
496  $a_target);
497  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ showMaterials()

ilContainerObjectiveGUI::showMaterials (   $a_tpl,
  $a_mode 
)

Show all other (no assigned tests, no assigned materials) materials.

public

Parameters
object$tpltemplate object
Returns
void

Definition at line 254 of file class.ilContainerObjectiveGUI.php.

References $lng, $output_html, $tpl, ilContainerContentGUI\addHeaderRow(), ilContainerContentGUI\addStandardRow(), ilContainerContentGUI\clearAdminCommandsDetermination(), ilContainerContentGUI\getItemGroupsHTML(), ilContainerContentGUI\insertPageEmbeddedBlocks(), ilContainerContentGUI\newBlockTemplate(), and ilContainerContentGUI\renderItem().

Referenced by getMainContent().

255  {
256  global $ilAccess, $lng;
257 
259 
260  #$output_html = $this->getContainerGUI()->getContainerPageHTML();
261 
262  // get embedded blocks
263  if ($output_html != "")
264  {
266  }
267 
268  $tpl = $this->newBlockTemplate();
269 
270  // item groups
271  $tpl = $this->newBlockTemplate();
272 
273  if ($a_mode == self::MATERIALS_OTHER)
274  {
275  $this->getItemGroupsHTML($tpl);
276  }
277 
278 
279  if (is_array($this->items["_all"]))
280  {
281  // all rows
282  $item_r = array();
283 
284  $position = 1;
285  foreach($this->items["_all"] as $k => $item_data)
286  {
287  if($a_mode == self::MATERIALS_TESTS and $item_data['type'] != 'tst')
288  {
289  continue;
290  }
291  if ($item_data['type'] == 'itgr')
292  {
293  continue;
294  }
295 
296  if($this->rendered_items[$item_data["child"]] !== true)
297  {
298  $this->rendered_items[$item_data['child']] = true;
299 
300  // TODO: Position (DONE ?)
301  $html = $this->renderItem($item_data,$position++,$a_mode == self::MATERIALS_TESTS ? false : true);
302  if ($html != "")
303  {
304  $item_r[] = array("html" => $html, "id" => $item_data["child"]);
305  }
306  }
307  }
308 
309  // if we have at least one item, output the block
310  if (count($item_r) > 0)
311  {
312  switch($a_mode)
313  {
314  case self::MATERIALS_TESTS:
315  $txt = $lng->txt('objs_tst');
316  break;
317 
318  case self::MATERIALS_OTHER:
319  $txt = $lng->txt('crs_other_resources');
320  break;
321  }
322 
323  $this->addHeaderRow($tpl,$a_mode == self::MATERIALS_TESTS ? 'tst' : '',$txt);
324  foreach($item_r as $h)
325  {
326  $this->addStandardRow($tpl, $h["html"], $h["id"]);
327  }
328  }
329  }
330 
331  #$output_html .= $tpl->get();
332  $this->output_html .= $tpl->get();
333  #$a_tpl->setCurrentBlock('cont_page_content');
334  #$a_tpl->setVariable("CONTAINER_PAGE_CONTENT", $output_html);
335  #$a_tpl->parseCurrentBlock();
336  }
newBlockTemplate()
returns a new list block template
addHeaderRow($a_tpl, $a_type="", $a_text="")
Add header row to block template.
insertPageEmbeddedBlocks($a_output_html)
Insert blocks into container page.
getItemGroupsHTML($a_tpl)
Get item groups HTML.
addStandardRow(&$a_tpl, $a_html, $a_ref_id=0)
add item row to template
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.
clearAdminCommandsDetermination()
cleaer administration commands determination
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showObjectives()

ilContainerObjectiveGUI::showObjectives (   $a_tpl)

show objectives

public

Parameters
object$tpltemplate object
Returns

Definition at line 152 of file class.ilContainerObjectiveGUI.php.

References $ilSetting, $lng, $output_html, $tpl, ilCourseObjective\_getObjectiveIds(), addFooterRow(), ilContainerContentGUI\addHeaderRow(), ilContainerContentGUI\addStandardRow(), ilContainerContentGUI\clearAdminCommandsDetermination(), ilContainerContentGUI\getContainerGUI(), ilContainerContentGUI\getContainerObject(), ilContainerContentGUI\insertPageEmbeddedBlocks(), ilContainerContentGUI\newBlockTemplate(), and renderObjective().

Referenced by getMainContent().

153  {
154  global $lng,$ilSetting;
155 
157  $output_html = $this->getContainerGUI()->getContainerPageHTML();
158 
159 
160  // get embedded blocks
161  if ($output_html != "")
162  {
164  }
165 
166  $tpl = $this->newBlockTemplate();
167 
168  // All objectives
169  include_once './Modules/Course/classes/class.ilCourseObjective.php';
170  if(!count($objective_ids = ilCourseObjective::_getObjectiveIds($this->getContainerObject()->getId())))
171  {
172  return false;
173  }
174 
175  include_once('./Modules/Course/classes/class.ilCourseObjectiveListGUI.php');
176  $this->objective_list_gui = new ilCourseObjectiveListGUI();
177  $this->objective_list_gui->setContainerObject($this->getContainerGUI());
178  if ($ilSetting->get("icon_position_in_lists") == "item_rows")
179  {
180  $this->objective_list_gui->enableIcon(true);
181  }
182 
183 
184  $item_html = array();
185  foreach($objective_ids as $objective_id)
186  {
187  if($html = $this->renderObjective($objective_id))
188  {
189  $item_html[] = $html;
190  }
191  }
192 
193  // if we have at least one item, output the block
194  if (count($item_html) > 0)
195  {
196  $this->addHeaderRow($tpl,'lobj',$lng->txt('crs_objectives'));
197  foreach($item_html as $h)
198  {
199  $this->addStandardRow($tpl, $h);
200  }
201  }
202 
203  $this->addFooterRow($tpl);
204  $this->output_html .= $output_html.$tpl->get();
205  }
newBlockTemplate()
returns a new list block template
addHeaderRow($a_tpl, $a_type="", $a_text="")
Add header row to block template.
insertPageEmbeddedBlocks($a_output_html)
Insert blocks into container page.
addStandardRow(&$a_tpl, $a_html, $a_ref_id=0)
add item row to template
getContainerGUI()
Get container GUI object.
getContainerObject()
Get container object.
renderObjective($a_objective_id)
render objective
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
clearAdminCommandsDetermination()
cleaer administration commands determination
global $ilSetting
Definition: privfeed.php:40
global $lng
Definition: privfeed.php:40
List gui for course objectives.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showStatus()

ilContainerObjectiveGUI::showStatus (   $tpl)

show status

public

Parameters

Definition at line 127 of file class.ilContainerObjectiveGUI.php.

References $ilUser, $lng, ilContainerContentGUI\getContainerObject(), ilUtil\getImagePath(), ilCourseObjectiveResultCache\getStatus(), and IL_OBJECTIVE_STATUS_EMPTY.

Referenced by getMainContent().

128  {
129  global $ilUser,$lng;
130 
131  include_once('./Modules/Course/classes/class.ilCourseObjectiveResultCache.php');
132 
133 
134  $status = ilCourseObjectiveResultCache::getStatus($ilUser->getId(),$this->getContainerObject()->getId());
135  if($status == IL_OBJECTIVE_STATUS_EMPTY) {
136  return;
137  }
138  $info_tpl = new ilTemplate('tpl.crs_objectives_view_info_table.html',true,true,'Modules/Course');
139  $info_tpl->setVariable("INFO_STRING",$lng->txt('crs_objectives_info_'.$status));
140  $info_tpl->setVariable("IMG_INFO", ilUtil::getImagePath("mess_info.png"));
141 
142  $this->output_html .= $info_tpl->get();
143  }
const IL_OBJECTIVE_STATUS_EMPTY
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.
static getStatus($a_usr_id, $a_crs_id)
get status of user
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $force_details

ilContainerObjectiveGUI::$force_details = 0
protected

Definition at line 37 of file class.ilContainerObjectiveGUI.php.

Referenced by initDetails().

◆ $output_html

ilContainerObjectiveGUI::$output_html = ''
private

Definition at line 42 of file class.ilContainerObjectiveGUI.php.

Referenced by showMaterials(), and showObjectives().

◆ MATERIALS_OTHER

const ilContainerObjectiveGUI::MATERIALS_OTHER = 2

Definition at line 40 of file class.ilContainerObjectiveGUI.php.

◆ MATERIALS_TESTS

const ilContainerObjectiveGUI::MATERIALS_TESTS = 1

Definition at line 39 of file class.ilContainerObjectiveGUI.php.


The documentation for this class was generated from the following file: