ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjExerciseSubItemListGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 
5 include_once './Services/Object/classes/class.ilSubItemListGUI.php';
6 include_once './Modules/Exercise/classes/class.ilExAssignment.php';
7 
17 {
23  protected function isAssignmentVisible($a_ass_id)
24  {
25  global $ilAccess;
26 
27  if($ilAccess->checkAccess('write','',$this->getRefId()))
28  {
29  return true;
30  }
31 
33  }
34 
35 
39  public function getHTML()
40  {
41  global $lng;
42 
43  $lng->loadLanguageModule('exc');
44 
45  $valid = false;
46  foreach($this->getSubItemIds(true) as $sub_item)
47  {
48  if(!$this->isAssignmentVisible($sub_item))
49  {
50  continue;
51  }
52  $valid = true;
53 
54  if(is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(),$sub_item)))
55  {
56  $this->tpl->setCurrentBlock('sea_fragment');
57  $this->tpl->setVariable('TXT_FRAGMENT',$this->getHighlighter()->getContent($this->getObjId(),$sub_item));
58  $this->tpl->parseCurrentBlock();
59  }
60  $this->tpl->setCurrentBlock('subitem');
61  $this->tpl->setVariable('SUBITEM_TYPE',$lng->txt('exc_assignment'));
62  $this->tpl->setVariable('SEPERATOR',':');
63 
64  #$link_data = ilLinkResourceItems::lookupItem($this->getObjId(),$sub_item);
65  #$link_data = ilParameterAppender::_append($link_data);
66 
67  #$this->getItemListGUI()->setChildId($sub_item);
68  $this->tpl->setVariable('LINK','ilias.php?baseClass=ilExerciseHandlerGUI&cmd=showOverview&ref_id='.$this->getRefId().'&ass_id='.$sub_item);
69  $this->tpl->setVariable('TITLE',ilExAssignment::lookupTitle($sub_item));
70  $this->tpl->parseCurrentBlock();
71  }
72 
73  $this->showDetailsLink();
74 
75  return $valid ? $this->tpl->get() : '';
76 
77 
78  }
79 }
80 ?>