ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjiLincClassroomListGUI Class Reference

Class ilObjiLincClassroomListGUI. More...

+ Inheritance diagram for ilObjiLincClassroomListGUI:
+ Collaboration diagram for ilObjiLincClassroomListGUI:

Public Member Functions

 ilObjiLincClassroomListGUI ()
 constructor
 init ()
 initialisation
 getListItemHTML ($a_icrs_ref_id, $a_icla_id, $a_title, $a_description, $a_item)
 Get all item information (title, commands, description) in HTML.
 initItem ($a_icrs_ref_id, $a_icla_id, $a_title, $a_description)
 inititialize new item (is called by getItemHTML())
 getCommands ()
 get all current commands for a specific ref id (in the permission context of the current user)
 insertCommands ()
 insert delete command
 getCommandLink ($a_cmd)
 Get command link url.
 getCommandFrame ($a_cmd)
 Get command target frame.
 getProperties ($a_item= '')
 Get item properties.
- Public Member Functions inherited from ilObjectListGUI
 ilObjectListGUI ()
 constructor
 setContainerObject (&$container_obj)
 set the container object (e.g categorygui) Used for link, delete ...
 getContainerObject ()
 get container object
 enableProperties ($a_status)
 En/disable properties.
 getPropertiesStatus ()
 enablePreconditions ($a_status)
 En/disable preconditions.
 getNoticePropertiesStatus ()
 enableNoticeProperties ($a_status)
 En/disable notices.
 getPreconditionsStatus ()
 enableDescription ($a_status)
 En/disable description.
 getDescriptionStatus ()
 enableIcon ($a_status)
 En/Dis-able icons.
 getIconStatus ()
 Are icons enabled?
 enableCheckbox ($a_status)
 En/Dis-able checkboxes.
 getCheckboxStatus ()
 Are checkboxes enabled?
 enableExpand ($a_status)
 En/Dis-able expand/collapse link.
 getExpandStatus ()
 Is expand/collapse enabled.
 setExpanded ($a_status)
 isExpanded ()
 setPositionInputField ($a_field_index, $a_position_value)
 Set position input field.
 enableDelete ($a_status)
 En/disable delete.
 getDeleteStatus ()
 enableCut ($a_status)
 En/disable cut.
 getCutStatus ()
 enableSubscribe ($a_status)
 En/disable subscribe.
 getSubscribeStatus ()
 enablePayment ($a_status)
 En/disable payment.
 getPaymentStatus ()
 enableLink ($a_status)
 En/disable link.
 getLinkStatus ()
 enablePath ($a_path)
 En/disable path.
 getPathStatus ()
 enableCommands ($a_status, $a_std_only=false)
 En/disable commands.
 getCommandsStatus ()
 enableInfoScreen ($a_info_screen)
 En/disable path.
 addSubItemHTML ($a_html)
 Add HTML for subitem (used for sessions)
 getInfoScreenStatus ()
 enableProgressInfo ($a_status)
 enable progress info
 getProgressInfoStatus ()
 get progress info status
 enableSubstitutions ($a_status)
 Enable substitutions.
 getSubstitutionStatus ()
 Get substitution status.
 enableItemDetailLinks ($a_status)
 enable item detail links E.g Direct links to chapters or pages
 getItemDetailLinkStatus ()
 get item detail link status
 setItemDetailLinks ($a_detail_links, $a_intro_txt= '')
 set items detail links
 insertItemDetailLinks ()
 insert item detail links
 setTitle ($a_title)
 getTitle ()
 getTitle overwritten in class.ilObjLinkResourceList.php
 setDescription ($a_description)
 getDescription ()
 getDescription overwritten in class.ilObjLinkResourceList.php
 getCommandId ()
 get command id Normally the ref id.
 checkCommandAccess ($a_permission, $a_cmd, $a_ref_id, $a_type)
 createDefaultCommand ($command)
 Get default command link Overwritten for e.g categories,courses => they return a goto link If search engine visibility is enabled these object type return a goto_CLIENT_ID_cat_99.html link.
 addCustomProperty ($a_property="", $a_value="", $a_alert=false, $a_newline=false)
 add custom property
 getCustomProperties ($a_prop)
 get custom properties
 getNoticeProperties ()
 get notice properties
 addCustomCommand ($a_link, $a_lang_var, $a_frame="")
 add a custom command
 getIconImageType ()
 Returns the icon image type.
 insertTitle ()
 insert item title
 insertSubstitutions ()
 Insert substitutions.
 insertDescription ()
 insert item description
 setMode ($a_mode)
 set output mode
 getMode ()
 get output mode
 setConditionDepth ($a_depth)
 set depth for precondition output (stops at level 5)
 isMode ($a_mode)
 check current output mode
 insertProperties ($a_item= '')
 insert properties
 insertNoticeProperties ()
 insertPayment ()
 insert payment information
 insertPreconditions ()
 insert all missing preconditions
 insertCommand ($a_href, $a_text, $a_frame="")
 insert command button
 insertDeleteCommand ()
 insert cut command
 insertLinkCommand ()
 insert link command
 insertCutCommand ()
 insert cut command
 insertSubscribeCommand ()
 insert subscribe command
 insertInfoScreenCommand ()
 insert info screen command
 appendRepositoryFrameParameter ($a_link)
 workaround: all links into the repository (from outside) must tell repository to setup the frameset
 insertPath ()
 insert path
 insertProgressInfo ()
 insert progress info
 insertIconsAndCheckboxes ()
 Insert icons and checkboxes.
 insertSubItems ()
 Insert subitems.
 insertPositionField ()
 Insert field for positioning.
 adminCommandsIncluded ()
 returns whether any admin commands (link, delete, cut) are included in the output
 getListItemHTML ($a_ref_id, $a_obj_id, $a_title, $a_description)
 Get all item information (title, commands, description) in HTML.
 isSideBlock ()
 Returns whether current item is a block in a side column or not.
 setBoldTitle ($a_bold_title)
 public boolean $a_bold_title set the item title bold
 isTitleBold ()
 public

