ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjLTIAdministrationGUI Class Reference

Class ilObjLTIAdministrationGUI. More...

+ Inheritance diagram for ilObjLTIAdministrationGUI:
+ Collaboration diagram for ilObjLTIAdministrationGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 
 executeCommand ()
 execute command More...
 
 getType ()
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Protected Member Functions

 initSettingsForm (ilPropertyFormGUI $form=null)
 
 getSettingsForm ()
 
 initConsumerForm (ilPropertyFormGUI $form=null)
 
 getConsumerForm ($a_mode='')
 
 editConsumer (ilPropertyFormGUI $a_form=null)
 Edit consumer @global type $ilCtrl @global type $tpl. More...
 
 createLTIConsumer ()
 Create new lti consumer. More...
 
 updateLTIConsumer ()
 Update lti consumer settings @global ilCtrl $ilCtrl. More...
 
 deleteLTIConsumer ()
 Delete consumers @global type $ilCtrl. More...
 
 listConsumers ()
 List consumers @global type $ilAccess @global type $ilToolbar. More...
 
 changeStatusLTIConsumer ()
 Change activation status @global type $ilCtrl. More...
 
 releasedObjects ()
 Show relases objects. More...
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Private Attributes

 $dataConnector = null
 Data connector object or string. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjLTIAdministrationGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Definition at line 28 of file class.ilObjLTIAdministrationGUI.php.

29 {
30 $this->type = "ltis";
31 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
32 $this->dataConnector = new ilLTIDataConnector();
33
34 $GLOBALS['DIC']->language()->loadLanguageModule('lti');
35 }
Class to represent an LTI Data Connector for ILIAS.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

References $GLOBALS.

Member Function Documentation

◆ changeStatusLTIConsumer()

ilObjLTIAdministrationGUI::changeStatusLTIConsumer ( )
protected

Change activation status @global type $ilCtrl.

Definition at line 405 of file class.ilObjLTIAdministrationGUI.php.

406 {
407 global $ilCtrl;
408
409 $consumer_id = $_REQUEST["cid"];
410
411 if (!$consumer_id) {
412 $ilCtrl->redirect($this, "listConsumers");
413 }
414
415 $consumer = ilLTIToolConsumer::fromExternalConsumerId($consumer_id, $this->dataConnector);
416 if ($consumer->getActive()) {
417 $consumer->setActive(0);
418 $msg = "lti_consumer_set_inactive";
419 } else {
420 $consumer->setActive(1);
421 $msg = "lti_consumer_set_active";
422 }
423 $consumer->saveGlobalToolConsumerSettings($this->dataConnector);
424 ilUtil::sendSuccess($this->lng->txt($msg), true);
425
426 $GLOBALS['DIC']->ctrl()->redirect($this, 'listConsumers');
427 }
static fromExternalConsumerId($id, $dataConnector)
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$consumer
Definition: demo.php:30
global $ilCtrl
Definition: ilias.php:18

