4 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
28 $this->parent_obj = $a_parent_obj;
30 $this->
setId(
"usrrolesp");
32 parent::__construct($a_parent_obj);
37 $this->
setTitle($lng->txt(
"user_role_starting_point"));
39 $this->
addColumn($lng->txt(
"user_order"));
41 $this->
addColumn($lng->txt(
"starting_page"));
44 $this->
setRowTemplate(
"tpl.user_role_starting_point_row.html",
"Services/User");
60 include_once
"Services/User/classes/class.ilUserUtil.php";
61 require_once
"Services/Object/classes/class.ilObjectDataCache.php";
62 require_once
"Services/AccessControl/classes/class.ilObjRole.php";
63 require_once
"Services/AccessControl/classes/class.ilStartingPoint.php";
73 "criteria" => $lng->txt(
"user_chooses_starting_page"),
74 "starting_page" => $status,
75 "starting_position" => self::TABLE_POSITION_USER_CHOOSES
80 foreach ($points as $point) {
81 $starting_point = $point[
'starting_point'];
82 $position = $point[
'position'];
83 $sp_text = $valid_points[$starting_point];
87 $type = $dc->lookupType($object_id);
88 $title = $dc->lookupTitle($object_id);
89 $sp_text = $this->lng->txt(
"obj_" .
$type) .
" <i>\"" .
$title .
"\"</i> [" . $point[
'starting_object'] .
"]";
93 $options = unserialize($point[
'rule_options']);
99 "criteria" => $role_obj->getTitle(),
100 "starting_page" => $sp_text,
101 "starting_position" => (int) $position,
102 "role_id" => $role_obj->getId()
108 $starting_point = $valid_points[$default_sp];
113 $type = $dc->lookupType($object_id);
114 $title = $dc->lookupTitle($object_id);
115 $starting_point = $this->lng->txt(
"obj_" .
$type) .
" " .
"<i>\"" .
$title .
"\" ($reference_id)</i>";
120 "criteria" => $lng->txt(
"default"),
121 "starting_page" => $starting_point,
122 "starting_position" => self::TABLE_POSITION_DEFAULT
139 include_once
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
142 $list->setListTitle($lng->txt(
"actions"));
147 if ($a_set[
'id'] > 0 && $a_set[
'id'] !=
'default' && $a_set[
'id'] !=
'user') {
149 $ilCtrl->setParameter($this->
getParentObject(),
"rolid", $a_set[
"role_id"]);
152 $list->setId($a_set[
"id"]);
154 $edit_url = $ilCtrl->getLinkTarget($this->
getParentObject(),
"initRoleStartingPointForm");
155 $list->addItem($lng->txt(
"edit"),
"", $edit_url);
156 $delete_url = $ilCtrl->getLinkTarget($this->
getParentObject(),
"confirmDeleteStartingPoint");
157 $list->addItem($lng->txt(
"delete"),
"", $delete_url);
158 $this->tpl->setVariable(
"VAL_ID",
"position[" . $a_set[
'id'] .
"]");
159 $this->tpl->setVariable(
"VAL_POS", $a_set[
"starting_position"]);
161 $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"has_role") .
": " . $a_set[
"criteria"]);
163 if ($a_set[
'id'] ==
"default") {
165 $edit_url = $ilCtrl->getLinkTarget($this->
getParentObject(),
"initRoleStartingPointForm");
168 $edit_url = $ilCtrl->getLinkTarget($this->
getParentObject(),
"initUserStartingPointForm");
171 $list->addItem($lng->txt(
"edit"),
"", $edit_url);
173 $this->tpl->setVariable(
"HIDDEN",
"hidden");
175 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"criteria"]);
178 $this->tpl->setVariable(
"TXT_PAGE", $a_set[
"starting_page"]);
180 $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.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
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)
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options