Additional Inherited Members

- Data Fields inherited from ilObjectListGUI
 $ctrl
 $description_enabled = true
 $preconditions_enabled = true
 $properties_enabled = true
 $notice_properties_enabled = true
 $commands_enabled = true
 $cust_prop = array()
 $cust_commands = array()
 $info_screen_enabled = false
 $condition_depth = 0
 $std_cmd_only = false
 $sub_item_html = array()
- Protected Member Functions inherited from ilObjectListGUI
 insertPaymentCommand ()
- Protected Attributes inherited from ilObjectListGUI
 $substitutions = null
 $substitutions_enabled = false
 $icons_enabled = false
 $checkboxes_enabled = false
 $position_enabled = false
 $progress_enabled = false
 $item_detail_links_enabled = false
 $item_detail_links = array()
 $item_detail_links_intro = ''
 $expand_enabled = false
 $is_expanded = true
 $bold_title = false

Detailed Description

Member Function Documentation

ilObjiLincClassroomListGUI::getCommandFrame (   $a_cmd)

Get command target frame.

Overwrite this method if link frame is not current frame

Parameters
string$a_cmdcommand
Returns
string command target frame

Reimplemented from ilObjectListGUI.

Definition at line 300 of file class.ilObjiLincClassroomListGUI.php.

Referenced by getCommands().

{
switch($a_cmd)
{
case "joinClassroom":
case "agendaClassroom":
$frame = "_blank";
break;
default:
$frame = "";
break;
}
return $frame;
}

+ Here is the caller graph for this function:

ilObjiLincClassroomListGUI::getCommandLink (   $a_cmd)

Get command link url.

Overwrite this method, if link target is not build by ctrl class (e.g. "lm_presentation.php", "forum.php"). This is the case for all links now, but bringing everything to ilCtrl should be realised in the future.

Parameters
string$a_cmdcommand
Returns
string command link url

Reimplemented from ilObjectListGUI.

Definition at line 285 of file class.ilObjiLincClassroomListGUI.php.

Referenced by getCommands().

{
// don't use ctrl here in the moment
//return 'repository.php?ref_id='.$this->ilinc_crs_id.'&class_id='.$this->ref_id.'&cmd='.$a_cmd;
// pass current class_id as ref_id
$this->ctrl->setParameterByClass($this->gui_class_name,"ref_id",$this->ilinc_crs_id);
$this->ctrl->setParameterByClass($this->gui_class_name,"class_id",$this->ref_id);
// separate method for this line
$cmd_link = $this->ctrl->getLinkTargetByClass($this->gui_class_name,
$a_cmd);
return $cmd_link;
}

+ Here is the caller graph for this function:

ilObjiLincClassroomListGUI::getCommands ( )

get all current commands for a specific ref id (in the permission context of the current user)

!!!NOTE!!!: Please use getListHTML() if you want to display the item including all commands