References $consumer, $GLOBALS, $ilCtrl, ilLTIToolConsumer\fromExternalConsumerId(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ createLTIConsumer()

ilObjLTIAdministrationGUI::createLTIConsumer ( )
protected

Create new lti consumer.

Definition at line 289 of file class.ilObjLTIAdministrationGUI.php.

290 {
291 $this->checkPermission("write");
292
293 $form = $this->getConsumerForm();
294
295 if ($form->checkInput()) {
296 // $consumer = new ilLTIExternalConsumer();
297 // $dataConnector = new ilLTIDataConnector();
298 $consumer = new ilLTIToolConsumer(null, $this->dataConnector);
299 $consumer->setTitle($form->getInput('title'));
300 $consumer->setDescription($form->getInput('description'));
301 $consumer->setPrefix($form->getInput('prefix'));
302 $consumer->setLanguage($form->getInput('language'));
303 $consumer->setActive($form->getInput('active'));
304 $consumer->setRole($form->getInput('role'));
305 $consumer->saveGlobalToolConsumerSettings($this->dataConnector);
306
307 $this->object->saveConsumerObjectTypes(
308 $consumer->getExtConsumerId(),
309 $form->getInput('types')
310 );
311 ilUtil::sendSuccess($this->lng->txt("lti_consumer_created"), true);
312 $GLOBALS['DIC']->ctrl()->redirect($this, 'listConsumers');
313 }
314
315 $form->setValuesByPost();
316 $this->listConsumers();
317 return;
318 }
LTI provider for LTI launch.
listConsumers()
List consumers @global type $ilAccess @global type $ilToolbar.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
if(isset($_POST['submit'])) $form

References $consumer, $form, $GLOBALS, ilObjectGUI\checkPermission(), getConsumerForm(), listConsumers(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ deleteLTIConsumer()

ilObjLTIAdministrationGUI::deleteLTIConsumer ( )
protected

Delete consumers @global type $ilCtrl.

Definition at line 358 of file class.ilObjLTIAdministrationGUI.php.

359 {
360 global $ilCtrl;
361
362 $consumer_id = $_REQUEST['cid'];
363
364 if (!$consumer_id) {
365 $ilCtrl->redirect($this, "listConsumers");
366 }
367 $consumer = ilLTIToolConsumer::fromExternalConsumerId($consumer_id, $this->dataConnector);
368 $consumer->deleteGlobalToolConsumerSettings($this->dataConnector);
369 ilUtil::sendSuccess($this->lng->txt("lti_consumer_deleted"), true);
370 $GLOBALS['DIC']->ctrl()->redirect($this, 'listConsumers');
371 }

References $consumer, $GLOBALS, $ilCtrl, ilLTIToolConsumer\fromExternalConsumerId(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ editConsumer()

ilObjLTIAdministrationGUI::editConsumer ( ilPropertyFormGUI  $a_form = null)
protected

Edit consumer @global type $ilCtrl @global type $tpl.

Parameters
ilPropertyFormGUI$a_form

Definition at line 262 of file class.ilObjLTIAdministrationGUI.php.

263 {
264 global $ilCtrl, $tpl;
265 $consumer_id = $_REQUEST["cid"];
266 $ilCtrl->setParameter($this, "cid", $consumer_id);
267
268 if (!$consumer_id) {
269 $ilCtrl->redirect($this, "listConsumers");
270 }
271
272 $consumer = ilLTIToolConsumer::fromExternalConsumerId($consumer_id, $this->dataConnector);
273 if (!$a_form instanceof ilPropertyFormGUI) {
274 $a_form = $this->getConsumerForm('edit');
275 $a_form->getItemByPostVar("title")->setValue($consumer->getTitle());
276 $a_form->getItemByPostVar("description")->setValue($consumer->getDescription());
277 $a_form->getItemByPostVar("prefix")->setValue($consumer->getPrefix());
278 $a_form->getItemByPostVar("language")->setValue($consumer->getLanguage());
279 $a_form->getItemByPostVar("active")->setChecked($consumer->getActive());
280 $a_form->getItemByPostVar("role")->setValue($consumer->getRole());
281 $a_form->getItemByPostVar("types")->setValue($this->object->getActiveObjectTypes($consumer_id));
282 }
283 $tpl->setContent($a_form->getHTML());
284 }
This class represents a property form user interface.
getItemByPostVar($a_post_var)
Get Item by POST variable.

References $consumer, $ilCtrl, ilObjectGUI\$tpl, ilLTIToolConsumer\fromExternalConsumerId(), and getConsumerForm().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjLTIAdministrationGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 37 of file class.ilObjLTIAdministrationGUI.php.

38 {
39 $next_class = $this->ctrl->getNextClass($this);
40 $cmd = $this->ctrl->getCmd();
41
42 $this->prepareOutput();
43
44 switch ($next_class) {
45 case 'ilpermissiongui':
46 $GLOBALS['ilTabs']->activateTab('perm_settings');
47 require_once 'Services/AccessControl/classes/class.ilPermissionGUI.php';
48 $perm_gui = new ilPermissionGUI($this);
49 $this->ctrl->forwardCommand($perm_gui);
50 break;
51
52 default:
53 if (!$cmd || $cmd == 'view') {
54 $cmd = 'listConsumers';
55 } elseif ($cmd == 'createconsumer') {
56 $cmd = "initConsumerForm";
57 }
58 $this->$cmd();
59 break;
60 }
61 }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.

References $GLOBALS, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjLTIAdministrationGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 68 of file class.ilObjLTIAdministrationGUI.php.

69 {
70 global $rbacsystem;
71
72 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
73 // currently no general settings.
74 // $this->tabs_gui->addTab("settings",
75 // $this->lng->txt("settings"),
76 // $this->ctrl->getLinkTarget($this, "initSettingsForm"));
77
78 $this->tabs_gui->addTab(
79 "consumers",
80 $this->lng->txt("consumers"),
81 $this->ctrl->getLinkTarget($this, "listConsumers")
82 );
83 }
84 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
85 $this->tabs_gui->addTab(
86 "releasedObjects",
87 $this->lng->txt("lti_released_objects"),
88 $this->ctrl->getLinkTarget($this, "releasedObjects")
89 );
90 }
91
92 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
93 $this->tabs_gui->addTab(
94 "perm_settings",
95 $this->lng->txt("perm_settings"),
96 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
97 );
98 }
99 }

References ilObjectGUI\$rbacsystem.

◆ getConsumerForm()

ilObjLTIAdministrationGUI::getConsumerForm (   $a_mode = '')
protected
Parameters
string$a_mode
Returns
ilPropertyFormGUI

Definition at line 186 of file class.ilObjLTIAdministrationGUI.php.

187 {
188 $this->tabs_gui->activateTab("consumers");
189
190 require_once("Services/Form/classes/class.ilPropertyFormGUI.php");
191
192 $form = new ilPropertyFormGUI();
193
194 $ti_title = new ilTextInputGUI($this->lng->txt("title"), 'title');
195 $ti_title->setRequired(true);
196 $ti_description = new ilTextInputGUI($this->lng->txt("description"), 'description');
197 $ti_prefix = new ilTextInputGUI($this->lng->txt("prefix"), 'prefix');
198 $ti_prefix->setRequired(true);
199 #$ti_key = new ilTextInputGUI($this->lng->txt("lti_consumer_key"), 'key');
200 #$ti_key->setRequired(true);
201 #$ti_secret = new ilTextInputGUI($this->lng->txt("lti_consumer_secret"), 'secret');
202 #$ti_secret->setRequired(true);
203
204 $languages = $this->lng->getInstalledLanguages();
205 $array_lang = array();
206 foreach ($languages as $lang_key) {
207 $array_lang[$lang_key] = ilLanguage::_lookupEntry($lang_key, "meta", "meta_l_" . $lang_key);
208 }
209
210 $si_language = new ilSelectInputGUI($this->lng->txt("language"), "language");
211 $si_language->setOptions($array_lang);
212
213 $cb_active = new ilCheckboxInputGUI($this->lng->txt('active'), 'active');
214
215 $form->addItem($cb_active);
216 $form->addItem($ti_title);
217 $form->addItem($ti_description);
218 $form->addItem($ti_prefix);
219 #$form->addItem($ti_key);
220 #$form->addItem($ti_secret);
221 $form->addItem($si_language);
222
223 // object types
224 $cb_obj_types = new ilCheckboxGroupInputGUI($this->lng->txt("act_lti_for_obj_type"), 'types');
225
226 $valid_obj_types = $this->object->getLTIObjectTypes();
227 foreach ($valid_obj_types as $obj_type) {
228 $object_name = $GLOBALS['DIC']->language()->txt('objs_' . $obj_type);
229 $cb_obj_types->addOption(new ilCheckboxOption($object_name, $obj_type));
230 }
231 $form->addItem($cb_obj_types);
232
233 // test roles
234 $roles = $this->object->getLTIRoles();
235 foreach ($roles as $role_id => $role_name) {
236 $options[$role_id] = $role_name;
237 }
238 $si_roles = new ilSelectInputGUI($this->lng->txt("gbl_roles_to_users"), 'role');
239 $si_roles->setOptions($options);
240 $form->addItem($si_roles);
241
242 if ($a_mode == 'edit') {
243 $form->setFormAction($this->ctrl->getFormAction($this, 'editLTIConsumer'));
244 $form->setTitle($this->lng->txt("lti_edit_consumer"));
245 $form->addCommandButton("updateLTIConsumer", $this->lng->txt("save"));
246 } else {
247 $form->setFormAction($this->ctrl->getFormAction($this, 'createLTIConsumer'));
248 $form->setTitle($this->lng->txt("lti_create_consumer"));
249 $form->addCommandButton("createLTIConsumer", $this->lng->txt("save"));
250 $form->addCommandButton('listConsumers', $this->lng->txt('cancel'));
251 }
252
253 return $form;
254 }
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
This class represents a property in a property form.
This class represents a checkbox property in a property form.
This class represents an option in a checkbox group.
static _lookupEntry($a_lang_key, $a_mod, $a_id)
This class represents a selection list property in a property form.
This class represents a text property in a property form.

References $form, $GLOBALS, $options, and ilLanguage\_lookupEntry().

Referenced by createLTIConsumer(), editConsumer(), initConsumerForm(), and updateLTIConsumer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSettingsForm()

ilObjLTIAdministrationGUI::getSettingsForm ( )
protected

Definition at line 111 of file class.ilObjLTIAdministrationGUI.php.

112 {
113 require_once("Services/Form/classes/class.ilPropertyFormGUI.php");
114
115 $form = new ilPropertyFormGUI();
116 /*
117 $form->setFormAction($this->ctrl->getFormAction($this,'saveSettingsForm'));
118 $form->setTitle($this->lng->txt("lti_settings"));
119
120 // object types
121 $cb_obj_types = new ilCheckboxGroupInputGUI($this->lng->txt("act_lti_for_obj_type"), 'types');
122
123 $valid_obj_types = $this->object->getLTIObjectTypes();
124 foreach($valid_obj_types as $obj_type_id => $obj_name)
125 {
126 $cb_obj_types->addOption(new ilCheckboxOption($obj_name, $obj_type_id));
127 }
128 $objs_active = $this->object->getActiveObjectTypes();
129 $cb_obj_types->setValue($objs_active);
130 $form->addItem($cb_obj_types);
131
132 // test roles
133 $roles = $this->object->getLTIRoles();
134 foreach($roles as $role_id => $role_name)
135 {
136 $options[$role_id] = $role_name;
137 }
138 $si_roles = new ilSelectInputGUI($this->lng->txt("gbl_roles_to_users"), 'roles');
139 $si_roles->setOptions($options);
140 $si_roles->setValue($this->object->getCurrentRole());
141 $form->addItem($si_roles);
142
143 $form->addCommandButton("saveSettingsForm", $this->lng->txt("save"));
144 */
145 return $form;
146 }

References $form.

Referenced by initSettingsForm().

+ Here is the caller graph for this function:

◆ getType()

ilObjLTIAdministrationGUI::getType ( )

Definition at line 63 of file class.ilObjLTIAdministrationGUI.php.

64 {
65 return "ltis";
66 }

◆ initConsumerForm()

ilObjLTIAdministrationGUI::initConsumerForm ( ilPropertyFormGUI  $form = null)
protected

Definition at line 174 of file class.ilObjLTIAdministrationGUI.php.

175 {
176 if (!($form instanceof ilPropertyFormGUI)) {
177 $form = $this->getConsumerForm();
178 }
179 $this->tpl->setContent($form->getHTML());
180 }

References $form, and getConsumerForm().

+ Here is the call graph for this function:

◆ initSettingsForm()

ilObjLTIAdministrationGUI::initSettingsForm ( ilPropertyFormGUI  $form = null)
protected

Definition at line 101 of file class.ilObjLTIAdministrationGUI.php.

102 {
103 if (!($form instanceof ilPropertyFormGUI)) {
104 $form = $this->getSettingsForm();
105 }
106 $this->tabs_gui->activateTab("settings");
107 $this->tpl->setContent($form->getHTML());
108 }

References $form, and getSettingsForm().

+ Here is the call graph for this function:

◆ listConsumers()

ilObjLTIAdministrationGUI::listConsumers ( )
protected

List consumers @global type $ilAccess @global type $ilToolbar.

Definition at line 379 of file class.ilObjLTIAdministrationGUI.php.

380 {
381 global $ilAccess, $ilToolbar;
382
383 if ($this->checkPermissionBool('write')) {
384 $ilToolbar->addButton(
385 $this->lng->txt('lti_create_consumer'),
386 $this->ctrl->getLinkTarget($this, 'createconsumer')
387 );
388 }
389
390 $this->tabs_gui->activateTab("consumers");
391
392 include_once "Services/LTI/classes/Consumer/class.ilLTIConsumerTableGUI.php";
394 $this,
395 "listConsumers"
396 );
397 $tbl->setEditable($this->checkPermissionBool('write'));
398 $this->tpl->setContent($tbl->getHTML());
399 }
TableGUI class for LTI consumer listing.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
$tbl
Definition: example_048.php:81

References $tbl, and ilObjectGUI\checkPermissionBool().

Referenced by createLTIConsumer(), and updateLTIConsumer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ releasedObjects()

ilObjLTIAdministrationGUI::releasedObjects ( )
protected

Show relases objects.

Definition at line 432 of file class.ilObjLTIAdministrationGUI.php.

433 {
434 $GLOBALS['DIC']->tabs()->activateTab('releasedObjects');
435
436 $table = new ilLTIProviderReleasedObjectsTableGUI($this, 'releasedObjects', 'ltireleases');
437 $table->init();
438 $table->parse();
439
440 $GLOBALS['DIC']->ui()->mainTemplate()->setContent($table->getHTML());
441 }
if(empty($password)) $table
Definition: pwgen.php:24

References $GLOBALS, and $table.

◆ updateLTIConsumer()

ilObjLTIAdministrationGUI::updateLTIConsumer ( )
protected

Update lti consumer settings @global ilCtrl $ilCtrl.

Definition at line 324 of file class.ilObjLTIAdministrationGUI.php.

325 {
326 global $ilCtrl;
327
328 $this->checkPermission("write");
329
330 $consumer_id = $_REQUEST["cid"];
331 if (!$consumer_id) {
332 $ilCtrl->redirect($this, "listConsumers");
333 }
334
335 $ilCtrl->setParameter($this, "cid", $consumer_id);
336
337 $consumer = ilLTIToolConsumer::fromExternalConsumerId($consumer_id, $this->dataConnector);
338 $form = $this->getConsumerForm('edit');
339 if ($form->checkInput()) {
340 $consumer->setTitle($form->getInput('title'));
341 $consumer->setDescription($form->getInput('description'));
342 $consumer->setPrefix($form->getInput('prefix'));
343 $consumer->setLanguage($form->getInput('language'));
344 $consumer->setActive($form->getInput('active'));
345 $consumer->setRole($form->getInput('role'));
346 $consumer->saveGlobalToolConsumerSettings($this->dataConnector);
347 $this->object->saveConsumerObjectTypes($consumer_id, $form->getInput('types'));
348
349 ilUtil::sendSuccess($this->lng->txt("lti_consumer_updated"), true);
350 }
351 $this->listConsumers();
352 }

References $consumer, $form, $ilCtrl, ilObjectGUI\checkPermission(), ilLTIToolConsumer\fromExternalConsumerId(), getConsumerForm(), listConsumers(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

Field Documentation

◆ $dataConnector

mixed ilObjLTIAdministrationGUI::$dataConnector = null
private

Data connector object or string.

Definition at line 26 of file class.ilObjLTIAdministrationGUI.php.


The documentation for this class was generated from the following file: