ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjLTIConsumerGUI Class Reference
+ Inheritance diagram for ilObjLTIConsumerGUI:
+ Collaboration diagram for ilObjLTIConsumerGUI:

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 getType ()
 Functions that must be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initCustomCreateForm ($a_new_type)
 
 saveCustom ()
 
 afterSave (ilObject $newObject)
 Post (successful) object creation hook. More...
 
 initMetadata (ilObjLTIConsumer $object)
 
 executeCommand ()
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. 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...
 
 isVisible ($a_ref_id, $a_type)
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. 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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto ($a_target)
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $a_obj, $a_callback_ref_id)
 After creation callback. More...
 
- 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

const CFORM_CUSTOM_NEW = 99
 
const TAB_ID_INFO = 'tab_info'
 
const TAB_ID_CONTENT = 'tab_content'
 
const TAB_ID_SETTINGS = 'tab_settings'
 
const TAB_ID_STATEMENTS = 'tab_statements'
 
const TAB_ID_SCORING = 'tab_scoring'
 
const TAB_ID_METADATA = 'tab_metadata'
 
const TAB_ID_LEARNING_PROGRESS = 'learning_progress'
 
const TAB_ID_PERMISSIONS = 'perm_settings'
 
const DEFAULT_CMD = 'launch'
 
 $object
 
- Data Fields inherited from ilObject2GUI
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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 Member Functions

 buildProviderSelectionForm ($a_new_type)
 
 applyProviderFilter ()
 
 resetProviderFilter ()
 
 createNewObject ($newType, $title, $description)
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 debug ()
 
 trackObjectReadEvent ()
 
 infoScreen ()
 
 infoScreenForward ()
 
 handleAvailablityMessage ()
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 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...
 
 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...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) 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...
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 showActions ()
 
 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...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 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...
 
 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...
 

Protected Attributes

 $ltiAccess
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

Detailed Description

Definition at line 25 of file class.ilObjLTIConsumerGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjLTIConsumerGUI::__construct (   $a_id = 0,
  $a_id_type = self::REPOSITORY_NODE_ID,
  $a_parent_node_id = 0 
)

Constructor.

Parameters
int$a_id
int$a_id_type
int$a_parent_node_id

Reimplemented from ilObject2GUI.

Definition at line 50 of file class.ilObjLTIConsumerGUI.php.

51 {
52 global $DIC; /* @var \ILIAS\DI\Container $DIC */
53
54 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
55
56 if ($this->object instanceof ilObjLTIConsumer) {
57 $this->ltiAccess = new ilLTIConsumerAccess($this->object);
58 }
59
60 $DIC->language()->loadLanguageModule("lti");
61 $DIC->language()->loadLanguageModule("rep");
62 }
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjLTIConsumerGUI::_goto (   $a_target)
static

Definition at line 353 of file class.ilObjLTIConsumerGUI.php.

354 {
355 global $DIC; /* @var \ILIAS\DI\Container $DIC */
356 $err = $DIC['ilErr']; /* @var ilErrorHandling $err */
357 $ctrl = $DIC->ctrl();
358 $request = $DIC->http()->request();
359 $access = $DIC->access();
360 $lng = $DIC->language();
361
362 $targetParameters = explode('_', $a_target);
363 $id = (int) $targetParameters[0];
364
365 if ($id <= 0) {
366 $err->raiseError($lng->txt('msg_no_perm_read'), $err->FATAL);
367 }
368
369 if ($access->checkAccess('read', '', $id)) {
370 $ctrl->setTargetScript('ilias.php');
371 $ctrl->initBaseClass(ilRepositoryGUI::class);
372 $ctrl->setParameterByClass(ilObjLTIConsumerGUI::class, 'ref_id', $id);
373 if (isset($request->getQueryParams()['gotolp'])) {
374 $ctrl->setParameterByClass(ilObjLTIConsumerGUI::class, 'gotolp', 1);
375 }
376 $ctrl->redirectByClass([ilRepositoryGUI::class, ilObjLTIConsumerGUI::class]);
377 } elseif ($access->checkAccess('visible', '', $id)) {
378 ilObjectGUI::_gotoRepositoryNode($id, 'infoScreen');
379 } elseif ($access->checkAccess('read', '', ROOT_FOLDER_ID)) {
381 sprintf(
382 $DIC->language()->txt('msg_no_perm_read_item'),
384 ),
385 true
386 );
387
389 }
390
391 $err->raiseError($DIC->language()->txt("msg_no_perm_read_lm"), $err->FATAL);
392 }
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
const ROOT_FOLDER_ID
Definition: constants.php:30

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $DIC, ilObjectGUI\$lng, ilObjectGUI\$request, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ROOT_FOLDER_ID, and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjLTIConsumerGUI::addLocatorItems ( )

Functions to be overwritten.

Reimplemented from ilObject2GUI.

Definition at line 659 of file class.ilObjLTIConsumerGUI.php.