!!!NOTE 2!!!: Please do not overwrite this method in derived classes becaus it will get pretty large and much code will be simply copy-and-pasted. Insert smaller object type related method calls instead. (like getCommandLink() or getCommandFrame())

public

Parameters
int$a_ref_idref id of object
Returns
array array of command arrays including "permission" => permission name "cmd" => command "link" => command link url "frame" => command link frame "lang_var" => language variable of command "granted" => true/false: command granted or not "access_info" => access info object (to do: implementation)

Reimplemented from ilObjectListGUI.

Definition at line 162 of file class.ilObjiLincClassroomListGUI.php.

References $cmd, $command, $ilBench, $ref_id, getCommandFrame(), and getCommandLink().

Referenced by insertCommands().

{
global $ilAccess, $ilBench;
$ref_commands = array();
foreach($this->commands as $command)
{
$permission = $command["permission"];
$cmd = $command["cmd"];
$lang_var = $command["lang_var"];
// all access checking should be made within $ilAccess and
// the checkAccess of the ilObj...Access classes
$item_data = $this->container_obj->items['icla'][$this->ref_id];
$ilAccess->enable("cache",false);
$access = $ilAccess->doStatusCheck($permission, $cmd, $this->obj_id, $item_data,$this->ref_id,"icla");
$ilAccess->enable("cache",true);
if ($access)
{
$cmd_link = $this->getCommandLink($command["cmd"]);
$cmd_frame = $this->getCommandFrame($command["cmd"]);
$access_granted = true;
}
else
{
$access_granted = false;
//$info_object = $ilAccess->getInfo();
}
$ref_commands[] = array(
"permission" => $permission,
"cmd" => $cmd,
"link" => $cmd_link,
"frame" => $cmd_frame,
"lang_var" => $lang_var,
"granted" => $access_granted,
"access_info" => $info_object,
"default" => $command["default"]
);
}
return $ref_commands;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjiLincClassroomListGUI::getListItemHTML (   $a_icrs_ref_id,
  $a_icla_id,
  $a_title,
  $a_description,
  $a_item 
)

Get all item information (title, commands, description) in HTML.

public

Parameters
int$a_ref_iditem reference id
int$a_obj_iditem object id
int$a_titleitem title
int$a_descriptionitem description
Returns
string html code

Definition at line 78 of file class.ilObjiLincClassroomListGUI.php.

References ilObjectListGUI\getDescriptionStatus(), ilObjectListGUI\getPropertiesStatus(), IL_LIST_AS_TRIGGER, initItem(), insertCommands(), ilObjectListGUI\insertDescription(), ilObjectListGUI\insertProperties(), ilObjectListGUI\insertTitle(), and ilObjectListGUI\isMode().

{
// this variable stores wheter any admin commands
// are included in the output
$this->adm_commands_included = false;
// initialization
$this->tpl =& new ilTemplate ("tpl.container_list_item.html", true, true);
$this->initItem($a_icrs_ref_id, $a_icla_id, $a_title, $a_description);
// commands
$this->insertCommands();
// insert title and describtion
$this->insertTitle();
if (!$this->isMode(IL_LIST_AS_TRIGGER))
{
if ($this->getDescriptionStatus())
{
}
}
// properties
if ($this->getPropertiesStatus())
{
$this->insertProperties($a_item);
}
// preconditions
//if ($this->getPreconditionsStatus())
//{
// $this->insertPreconditions();
//}
// path
//$this->insertPath();
return $this->tpl->get();
}

+ Here is the call graph for this function:

ilObjiLincClassroomListGUI::getProperties (   $a_item = '')

Get item properties.

Overwrite this method to add properties at the bottom of the item html

Returns
array array of property arrays: "alert" (boolean) => display as an alert property (usually in red) "property" (string) => property name "value" (string) => property value

Reimplemented from ilObjectListGUI.

Definition at line 328 of file class.ilObjiLincClassroomListGUI.php.

References ilObjiLincClassroom\_getDocent().

{
//var_dump($a_item);
global $ilias;
$props = array();
// docent
include_once ('./Modules/ILinc/classes/class.ilObjiLincClassroom.php');
$docent = ilObjiLincClassroom::_getDocent($a_item['instructoruserid']);
if (!$docent)
{
$props[] = array("alert" => true, "property" => $this->lng->txt(ILINC_MEMBER_DOCENT), "value" => $this->lng->txt('ilinc_no_docent_assigned'));
}
else
{
$props[] = array("alert" => false, "property" => $this->lng->txt(ILINC_MEMBER_DOCENT), "value" => $docent);
}
// display offline/online status
if ($a_item['alwaysopen'])
{
$props[] = array("alert" => false, "property" => $this->lng->txt("status"),
"value" => $this->lng->txt("ilinc_classroom_always_open"));
}
else
{
$props[] = array("alert" => true, "property" => $this->lng->txt("status"),
"value" => $this->lng->txt("ilinc_classroom_closed"));
}
// display cost centers if active
/*
if ($ilias->getSetting("ilinc_akclassvalues_active"))
{
$akclassvalues = ilObjiLincClassroom::_getDocent($a_item['instructoruserid']);
$value = "";
if (!empty($akclassvalues[0]))
{
$value = $akclassvalues[0];
$property = $lng->txt("ilinc_akclassvalue");
if (!empty($akclassvalues[1]))
{
$value .= " / ".$akclassvalues[1];
$property = $lng->txt("ilinc_akclassvalues");
}
}
elseif (!empty($akclassvalues[1]))
{
$value = $akclassvalues[1];
$property = $lng->txt("ilinc_akclassvalue");
}
else
{
$property = $lng->txt("ilinc_akclassvalues");
$value = $lng->txt("ilinc_no_akclassvalues");
}
}*/
return $props;
}

+ Here is the call graph for this function:

ilObjiLincClassroomListGUI::ilObjiLincClassroomListGUI ( )

constructor

Definition at line 44 of file class.ilObjiLincClassroomListGUI.php.

References $_GET, and ilObjectListGUI\ilObjectListGUI().

{
$this->ilinc_crs_id = $_GET['ref_id'];
$this->ilObjectListGUI();
}

+ Here is the call graph for this function:

ilObjiLincClassroomListGUI::init ( )

initialisation

Reimplemented from ilObjectListGUI.

Definition at line 53 of file class.ilObjiLincClassroomListGUI.php.

References ilObjiLincClassroomAccess\_getCommands().

{
$this->delete_enabled = false;
$this->cut_enabled = false;
$this->subscribe_enabled = false;
$this->link_enabled = false;
$this->payment_enabled = false;
$this->type = "icla";
$this->gui_class_name = "ilobjilincclassroomgui";
// general commands array
include_once('./Modules/ILinc/classes/class.ilObjiLincClassroomAccess.php');
}

+ Here is the call graph for this function:

ilObjiLincClassroomListGUI::initItem (   $a_icrs_ref_id,
  $a_icla_id,
  $a_title,
  $a_description 
)

inititialize new item (is called by getItemHTML())

Parameters
int$a_ref_idreference id
int$a_obj_idobject id
string$a_titletitle
string$a_descriptiondescription

Reimplemented from ilObjectListGUI.

Definition at line 128 of file class.ilObjiLincClassroomListGUI.php.

Referenced by getListItemHTML().

{
$this->ref_id = $a_icla_id;
$this->obj_id = $a_icrs_ref_id;
$this->title = $a_title;
$this->description = $a_description;
// checks, whether any admin commands are included in the output
$this->adm_commands_included = false;
}

+ Here is the caller graph for this function:

ilObjiLincClassroomListGUI::insertCommands ( )

insert delete command

private

Parameters
object$a_tpltemplate object
int$a_ref_iditem reference id insert all commands into html code

private

Parameters
object$a_tpltemplate object
int$a_ref_iditem reference id

Reimplemented from ilObjectListGUI.

Definition at line 236 of file class.ilObjiLincClassroomListGUI.php.

References $command, getCommands(), IL_LIST_AS_TRIGGER, ilObjectListGUI\insertCommand(), ilObjectListGUI\insertDeleteCommand(), and ilObjectListGUI\isMode().

Referenced by getListItemHTML().

{
$this->ctrl->setParameterByClass($this->gui_class_name, "ref_id", $this->ref_id);
$commands = $this->getCommands($this->ref_id, $this->obj_id);
$this->default_command = false;
foreach($commands as $command)
{
if ($command["granted"] == true )
{
if (!$command["default"] === true)
{
$cmd_link = $command["link"];
$this->insertCommand($cmd_link, $this->lng->txt($command["lang_var"]),
$command["frame"]);
}
else
{
// this is view/show most times and will be linked
// with the item title in insertTitle
$this->default_command = $command;
}
}
}
if (!$this->isMode(IL_LIST_AS_TRIGGER))
{
// delete
if ($this->delete_enabled)
{
}
}
}

+ 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: