4 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
28 $rbacsystem = $DIC[
'rbacsystem'];
32 $this->parent_obj = $a_parent_obj;
34 $this->
setId(
"usrrolesp");
36 parent::__construct($a_parent_obj);
48 $this->
setRowTemplate(
"tpl.user_role_starting_point_row.html",
"Services/User");
66 include_once
"Services/User/classes/class.ilUserUtil.php";
67 require_once
"Services/Object/classes/class.ilObjectDataCache.php";
68 require_once
"Services/AccessControl/classes/class.ilObjRole.php";
69 require_once
"Services/AccessControl/classes/class.ilStartingPoint.php";
79 "criteria" =>
$lng->txt(
"user_chooses_starting_page"),
80 "starting_page" => $status,
81 "starting_position" => self::TABLE_POSITION_USER_CHOOSES
86 foreach ($points as $point) {
87 $starting_point = $point[
'starting_point'];
88 $position = $point[
'position'];
89 $sp_text = $valid_points[$starting_point];
93 $type = $dc->lookupType($object_id);
94 $title = $dc->lookupTitle($object_id);
95 $sp_text = $this->lng->txt(
"obj_" .
$type) .
" <i>\"" .
$title .
"\"</i> [" . $point[
'starting_object'] .
"]";
99 $options = unserialize($point[
'rule_options']);
102 if (!$role_obj || !($role_obj instanceof \
ilObjRole)) {
107 "id" => $point[
'id'],
108 "criteria" => $role_obj->getTitle(),
109 "starting_page" => $sp_text,
110 "starting_position" => (int) $position,
111 "role_id" => $role_obj->getId()
117 $starting_point = $valid_points[$default_sp];
122 $type = $dc->lookupType($object_id);
123 $title = $dc->lookupTitle($object_id);
124 $starting_point = $this->lng->txt(
"obj_" .
$type) .
" " .
"<i>\"" .
$title .
"\" ($reference_id)</i>";
129 "criteria" =>
$lng->txt(
"default"),
130 "starting_page" => $starting_point,
131 "starting_position" => self::TABLE_POSITION_DEFAULT
151 include_once
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
154 $list->setListTitle(
$lng->txt(
"actions"));
159 if ($a_set[
'id'] > 0 && $a_set[
'id'] !=
'default' && $a_set[
'id'] !=
'user') {
164 $list->setId($a_set[
"id"]);
167 $list->addItem(
$lng->txt(
"edit"),
"", $edit_url);
169 $list->addItem(
$lng->txt(
"delete"),
"", $delete_url);
170 $this->tpl->setVariable(
"VAL_ID",
"position[" . $a_set[
'id'] .
"]");
171 $this->tpl->setVariable(
"VAL_POS", $a_set[
"starting_position"]);
173 $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"has_role") .
": " . $a_set[
"criteria"]);
175 if ($a_set[
'id'] ==
"default") {
183 $list->addItem(
$lng->txt(
"edit"),
"", $edit_url);
185 $this->tpl->setVariable(
"HIDDEN",
"hidden");
187 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"criteria"]);
190 $this->tpl->setVariable(
"TXT_PAGE", $a_set[
"starting_page"]);
192 $this->tpl->setVariable(
"ACTION",
$list->getHTML());
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
const TABLE_POSITION_USER_CHOOSES
setExternalSorting($a_val)
Set external sorting.
if(isset($_REQUEST['delete'])) $list
static getStartingPoints()
Get all the starting points in database.
__construct($a_parent_obj)
const TABLE_POSITION_DEFAULT
TableGUI class for LTI consumer listing.
static getStartingPoint()
Get current starting point setting.
getParentObject()
Get parent object.
static hasPersonalStartingPoint()
Can starting point be personalized?
static getPossibleStartingPoints($a_force_all=false)
Get all valid starting points.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static _lookupObjId($a_id)
static getStartingObject()
Get ref id of starting object.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
setRowTemplate($a_template, $a_template_dir="")
Set row template.
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
fillRow($a_set)
Fill a single data row.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
const START_REPOSITORY_OBJ
static getLogger($a_component_id)
Get component logger.
static reArrangePositions($a_items)
setLimit($a_limit=0, $a_default_limit=0)