660 {
661 global $DIC; /* @var \ILIAS\DI\Container $DIC */
662
663 $locator = $DIC['ilLocator']; /* @var ilLocatorGUI $locator */
664 $locator->addItem(
665 $this->object->getTitle(),
666 $this->ctrl->getLinkTarget($this, self::DEFAULT_CMD),
667 "",
668 $_GET["ref_id"]
669 );
670 }
$_GET["client_id"]

References $_GET, $DIC, and ilObjectGUI\$locator.

◆ afterSave()

ilObjLTIConsumerGUI::afterSave ( ilObject  $a_new_object)

Post (successful) object creation hook.

Parameters
ilObject$a_new_object

Reimplemented from ilObjectGUI.

Definition at line 246 of file class.ilObjLTIConsumerGUI.php.

247 {
248 /* @var ilObjLTIConsumer $newObject */
249 global $DIC; /* @var \ILIAS\DI\Container $DIC */
250
251 if (isset($_GET['provider_id']) && (int) $_GET['provider_id']) {
252 $newObject->setProviderId((int) $_GET['provider_id']);
253 $newObject->initProvider();
254 $newObject->save();
255
256 $newObject->setTitle($newObject->getProvider()->getTitle());
257 $newObject->setMasteryScore($newObject->getProvider()->getMasteryScore());
258 $newObject->update();
259
260 $this->initMetadata($newObject);
261
262 $DIC->ctrl()->redirectByClass(ilLTIConsumerSettingsGUI::class);
263 }
264
266 throw new ilLtiConsumerException('permission denied!');
267 }
268
269 $form = $this->initCustomCreateForm($newObject->getType());
270
271 if ($form->checkInput()) {
272 $provider = new ilLTIConsumeProvider();
273 $form->initProvider($provider);
274 $provider->setAvailability(ilLTIConsumeProvider::AVAILABILITY_CREATE);
275 $provider->setIsGlobal(false);
276 $provider->setCreator($DIC->user()->getId());
277 $provider->save();
278
279 $newObject->setProviderId($provider->getId());
280 $newObject->setProvider($provider);
281 $newObject->save();
282
283 $newObject->setTitle($provider->getTitle());
284 $newObject->setMasteryScore($newObject->getProvider()->getMasteryScore());
285 $newObject->update();
286
287 $this->initMetadata($newObject);
288
289 $DIC->ctrl()->redirectByClass(ilObjLTIConsumerGUI::class);
290 }
291
292 throw new ilLtiConsumerException(
293 'form validation seems to not have worked in ilObjLTIConsumer::saveCustom()!'
294 );
295 }
initMetadata(ilObjLTIConsumer $object)

References $_GET, $DIC, ilLTIConsumeProvider\AVAILABILITY_CREATE, ilObject\getTitle(), ilObject\getType(), ilLTIConsumerAccess\hasCustomProviderCreationAccess(), initCustomCreateForm(), initMetadata(), ilObject\setTitle(), and ilObject\update().

Referenced by saveCustom().

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

◆ applyProviderFilter()

ilObjLTIConsumerGUI::applyProviderFilter ( )
protected

Definition at line 173 of file class.ilObjLTIConsumerGUI.php.

174 {
175 $form = $this->buildProviderSelectionForm('');
176 $form->applyFilter();
177 $this->createObject();
178 }
createObject()
create new object form

References buildProviderSelectionForm(), and ilObjectGUI\createObject().

+ Here is the call graph for this function:

◆ buildProviderSelectionForm()

ilObjLTIConsumerGUI::buildProviderSelectionForm (   $a_new_type)
protected

Definition at line 162 of file class.ilObjLTIConsumerGUI.php.

163 {
165 $a_new_type,
166 $this,
167 'create',
168 'applyProviderFilter',
169 'resetProviderFilter'
170 );
171 }

Referenced by applyProviderFilter(), initCreateForm(), and resetProviderFilter().

+ Here is the caller graph for this function:

◆ createNewObject()

ilObjLTIConsumerGUI::createNewObject (   $newType,
  $title,
  $description 
)
protected

Definition at line 187 of file class.ilObjLTIConsumerGUI.php.

188 {
189 $classname = "ilObj" . $this->objDefinition->getClassName($newType);
190
191 $newObj = new $classname();
192 $newObj->setType($newType);
193 $newObj->setTitle($title);
194 $newObj->setDescription($description);
195 $newObj->create();
196
197 $this->putObjectInTree($newObj);
198
199 return $newObj;
200 }
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.

References ilObject2GUI\putObjectInTree().

Referenced by saveCustom().

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

◆ debug()

ilObjLTIConsumerGUI::debug ( )
protected

Definition at line 613 of file class.ilObjLTIConsumerGUI.php.

