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. | |
Class ilObjiLincClassroomListGUI.
Definition at line 37 of file class.ilObjiLincClassroomListGUI.php.
| ilObjiLincClassroomListGUI::getCommandFrame | ( | $ | a_cmd | ) |
Get command target frame.
Overwrite this method if link frame is not current frame
| string | $a_cmd command |
Reimplemented from ilObjectListGUI.
Definition at line 296 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.
| string | $a_cmd command |
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;
// 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
| int | $a_ref_id ref id of object |
Reimplemented from ilObjectListGUI.
Definition at line 162 of file class.ilObjiLincClassroomListGUI.php.
References $cmd, $command, $ilAccess, $ilBench, 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
| int | $a_ref_id item reference id | |
| int | $a_obj_id item object id | |
| int | $a_title item title | |
| int | $a_description item description |
Definition at line 78 of file class.ilObjiLincClassroomListGUI.php.
References ilObjectListGUI::getDescriptionStatus(), ilObjectListGUI::getPropertiesStatus(), 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())
{
$this->insertDescription();
}
}
// 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
Reimplemented from ilObjectListGUI.
Definition at line 324 of file class.ilObjiLincClassroomListGUI.php.
References ilObjiLincClassroom::_getDocent().
{
$props = array();
// docent
include_once ('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);
}
//var_dump($a_item['alwaysopen']);
// offline
if ($a_item['alwaysopen'] == 'Wahr')
{
$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"));
}
return $props;
}
Here is the call graph for this function:| ilObjiLincClassroomListGUI::ilObjiLincClassroomListGUI | ( | ) |
constructor
Definition at line 43 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('class.ilObjiLincClassroomAccess.php');
$this->commands = ilObjiLincClassroomAccess::_getCommands();
}
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())
| int | $a_ref_id reference id | |
| int | $a_obj_id object id | |
| string | $a_title title | |
| string | $a_description description |
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
| object | $a_tpl template object | |
| int | $a_ref_id item reference id insert all commands into html code private | |
| object | $a_tpl template object | |
| int | $a_ref_id item reference id |
Reimplemented from ilObjectListGUI.
Definition at line 236 of file class.ilObjiLincClassroomListGUI.php.
References $command, getCommands(), 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)
{
$this->insertDeleteCommand();
}
}
}
Here is the call graph for this function:
Here is the caller graph for this function:
1.7.1