20 $this->
setId(
"ltioconsumer");
22 parent::__construct($a_parent_obj, $a_parent_cmd);
26 $this->
setTitle($lng->txt(
"lti_object_consumer"));
28 $this->
addColumn($lng->txt(
"active"),
"active");
29 $this->
addColumn($lng->txt(
"title"),
"title");
30 $this->
addColumn($lng->txt(
"description"),
"description");
31 $this->
addColumn($lng->txt(
"prefix"),
"prefix");
32 $this->
addColumn($lng->txt(
"in_use"),
"language");
33 $this->
addColumn($lng->txt(
"objects"),
"objects");
34 $this->
addColumn($lng->txt(
"role"),
"role");
35 $this->
addColumn($lng->txt(
"actions"),
"");
38 $this->
setRowTemplate(
"tpl.lti_consumer_list_row.html",
"Services/LTI");
51 $this->editable = $a_status;
69 $consumer_data = $dataConnector->getGlobalToolConsumerSettings();
71 foreach ($consumer_data as $cons) {
73 "id" => $cons->getExtConsumerId(),
74 "title" => $cons->getTitle(),
75 "description" => $cons->getDescription(),
76 "prefix" => $cons->getPrefix(),
77 "language" => $cons->getLanguage(),
78 "role" => $cons->getRole(),
79 "active" => $cons->getActive()
95 $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
96 $this->tpl->setVariable(
"TXT_DESCRIPTION", $a_set[
"description"]);
97 $this->tpl->setVariable(
"TXT_PREFIX", $a_set[
"prefix"]);
98 $this->tpl->setVariable(
"TXT_KEY", $a_set[
"key"]);
99 $this->tpl->setVariable(
"TXT_SECRET", $a_set[
"secret"]);
100 $this->tpl->setVariable(
"TXT_LANGUAGE", $a_set[
"language"]);
101 $obj_types = $this->parent_obj->object->getActiveObjectTypes($a_set[
"id"]);
103 foreach ($obj_types as $obj_type) {
104 $this->tpl->setCurrentBlock(
"objects");
105 $this->tpl->setVariable(
"OBJECTS",
$GLOBALS[
'DIC']->language()->txt(
'objs_' . $obj_type));
106 $this->tpl->parseCurrentBlock();
109 $this->tpl->setVariable(
"NO_OBJECTS",
"-");
114 $this->tpl->setVariable(
'TXT_ROLE', $role->getTitle());
116 $this->tpl->setVariable(
'TXT_ROLE',
'');
119 if ($a_set[
"active"]) {
120 $this->tpl->setVariable(
"TXT_ACTIVE", $lng->txt(
'active'));
121 $label_status = $lng->txt(
"deactivate");
123 $this->tpl->setVariable(
"TXT_ACTIVE", $lng->txt(
'inactive'));
124 $label_status = $lng->txt(
"activate");
129 $list->setId($a_set[
"id"]);
130 $list->setListTitle($lng->txt(
"actions"));
132 $edit_url = $ilCtrl->getLinkTarget($this->
getParentObject(),
"editConsumer");
133 $delete_url = $ilCtrl->getLinkTarget($this->
getParentObject(),
"deleteLTIConsumer");
134 $status_url = $ilCtrl->getLinkTarget($this->
getParentObject(),
"changeStatusLTIConsumer");
135 $list->addItem($lng->txt(
"edit"),
"", $edit_url);
136 $list->addItem($lng->txt(
"delete"),
"", $delete_url);
137 $list->addItem($label_status,
"", $status_url);
139 $this->tpl->setVariable(
"ACTION",
$list->getHTML());
if(isset($_REQUEST['delete'])) $list
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
Class to represent an LTI Data Connector for ILIAS.
fillRow($a_set)
Fill a single data row.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setEditable($a_status)
Set editable.
getParentObject()
Get parent object.
__construct($a_parent_obj, $a_parent_cmd)
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
TableGUI class for LTI consumer listing.
getItems()
Get consumer data.
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.
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.
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.
isEditable()
Check if write permission given.
setLimit($a_limit=0, $a_default_limit=0)