614 {
615 global $DIC; /* @var \ILIAS\DI\Container $DIC */
616
617 $DIC->tabs()->activateTab('debug');
618
619 $filter = new ilCmiXapiStatementsReportFilter();
620 $filter->setActivityId($this->object->getActivityId());
621
622 $aggregateEndPointUrl = str_replace(
623 'data/xAPI',
624 'api/statements/aggregate',
625 $this->object->getProvider()->getXapiLaunchUrl() // should be named endpoint not launch url
626 );
627
628 $linkBuilder = new ilCmiXapiHighscoreReportLinkBuilder(
629 $this->object,
630 $aggregateEndPointUrl,
631 $filter
632 );
633
635 $this->object->getProvider()->getXapiLaunchKey(),
636 $this->object->getProvider()->getXapiLaunchSecret()
637 );
638
640 $basicAuth,
641 $linkBuilder
642 );
643
644 try {
645 $report = $request->queryReport($this->object);
646
647 $DIC->ui()->mainTemplate()->setContent(
648 $report->getResponseDebug()
649 );
650
651 //ilUtil::sendSuccess('Object ID: '.$this->object->getId());
652 ilUtil::sendInfo($linkBuilder->getPipelineDebug());
653 ilUtil::sendQuestion('<pre>' . print_r($report->getTableData(), 1) . '</pre>');
654 } catch (Exception $e) {
655 ilUtil::sendFailure($e->getMessage());
656 }
657 }
static buildBasicAuth($lrsKey, $lrsSecret)
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

References $DIC, Vendor\Package\$e, ilObjectGUI\$request, ilCmiXapiLrsType\buildBasicAuth(), ilUtil\sendFailure(), ilUtil\sendInfo(), and ilUtil\sendQuestion().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjLTIConsumerGUI::executeCommand ( )
Exceptions
ilCtrlException

Reimplemented from ilObject2GUI.

Definition at line 397 of file class.ilObjLTIConsumerGUI.php.

398 {
399 global $DIC; /* @var \ILIAS\DI\Container $DIC */
400
401 // TODO: general access checks (!)
402
404 $this->prepareOutput();
405 $this->addHeaderAction();
406 }
407
408 if (!$this->creation_mode) {
409 $this->trackObjectReadEvent();
410
411 if ($this->object->getProvider()->hasProviderIcon()) {
412 $DIC->ui()->mainTemplate()->setTitleIcon(
413 $this->object->getProvider()->getProviderIcon()->getAbsoluteFilePath(),
414 'Icon ' . $this->object->getProvider()->getTitle()
415 );
416 }
417
418 $link = ilLink::_getLink($this->object->getRefId(), $this->object->getType());
419 $navigationHistory = $DIC['ilNavigationHistory']; /* @var ilNavigationHistory $navigationHistory */
420 $navigationHistory->addItem($this->object->getRefId(), $link, $this->object->getType());
421 }
422
423 switch ($DIC->ctrl()->getNextClass()) {
424 case strtolower(ilObjectCopyGUI::class):
425
426 $gui = new ilObjectCopyGUI($this);
427 $gui->setType($this->getType());
428 $DIC->ctrl()->forwardCommand($gui);
429 break;
430
431 case strtolower(ilCommonActionDispatcherGUI::class):
432
433 $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
434 $DIC->ctrl()->forwardCommand($gui);
435 break;
436
437 case strtolower(ilLearningProgressGUI::class):
438
439 $DIC->tabs()->activateTab(self::TAB_ID_LEARNING_PROGRESS);
440
441 $gui = new ilLearningProgressGUI(
443 $this->object->getRefId()
444 );
445
446 $DIC->ctrl()->forwardCommand($gui);
447
448 break;
449
450 case strtolower(ilObjectMetaDataGUI::class):
451
452 if (!$DIC->access()->checkAccess('write', '', $this->object->getRefId())) {
453 $DIC['ilErr']->raiseError($DIC->language()->txt("msg_no_perm_write"));
454 } else {
455 $DIC->tabs()->activateTab(self::TAB_ID_METADATA);
456
457 $gui = new ilObjectMetaDataGUI($this->object);
458 $DIC->ctrl()->forwardCommand($gui);
459 }
460 break;
461
462 case strtolower(ilPermissionGUI::class):
463
464 $DIC->tabs()->activateTab(self::TAB_ID_PERMISSIONS);
465
466 $gui = new ilPermissionGUI($this);
467 $DIC->ctrl()->forwardCommand($gui);
468 break;
469
470 case strtolower(ilLTIConsumerSettingsGUI::class):
471
472 if (!$DIC->access()->checkAccess('write', '', $this->object->getRefId())) {
473 $DIC['ilErr']->raiseError($DIC->language()->txt("msg_no_perm_write"));
474 } else {
475 $DIC->tabs()->activateTab(self::TAB_ID_SETTINGS);
476
477 $gui = new ilLTIConsumerSettingsGUI($this->object, $this->ltiAccess);
478 $DIC->ctrl()->forwardCommand($gui);
479 }
480 break;
481
482 case strtolower(ilLTIConsumerXapiStatementsGUI::class):
483
484 $DIC->tabs()->activateTab(self::TAB_ID_STATEMENTS);
485
486 $gui = new ilLTIConsumerXapiStatementsGUI($this->object);
487 $DIC->ctrl()->forwardCommand($gui);
488
489 break;
490
491 case strtolower(ilLTIConsumerScoringGUI::class):
492
493 $DIC->tabs()->activateTab(self::TAB_ID_SCORING);
494
495 $gui = new ilLTIConsumerScoringGUI($this->object);
496 $DIC->ctrl()->forwardCommand($gui);
497
498 break;
499
500 case strtolower(ilLTIConsumerContentGUI::class):
501
502 if (!$DIC->access()->checkAccess('read', '', $this->object->getRefId())) {
503 $DIC['ilErr']->raiseError($DIC->language()->txt("msg_no_perm_read"));
504 } else {
505 $DIC->tabs()->activateTab(self::TAB_ID_CONTENT);
506
507 $gui = new ilLTIConsumerContentGUI($this->object);
508 $DIC->ctrl()->forwardCommand($gui);
509 }
510
511 break;
512
513 case strtolower(ilInfoScreenGUI::class):
514
515 $DIC->tabs()->activateTab(self::TAB_ID_INFO);
516 $this->infoScreen();
517
518 break;
519
520 default:
521 $command = $DIC->ctrl()->getCmd(self::DEFAULT_CMD);
522 $this->{$command}();
523 }
524 }
Class ilCommonActionDispatcherGUI.
Class ilObjUserTrackingGUI.
getType()
Functions that must be overwritten.
prepareOutput($a_show_subobjects=true)
prepare output
GUI class for the workflow of copying objects.
setType($type)
Sets $type.
addHeaderAction()
Add header action menu.
Class ilObjectMetaDataGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12

