ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjExerciseSubItemListGUI Class Reference

Represents search sub item lists. More...

+ Inheritance diagram for ilObjExerciseSubItemListGUI:
+ Collaboration diagram for ilObjExerciseSubItemListGUI:

Public Member Functions

 getHTML ()
- Public Member Functions inherited from ilSubItemListGUI
 __construct ($a_cmd_class)
 Constructor.
 getCmdClass ()
 get cmd class
 setHighlighter ($a_highlighter)
 set highlighter
 getHighlighter ()
 get highlighter
 getRefId ()
 get ref id
 getObjId ()
 get obj id
 getType ()
 get type
 getSubItemIds ($a_limited=false)
 get sub item ids
 getItemListGUI ()
 get item list gui
 init ($item_list_gui, $a_ref_id, $a_subitem_ids)
 init

Protected Member Functions

 isAssignmentVisible ($a_ass_id)
 Check if read access to assignments is granted.
- Protected Member Functions inherited from ilSubItemListGUI
 showDetailsLink ()
 show details link

Additional Inherited Members

- Static Public Member Functions inherited from ilSubItemListGUI
static setShowDetails ($a_obj_id)
 set show details.
static resetDetails ()
 reset details As long as static::resetDetails is not possible this method is final
static enabledDetails ($a_obj_id)
 enabled show details As long as static::enableDetails is not possible this method is final
- Protected Attributes inherited from ilSubItemListGUI
 $cmdClass = null
 $tpl
- Static Protected Attributes inherited from ilSubItemListGUI
static $MAX_SUBITEMS = 5

Detailed Description

Represents search sub item lists.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 16 of file class.ilObjExerciseSubItemListGUI.php.

Member Function Documentation

ilObjExerciseSubItemListGUI::getHTML ( )
See Also
ilSubItemListGUI::getHTML()

Reimplemented from ilSubItemListGUI.

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

References $lng, $valid, ilSubItemListGUI\getHighlighter(), ilSubItemListGUI\getObjId(), ilSubItemListGUI\getRefId(), ilSubItemListGUI\getSubItemIds(), isAssignmentVisible(), ilExAssignment\lookupTitle(), and ilSubItemListGUI\showDetailsLink().

{
global $lng;
$lng->loadLanguageModule('exc');
$valid = false;
foreach($this->getSubItemIds(true) as $sub_item)
{
if(!$this->isAssignmentVisible($sub_item))
{
continue;
}
$valid = true;
if(is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(),$sub_item)))
{
$this->tpl->setCurrentBlock('sea_fragment');
$this->tpl->setVariable('TXT_FRAGMENT',$this->getHighlighter()->getContent($this->getObjId(),$sub_item));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock('subitem');
$this->tpl->setVariable('SUBITEM_TYPE',$lng->txt('exc_assignment'));
$this->tpl->setVariable('SEPERATOR',':');
#$link_data = ilLinkResourceItems::lookupItem($this->getObjId(),$sub_item);
#$link_data = ilParameterAppender::_append($link_data);
#$this->getItemListGUI()->setChildId($sub_item);
$this->tpl->setVariable('LINK','ilias.php?baseClass=ilExerciseHandlerGUI&cmd=showOverview&ref_id='.$this->getRefId().'&ass_id='.$sub_item);
$this->tpl->setVariable('TITLE',ilExAssignment::lookupTitle($sub_item));
$this->tpl->parseCurrentBlock();
}
$this->showDetailsLink();
return $valid ? $this->tpl->get() : '';
}

+ Here is the call graph for this function:

ilObjExerciseSubItemListGUI::isAssignmentVisible (   $a_ass_id)
protected

Check if read access to assignments is granted.

Parameters
intassignment id
Returns

Definition at line 23 of file class.ilObjExerciseSubItemListGUI.php.

References ilExAssignment\lookupAssignmentOnline().

Referenced by getHTML().

{
global $ilAccess;
if($ilAccess->checkAccess('write','',$this->getRefId()))
{
return true;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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