References $DIC, ilLink\_getLink(), ilObjectGUI\addHeaderAction(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getType(), infoScreen(), ilLTIConsumerContentGUI\isEmbeddedLaunchRequest(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilObject2GUI\prepareOutput(), and trackObjectReadEvent().

+ Here is the call graph for this function:

◆ getType()

ilObjLTIConsumerGUI::getType ( )

Functions that must be overwritten.

Reimplemented from ilObject2GUI.

Definition at line 64 of file class.ilObjLTIConsumerGUI.php.

65 {
66 return 'lti';
67 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ handleAvailablityMessage()

ilObjLTIConsumerGUI::handleAvailablityMessage ( )
protected

Definition at line 791 of file class.ilObjLTIConsumerGUI.php.

792 {
793 global $DIC; /* @var \ILIAS\DI\Container $DIC */
794 if ($this->object->getProvider()->getProviderUrl() == '') {
795 ilUtil::sendFailure($DIC->language()->txt('lti_provider_not_set_msg'));
796 } elseif ($this->object->getProvider()->getAvailability() == ilLTIConsumeProvider::AVAILABILITY_NONE) {
797 ilUtil::sendFailure($DIC->language()->txt('lti_provider_not_avail_msg'));
798 }
799 }

References $DIC, ilLTIConsumeProvider\AVAILABILITY_NONE, and ilUtil\sendFailure().

Referenced by infoScreenForward().

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

◆ infoScreen()

ilObjLTIConsumerGUI::infoScreen ( )
protected

Definition at line 695 of file class.ilObjLTIConsumerGUI.php.

696 {
697 global $DIC; /* @var \ILIAS\DI\Container $DIC */
698
699 $DIC->tabs()->activateTab(self::TAB_ID_INFO);
700
701 $DIC->ctrl()->setCmd("showSummary");
702 $DIC->ctrl()->setCmdClass("ilinfoscreengui");
703 $this->infoScreenForward();
704 }

References $DIC, and infoScreenForward().

Referenced by executeCommand().

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

◆ infoScreenForward()

ilObjLTIConsumerGUI::infoScreenForward ( )
protected

Definition at line 706 of file class.ilObjLTIConsumerGUI.php.

707 {
708 global $DIC; /* @var \ILIAS\DI\Container $DIC */
709 $ilErr = $DIC['ilErr']; /* @var ilErrorHandling $ilErr */
710
711 if (!$this->checkPermissionBool("visible") && !$this->checkPermissionBool("read")) {
712 $ilErr->raiseError($DIC->language()->txt("msg_no_perm_read"));
713 }
714
716
717 $info = new ilInfoScreenGUI($this);
718
719 $info->enablePrivateNotes();
720
721 if ($this->checkPermissionBool("read")) {
722 $info->enableNews();
723 }
724
725 $info->enableNewsEditing(false);
726
727 if ($this->checkPermissionBool("write")) {
728 $news_set = new ilSetting("news");
729 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
730
731 if ($enable_internal_rss) {
732 $info->setBlockProperty("news", "settings", true);
733 $info->setBlockProperty("news", "public_notifications_option", true);
734 }
735 }
736
737 // standard meta data
738 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
739
740 if (DEVMODE) {
741 // Development Info
742 $info->addSection('DEVMODE Info');
743 $info->addProperty('Local Object ID', $this->object->getId());
744 $info->addProperty('Current User ID', $DIC->user()->getId());
745 }
746
747 require_once('Services/Tracking/classes/class.ilLPObjSettings.php');
748 if ($this->object->getProvider()->getHasOutcome() && ilLPObjSettings::_lookupDBMode($this->object->getId()) != 0) {
749 $info->addSection($DIC->language()->txt("lti_info_learning_progress_section"));
750 $info->addProperty(
751 $DIC->language()->txt("mastery_score"),
752 ($this->object->getMasteryScorePercent()) . ' %'
753 );
754 }
755
756 // LTI Ressource Info about privacy
757 $info->addSection($DIC->language()->txt("lti_info_privacy_section"));
758
759 $info->addProperty(
760 $DIC->language()->txt("lti_con_prov_url"),
761 $this->object->getProvider()->getProviderUrl()
762 );
763
764 $info->addProperty(
765 $DIC->language()->txt("conf_privacy_name"),
766 $DIC->language()->txt('conf_privacy_name_' . ilObjCmiXapiGUI::getPrivacyNameString($this->object->getProvider()->getPrivacyName()))
767 );
768
769 $info->addProperty(
770 $DIC->language()->txt("conf_privacy_ident"),
771 $DIC->language()->txt('conf_privacy_ident_' . ilObjCmiXapiGUI::getPrivacyIdentString($this->object->getProvider()->getPrivacyIdent()))
772 );
773 if ($this->object->getProvider()->isExternalProvider()) {
774 $info->addProperty(
775 $DIC->language()->txt("lti_info_external_provider_label"),
776 $DIC->language()->txt('lti_info_external_provider_info')
777 );
778 }
779
780 if ($this->object->getProvider()->getUseXapi()) {
781 $info->addProperty(
782 $DIC->language()->txt("lti_con_prov_xapi_launch_url"),
783 $this->object->getProvider()->getXapiLaunchUrl()
784 );
785 }
786
787 // FINISHED INFO SCREEN, NOW FORWARD
788 $this->ctrl->forwardCommand($info);
789 }
Class ilInfoScreenGUI.
static _lookupDBMode($a_obj_id)
static getPrivacyNameString(int $ident)
static getPrivacyIdentString(int $ident)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
ILIAS Setting Class.

References $DIC, ilObjectGUI\$ilErr, ilLPObjSettings\_lookupDBMode(), ilObject2GUI\checkPermissionBool(), ilObjCmiXapiGUI\getPrivacyIdentString(), ilObjCmiXapiGUI\getPrivacyNameString(), and handleAvailablityMessage().

Referenced by infoScreen().

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

◆ initCreateForm()

ilObjLTIConsumerGUI::initCreateForm (   $a_new_type)

Init object creation form.

Parameters
string$a_new_type
Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

Definition at line 87 of file class.ilObjLTIConsumerGUI.php.

88 {
89 global $DIC; /* @var \ILIAS\DI\Container $DIC */
90
91 $form = $this->buildProviderSelectionForm($a_new_type);
92
93 $globalProviderList = new ilLTIConsumeProviderList();
94 $globalProviderList->setAvailabilityFilter(ilLTIConsumeProvider::AVAILABILITY_CREATE);
95 $globalProviderList->setScopeFilter(ilLTIConsumeProviderList::SCOPE_GLOBAL);
96
97 $userProviderList = new ilLTIConsumeProviderList();
98 $userProviderList->setAvailabilityFilter(ilLTIConsumeProvider::AVAILABILITY_CREATE);
99 $userProviderList->setScopeFilter(ilLTIConsumeProviderList::SCOPE_USER);
100 $userProviderList->setCreatorFilter($DIC->user()->getId());
101
102 if ($form->getFilter('title')) {
103 $globalProviderList->setTitleFilter($form->getFilter('title'));
104 $userProviderList->setTitleFilter($form->getFilter('title'));
105 }
106
107 if ($form->getFilter('category')) {
108 $globalProviderList->setCategoryFilter($form->getFilter('category'));
109 $userProviderList->setCategoryFilter($form->getFilter('category'));
110 }
111
112 if ($form->getFilter('keyword')) {
113 $globalProviderList->setKeywordFilter($form->getFilter('keyword'));
114 $userProviderList->setKeywordFilter($form->getFilter('keyword'));
115 }
116
117 if ($form->getFilter('outcome')) {
118 $globalProviderList->setHasOutcomeFilter(true);
119 $userProviderList->setHasOutcomeFilter(true);
120 }
121
122 if ($form->getFilter('internal')) {
123 $globalProviderList->setIsExternalFilter(false);
124 $userProviderList->setIsExternalFilter(false);
125 }
126
127 if ($form->getFilter('with_key')) {
128 $globalProviderList->setIsProviderKeyCustomizableFilter(false);
129 $userProviderList->setIsProviderKeyCustomizableFilter(false);
130 }
131
132 $globalProviderList->load();
133 $userProviderList->load();
134
135 $form->setData(array_merge(
136 $globalProviderList->getTableData(),
137 $userProviderList->getTableData()
138 ));
139
140 return $form;
141 }

References $DIC, ilLTIConsumeProvider\AVAILABILITY_CREATE, buildProviderSelectionForm(), ilLTIConsumeProviderList\SCOPE_GLOBAL, and ilLTIConsumeProviderList\SCOPE_USER.

Referenced by initCreationForms().

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

◆ initCreationForms()

ilObjLTIConsumerGUI::initCreationForms (   $a_new_type)

Init creation froms.

this will create the default creation forms: new, import, clone

Parameters
string$a_new_type
Returns
array

Reimplemented from ilObject2GUI.

Definition at line 69 of file class.ilObjLTIConsumerGUI.php.

70 {
71 global $DIC; /* @var \ILIAS\DI\Container $DIC */
72
73 $forms = array(
74 self::CFORM_NEW => $this->initCreateForm($a_new_type)
75 );
76
78 $forms[self::CFORM_CUSTOM_NEW] = $this->initCustomCreateForm($a_new_type);
79 }
80
81 //$forms[self::CFORM_IMPORT] = $this->initImportForm($a_new_type), // no import yet
82 $forms[self::CFORM_CLONE] = $this->fillCloneTemplate(null, $a_new_type);
83
84 return $forms;
85 }
initCreateForm($a_new_type)
Init object creation form.
fillCloneTemplate($a_tpl_varname, $a_type)
Fill object clone template This method can be called from any object GUI class that wants to offer ob...

References $DIC, ilObjectGUI\CFORM_CLONE, CFORM_CUSTOM_NEW, ilObject2GUI\fillCloneTemplate(), ilLTIConsumerAccess\hasCustomProviderCreationAccess(), initCreateForm(), and initCustomCreateForm().

+ Here is the call graph for this function:

◆ initCustomCreateForm()

ilObjLTIConsumerGUI::initCustomCreateForm (   $a_new_type)

Definition at line 143 of file class.ilObjLTIConsumerGUI.php.

144 {
145 global $DIC; /* @var \ILIAS\DI\Container $DIC */
146
147 $provider = new ilLTIConsumeProvider();
148
149 $form = new ilLTIConsumeProviderFormGUI($provider);
150
151 $form->initForm($this->ctrl->getFormAction($this, "save"), '', '');
152
153 $form->clearCommandButtons();
154 $form->addCommandButton("saveCustom", $this->lng->txt($a_new_type . "_add_own_provider"));
155 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
156
157 $form->setTitle($DIC->language()->txt($a_new_type . '_custom_new'));
158
159 return $form;
160 }

References $DIC.

Referenced by afterSave(), initCreationForms(), and saveCustom().

+ Here is the caller graph for this function:

◆ initHeaderAction()

ilObjLTIConsumerGUI::initHeaderAction (   $a_sub_type = null,
  $a_sub_id = null 
)
protected

Add header action menu.

Parameters
string$a_sub_type
int$a_sub_id
Returns
ilObjectListGUI

Reimplemented from ilObject2GUI.

Definition at line 319 of file class.ilObjLTIConsumerGUI.php.

320 {
321 global $DIC; /* @var \ILIAS\DI\Container $DIC */
322
323 $return = parent::initHeaderAction($a_sub_type, $a_sub_id);
324
325 if ($this->creation_mode) {
326 return $return;
327 }
328
329 $validator = new ilCertificateDownloadValidator();
330 if ($validator->isCertificateDownloadable((int) $DIC->user()->getId(), (int) $this->object->getId())) {
331 $certLink = $DIC->ctrl()->getLinkTargetByClass(
332 [ilObjLTIConsumerGUI::class, ilLTIConsumerSettingsGUI::class],
334 );
335
336 $DIC->language()->loadLanguageModule('certificate');
337
338 $return->addCustomCommand($certLink, 'download_certificate');
339
340 $return->addHeaderIcon(
341 'cert_icon',
342 ilUtil::getImagePath('icon_cert.svg'),
343 $DIC->language()->txt('download_certificate'),
344 null,
345 null,
346 $certLink
347 );
348 }
349
350 return $return;
351 }
Validates if an active certificate is stored in the database and can be downloaded by the user.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $DIC, ilLTIConsumerSettingsGUI\CMD_DELIVER_CERTIFICATE, and ilUtil\getImagePath().

+ Here is the call graph for this function:

◆ initMetadata()

ilObjLTIConsumerGUI::initMetadata ( ilObjLTIConsumer  $object)

Definition at line 297 of file class.ilObjLTIConsumerGUI.php.

298 {
299 $metadata = new ilMD($object->getId(), $object->getId(), $object->getType());
300
301 $generalMetadata = $metadata->getGeneral();
302
303 if (!$generalMetadata) {
304 $generalMetadata = $metadata->addGeneral();
305 }
306
307 $generalMetadata->setTitle($object->getTitle());
308 $generalMetadata->save();
309
310 $id = $generalMetadata->addIdentifier();
311 $id->setCatalog('ILIAS');
312 $id->setEntry('il__' . $object->getType() . '_' . $object->getId());
313 $id->save();
314
315 $keywords = $object->getProvider()->getKeywordsArray();
316 ilMDKeyword::updateKeywords($generalMetadata, $keywords);
317 }
static updateKeywords(ilMDGeneral $a_md_section, array $a_keywords)
Update keywords from input array.

References $object, and ilMDKeyword\updateKeywords().

Referenced by afterSave().

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

◆ resetProviderFilter()

ilObjLTIConsumerGUI::resetProviderFilter ( )
protected

Definition at line 180 of file class.ilObjLTIConsumerGUI.php.

181 {
182 $form = $this->buildProviderSelectionForm('');
183 $form->resetFilter();
184 $this->createObject();
185 }

References buildProviderSelectionForm(), and ilObjectGUI\createObject().

+ Here is the call graph for this function:

◆ saveCustom()

ilObjLTIConsumerGUI::saveCustom ( )

Definition at line 202 of file class.ilObjLTIConsumerGUI.php.

203 {
205 throw new ilLtiConsumerException('permission denied!');
206 }
207
208 global $DIC; /* @var \ILIAS\DI\Container $DIC */
209
210 $new_type = $_REQUEST["new_type"];
211 $DIC->ctrl()->setParameter($this, "new_type", $new_type);
212
213 $DIC->language()->loadLanguageModule($new_type);
214
215 $form = $this->initCustomCreateForm($new_type);
216
217 if ($form->checkInput()) {
218 $DIC->ctrl()->setParameter($this, "new_type", "");
219
220 // create object
221 $newObj = $this->createNewObject(
222 $new_type,
223 $form->getInput('title'),
224 $form->getInput('desc')
225 );
226
227 // apply didactic template?
228 $dtpl = $this->getDidacticTemplateVar("dtpl");
229 if ($dtpl) {
230 $newObj->applyDidacticTemplate($dtpl);
231 }
232
233 // auto rating
234 $this->handleAutoRating($newObj);
235
236 $this->afterSave($newObj);
237
238 return;
239 }
240
241 $form->setValuesByPost();
242
243 $DIC->ui()->mainTemplate()->setContent($form->getHtml());
244 }
createNewObject($newType, $title, $description)
afterSave(ilObject $newObject)
Post (successful) object creation hook.
handleAutoRating(ilObject $a_new_obj)
getDidacticTemplateVar($a_type)
Get didactic template setting from creation screen.

References $DIC, afterSave(), createNewObject(), ilObjectGUI\getDidacticTemplateVar(), ilObject2GUI\handleAutoRating(), ilLTIConsumerAccess\hasCustomProviderCreationAccess(), and initCustomCreateForm().

+ Here is the call graph for this function:

◆ setTabs()

ilObjLTIConsumerGUI::setTabs ( )

create tabs (repository/workspace switch)

this had to be moved here because of the context-specific permission tab

Reimplemented from ilObject2GUI.

Definition at line 526 of file class.ilObjLTIConsumerGUI.php.

527 {
528 global $DIC; /* @var \ILIAS\DI\Container $DIC */
529 $DIC->language()->loadLanguageModule('lti');
530
531 $DIC->help()->setScreenIdComponent("lti");
532
533 if (!$this->object->getOfflineStatus() &&
534 $this->object->getProvider()->getAvailability() != ilLTIConsumeProvider::AVAILABILITY_NONE
535 ) {
536 $DIC->tabs()->addTab(
537 self::TAB_ID_CONTENT,
538 $DIC->language()->txt(self::TAB_ID_CONTENT),
539 $DIC->ctrl()->getLinkTargetByClass(ilLTIConsumerContentGUI::class)
540 );
541 }
542
543 $DIC->tabs()->addTab(
544 self::TAB_ID_INFO,
545 $DIC->language()->txt(self::TAB_ID_INFO),
546 $this->ctrl->getLinkTargetByClass(ilInfoScreenGUI::class)
547 );
548
549
550 if ($this->ltiAccess->hasWriteAccess()) {
551 $DIC->tabs()->addTab(
552 self::TAB_ID_SETTINGS,
553 $DIC->language()->txt(self::TAB_ID_SETTINGS),
554 $DIC->ctrl()->getLinkTargetByClass(ilLTIConsumerSettingsGUI::class)
555 );
556 }
557
558 if ($this->ltiAccess->hasStatementsAccess()) {
559 $DIC->tabs()->addTab(
560 self::TAB_ID_STATEMENTS,
561 $DIC->language()->txt(self::TAB_ID_STATEMENTS),
562 $DIC->ctrl()->getLinkTargetByClass(ilLTIConsumerXapiStatementsGUI::class)
563 );
564 }
565
566 if ($this->ltiAccess->hasHighscoreAccess()) {
567 $DIC->language()->loadLanguageModule('lti');
568 $DIC->tabs()->addTab(
569 self::TAB_ID_SCORING,
570 $DIC->language()->txt(self::TAB_ID_SCORING),
571 $DIC->ctrl()->getLinkTargetByClass(ilLTIConsumerScoringGUI::class)
572 );
573 }
574
575 if ($this->ltiAccess->hasLearningProgressAccess() && $this->object->getProvider()->getHasOutcome()) {
576 $DIC->tabs()->addTab(
577 self::TAB_ID_LEARNING_PROGRESS,
578 $DIC->language()->txt(self::TAB_ID_LEARNING_PROGRESS),
579 $DIC->ctrl()->getLinkTargetByClass(ilLearningProgressGUI::class)
580 );
581 }
582
583 if ($this->ltiAccess->hasWriteAccess()) {
584 $gui = new ilObjectMetaDataGUI($this->object);
585 $link = $gui->getTab();
586
587 if (strlen($link)) {
588 $DIC->tabs()->addTab(
589 self::TAB_ID_METADATA,
590 $DIC->language()->txt('meta_data'),
591 $link
592 );
593 }
594 }
595
596 if ($this->ltiAccess->hasEditPermissionsAccess()) {
597 $DIC->tabs()->addTab(
598 self::TAB_ID_PERMISSIONS,
599 $DIC->language()->txt(self::TAB_ID_PERMISSIONS),
600 $DIC->ctrl()->getLinkTargetByClass(ilPermissionGUI::class, 'perm')
601 );
602 }
603
604 if (defined('DEVMODE') && DEVMODE) {
605 $DIC->tabs()->addTab(
606 'debug',
607 'DEBUG',
608 $DIC->ctrl()->getLinkTarget($this, 'debug')
609 );
610 }
611 }

References $DIC, and ilLTIConsumeProvider\AVAILABILITY_NONE.

◆ trackObjectReadEvent()

ilObjLTIConsumerGUI::trackObjectReadEvent ( )
protected

Definition at line 672 of file class.ilObjLTIConsumerGUI.php.

673 {
674 global $DIC; /* @var \ILIAS\DI\Container $DIC */
675
677 $this->object->getType(),
678 $this->object->getRefId(),
679 $this->object->getId(),
680 $DIC->user()->getId()
681 );
682
683 ilLPStatusWrapper::_updateStatus($this->object->getId(), $DIC->user()->getId());
684 }
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.

References $DIC, ilChangeEvent\_recordReadEvent(), and ilLPStatusWrapper\_updateStatus().

Referenced by executeCommand().

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

Field Documentation

◆ $ltiAccess

ilObjLTIConsumerGUI::$ltiAccess
protected

Definition at line 48 of file class.ilObjLTIConsumerGUI.php.

◆ $object

ilObjLTIConsumerGUI::$object

Definition at line 43 of file class.ilObjLTIConsumerGUI.php.

Referenced by initMetadata().

◆ CFORM_CUSTOM_NEW

const ilObjLTIConsumerGUI::CFORM_CUSTOM_NEW = 99

Definition at line 27 of file class.ilObjLTIConsumerGUI.php.

Referenced by initCreationForms().

◆ DEFAULT_CMD

const ilObjLTIConsumerGUI::DEFAULT_CMD = 'launch'

◆ TAB_ID_CONTENT

const ilObjLTIConsumerGUI::TAB_ID_CONTENT = 'tab_content'

Definition at line 30 of file class.ilObjLTIConsumerGUI.php.

◆ TAB_ID_INFO

const ilObjLTIConsumerGUI::TAB_ID_INFO = 'tab_info'

Definition at line 29 of file class.ilObjLTIConsumerGUI.php.

◆ TAB_ID_LEARNING_PROGRESS

const ilObjLTIConsumerGUI::TAB_ID_LEARNING_PROGRESS = 'learning_progress'

Definition at line 35 of file class.ilObjLTIConsumerGUI.php.

◆ TAB_ID_METADATA

const ilObjLTIConsumerGUI::TAB_ID_METADATA = 'tab_metadata'

Definition at line 34 of file class.ilObjLTIConsumerGUI.php.

◆ TAB_ID_PERMISSIONS

const ilObjLTIConsumerGUI::TAB_ID_PERMISSIONS = 'perm_settings'

Definition at line 36 of file class.ilObjLTIConsumerGUI.php.

◆ TAB_ID_SCORING

const ilObjLTIConsumerGUI::TAB_ID_SCORING = 'tab_scoring'

Definition at line 33 of file class.ilObjLTIConsumerGUI.php.

◆ TAB_ID_SETTINGS

const ilObjLTIConsumerGUI::TAB_ID_SETTINGS = 'tab_settings'

Definition at line 31 of file class.ilObjLTIConsumerGUI.php.

◆ TAB_ID_STATEMENTS

const ilObjLTIConsumerGUI::TAB_ID_STATEMENTS = 'tab_statements'

Definition at line 32 of file class.ilObjLTIConsumerGUI.php.


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