ILIAS  release_8 Revision v8.24
ilObjCmiXapiGUI Class Reference
+ Inheritance diagram for ilObjCmiXapiGUI:
+ Collaboration diagram for ilObjCmiXapiGUI:

Public Member Functions

 __construct (int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
 
 getType ()
 Functions that must be overwritten. More...
 
 initMetadata (ilObjCmiXapi $object)
 
 infoScreen ()
 
 infoScreenForward ()
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 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 (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 cancelDelete ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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 More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto (string $a_target)
 
static getPrivacyIdentString (int $ident)
 
static getPrivacyNameString (int $ident)
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Data Fields

const TAB_ID_INFO = 'tab_info'
 
const TAB_ID_SETTINGS = 'tab_settings'
 
const TAB_ID_STATEMENTS = 'tab_statements'
 
const TAB_ID_SCORING = 'tab_scoring'
 
const TAB_ID_LEARNING_PROGRESS = 'learning_progress'
 
const TAB_ID_METADATA = 'tab_metadata'
 
const TAB_ID_EXPORT = 'tab_export'
 
const TAB_ID_PERMISSIONS = 'perm_settings'
 
const CMD_INFO_SCREEN = 'infoScreen'
 
const CMD_FETCH_XAPI_STATEMENTS = 'fetchXapiStatements'
 
const DEFAULT_CMD = self::CMD_INFO_SCREEN
 
const NEW_OBJ_TITLE = ""
 
- 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 ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 initCreateForm (string $a_new_type)
 
 afterSave (ilObject $newObject)
 Post (successful) object creation hook. More...
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 debug ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 trackObjectReadEvent ()
 
 initInfoScreenToolbar ()
 
 handleAvailablityMessage ()
 
 isFetchXapiStatementsRequired (ilCmiXapiUser $cmixUser)
 
 sendLastFetchInfo (ilCmiXapiUser $cmixUser)
 
 fetchXapiStatements ()
 
 getXapiStatementsReport (ilCmiXapiDateTime $since, ilCmiXapiDateTime $until)
 
 buildReportFilter (ilCmiXapiDateTime $since, ilCmiXapiDateTime $until)
 
- 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 ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", int $ref_id=null)
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_varname, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 addAdminLocatorItems (bool $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 (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 showActions ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget (string $append=null, bool $center=false)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 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 More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $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...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Private Attributes

ilCmiXapiAccess $cmixAccess
 

Additional Inherited Members

- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilObjectService $object_service
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = array()
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

Definition at line 40 of file class.ilObjCmiXapiGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from ilObject2GUI.

Definition at line 60 of file class.ilObjCmiXapiGUI.php.

61 {
62 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
63
64 if ($this->object instanceof ilObjCmiXapi) {
65 $this->cmixAccess = ilCmiXapiAccess::getInstance($this->object);
66 }
67
68 $this->lng->loadLanguageModule("cmix");
69 }
static getInstance(ilObjCmiXapi $object)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct(), ilCmiXapiAccess\getInstance(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjCmiXapiGUI::_goto ( string  $a_target)
static

Definition at line 290 of file class.ilObjCmiXapiGUI.php.

290 : void
291 {
292 global $DIC;
293 $main_tpl = $DIC->ui()->mainTemplate();
294 /* @var \ILIAS\DI\Container $DIC */
295 $err = $DIC['ilErr'];
296 /* @var ilErrorHandling $err */
297 $ctrl = $DIC->ctrl();
298 $request = $DIC->http()->request();
299 $access = $DIC->access();
300 $lng = $DIC->language();
301
302 $targetParameters = explode('_', $a_target);
303 $id = (int) $targetParameters[0];
304
305 if ($id <= 0) {
306 $err->raiseError($lng->txt('msg_no_perm_read'), $err->FATAL);
307 }
308
309 if ($access->checkAccess('read', '', $id)) {
310 $ctrl->setTargetScript('ilias.php');
311 $ctrl->setParameterByClass(ilObjCmiXapiGUI::class, 'ref_id', $id);
312 $ctrl->redirectByClass([ilRepositoryGUI::class, ilObjCmiXapiGUI::class]);
313 } elseif ($access->checkAccess('visible', '', $id)) {
315 } elseif ($access->checkAccess('read', '', ROOT_FOLDER_ID)) {
316 $main_tpl->setOnScreenMessage('info', sprintf(
317 $lng->txt('msg_no_perm_read_item'),
319 ), true);
320
322 }
323
324 $err->raiseError($lng->txt("msg_no_perm_read_lm"), $err->FATAL);
325 }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
@inheritDoc
setTargetScript(string $a_target_script)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilAccessHandler $access
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
ServerRequestInterface $request
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
const ROOT_FOLDER_ID
Definition: constants.php:32
global $DIC
Definition: feed.php:28
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance)

References ilObject2GUI\$access, ilObject2GUI\$ctrl, $DIC, ilObjectGUI\$id, ilObject2GUI\$lng, ilObjectGUI\$request, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilRBACAccessHandler\checkAccess(), ILIAS\Repository\int(), ilCtrl\redirectByClass(), ROOT_FOLDER_ID, ilCtrl\setParameterByClass(), ilCtrl\setTargetScript(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjCmiXapiGUI::addLocatorItems ( )
protected

Functions to be overwritten.

Reimplemented from ilObject2GUI.

Definition at line 585 of file class.ilObjCmiXapiGUI.php.

585 : void
586 {
587 global $DIC;
588 /* @var \ILIAS\DI\Container $DIC */
589
590 $locator = $DIC['ilLocator'];
591 /* @var ilLocatorGUI $locator */
593 $this->object->getTitle(),
594 $this->ctrl->getLinkTarget($this, self::DEFAULT_CMD),
595 "",
596 $DIC->http()->wrapper()->query()->retrieve("ref_id", $DIC->refinery()->kindlyTo()->int())
597 );
598 }
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=null)
ilLocatorGUI $locator

References $DIC, ilObject2GUI\$locator, ilLocatorGUI\addItem(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ afterSave()

ilObjCmiXapiGUI::afterSave ( ilObject  $new_object)
protected

Post (successful) object creation hook.

Reimplemented from ilObjectGUI.

Definition at line 163 of file class.ilObjCmiXapiGUI.php.

163 : void
164 {
165 /* @var ilObjCmiXapi $newObject */
166 $form = $this->initCreateForm($newObject->getType());
167
168 if ($form->checkInput()) {
169 $newObject->setContentType($form->getInput('content_type'));
170
171 $newObject->setLrsTypeId((int) $form->getInput('lrs_type_id'));
172 $newObject->initLrsType();
173
174 $newObject->setPrivacyIdent($newObject->getLrsType()->getPrivacyIdent());
175 $newObject->setPrivacyName($newObject->getLrsType()->getPrivacyName());
176
177 switch ($form->getInput('source_type')) {
178 case 'resource': // remote resource
179
180 $newObject->setTitle($form->getInput('title'));
181 $newObject->setSourceType(ilObjCmiXapi::SRC_TYPE_REMOTE);
182 break;
183
184 case 'upload': // upload from local client
185
186 try {
187 $uploadImporter = new ilCmiXapiContentUploadImporter($newObject);
188 $uploadImporter->importFormUpload((array) $form->getInput('uploadfile'));
189
190 $newObject->setSourceType(ilObjCmiXapi::SRC_TYPE_LOCAL);
192 $form->getItemByPostVar('uploadfile')->setAlert($e->getMessage());
193 $this->tpl->setOnScreenMessage('failure', 'something went wrong!', true);
194 $this->ctrl->redirectByClass(self::class, 'create');
195 }
196
197 break;
198
199 case 'server': // from upload directory
200
202 throw new ilCmiXapiException('access denied!');
203 }
204
205 $serverFile = $form->getInput('serverfile');
206
207 if (!ilUploadFiles::_checkUploadFile($serverFile)) {
208 throw new ilCmiXapiException($this->lng->txt('upload_error_file_not_found'));
209 }
210
211 $uploadImporter = new ilCmiXapiContentUploadImporter($newObject);
212
213 $uploadImporter->importServerFile(implode(DIRECTORY_SEPARATOR, [
215 $serverFile
216 ]));
217
218 $newObject->setSourceType(ilObjCmiXapi::SRC_TYPE_LOCAL);
219
220 break;
221
222 case 'external':
223
224 $newObject->setSourceType(ilObjCmiXapi::SRC_TYPE_EXTERNAL);
225 $newObject->setBypassProxyEnabled(true);
226 break;
227 }
228
229 $newObject->save();
230
231 $this->initMetadata($newObject);
232
233 $this->ctrl->redirectByClass(ilCmiXapiSettingsGUI::class);
234 }
235
236 throw new ilCmiXapiException('invalid creation form submit!');
237 }
initCreateForm(string $a_new_type)
initMetadata(ilObjCmiXapi $object)
static _checkUploadFile(string $a_file)
static _getUploadDirectory()

References Vendor\Package\$e, ilUploadFiles\_checkUploadFile(), ilUploadFiles\_getUploadDirectory(), ILIAS\Repository\ctrl(), ilObject\getType(), initCreateForm(), initMetadata(), ILIAS\Repository\lng(), ilObject\setTitle(), ilObjCmiXapi\SRC_TYPE_EXTERNAL, ilObjCmiXapi\SRC_TYPE_LOCAL, and ilObjCmiXapi\SRC_TYPE_REMOTE.

+ Here is the call graph for this function:

◆ buildReportFilter()

ilObjCmiXapiGUI::buildReportFilter ( ilCmiXapiDateTime  $since,
ilCmiXapiDateTime  $until 
)
protected

Definition at line 895 of file class.ilObjCmiXapiGUI.php.

899 global $DIC;
900 /* @var \ILIAS\DI\Container $DIC */
901
902 $filter = new ilCmiXapiStatementsReportFilter();
903
904 $filter->setActor(new ilCmiXapiUser($this->object->getId(), $DIC->user()->getId()));
905 $filter->setActivityId($this->object->getActivityId());
906
907 $filter->setStartDate($since);
908 $filter->setEndDate($until);
909
910 $start = $filter->getStartDate()->get(IL_CAL_DATETIME);
911 $end = $filter->getEndDate()->get(IL_CAL_DATETIME);
912 ilLoggerFactory::getLogger($this->object->getType())->debug("use filter from ($start) until ($end)");
913
914 return $filter;
915 }
const IL_CAL_DATETIME
static getLogger(string $a_component_id)
Get component logger.

◆ debug()

ilObjCmiXapiGUI::debug ( )
protected

Definition at line 550 of file class.ilObjCmiXapiGUI.php.

550 : void
551 {
552 global $DIC;
553 /* @var \ILIAS\DI\Container $DIC */
554
555 $DIC->tabs()->activateTab('debug');
556
557 $filter = new ilCmiXapiStatementsReportFilter();
558 $filter->setActivityId($this->object->getActivityId());
559
560 $linkBuilder = new ilCmiXapiHighscoreReportLinkBuilder(
561 $this->object->getId(),
562 $this->object->getLrsType()->getLrsEndpointStatementsAggregationLink(),
563 $filter
564 );
565
567 $this->object->getLrsType()->getBasicAuth(),
568 $linkBuilder
569 );
570
571 try {
572 $report = $request->queryReport($this->object->getId());
573
574 $DIC->ui()->mainTemplate()->setContent(
575 $report->getResponseDebug()
576 );
577 //ilUtil::sendSuccess('Object ID: '.$this->object->getId());
578 $this->tpl->setOnScreenMessage('info', $linkBuilder->getPipelineDebug());
579 $this->tpl->setOnScreenMessage('question', '<pre>' . print_r($report->getTableData(), true) . '</pre>');
580 } catch (Exception $e) {
581 $this->tpl->setOnScreenMessage('failure', $e->getMessage());
582 }
583 }

References $DIC, Vendor\Package\$e, ilObjectGUI\$request, and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ fetchXapiStatements()

ilObjCmiXapiGUI::fetchXapiStatements ( )
protected

Definition at line 843 of file class.ilObjCmiXapiGUI.php.

843 : void
844 {
845 global $DIC;
846 /* @var \ILIAS\DI\Container $DIC */
847 $logger = ilLoggerFactory::getLogger($this->object->getType());
848
849 if ($this->object->getLaunchMode() != ilObjCmiXapi::LAUNCH_MODE_NORMAL) {
850 throw new ilCmiXapiException('access denied!');
851 }
852
853 $cmixUser = new ilCmiXapiUser($this->object->getId(), $DIC->user()->getId(), $this->object->getPrivacyIdent());
854
855 $fetchedUntil = $cmixUser->getFetchUntil();
856 $now = new ilCmiXapiDateTime(time(), IL_CAL_UNIX);
857
858 $report = $this->getXapiStatementsReport($fetchedUntil, $now);
859
860 if ($report->hasStatements()) {
861 $evaluation = new ilXapiStatementEvaluation($logger, $this->object);
862 $evaluation->evaluateReport($report);
863
864 //$logger->debug('update lp for object (' . $this->object->getId() . ')');
865 //ilLPStatusWrapper::_updateStatus($this->object->getId(), $DIC->user()->getId());
866 }
867
868 $cmixUser->setFetchUntil($now);
869 $cmixUser->save();
870
871 $this->tpl->setOnScreenMessage('success', $DIC->language()->txt('xapi_statements_fetched_successfully'), true);
872 $DIC->ctrl()->redirect($this, self::CMD_INFO_SCREEN);
873 }
const IL_CAL_UNIX
getXapiStatementsReport(ilCmiXapiDateTime $since, ilCmiXapiDateTime $until)

References $DIC, ilLoggerFactory\getLogger(), getXapiStatementsReport(), IL_CAL_UNIX, ilObjCmiXapi\LAUNCH_MODE_NORMAL, and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ getPrivacyIdentString()

static ilObjCmiXapiGUI::getPrivacyIdentString ( int  $ident)
static

Definition at line 917 of file class.ilObjCmiXapiGUI.php.

917 : string
918 {
919 switch ($ident) {
920 case 0:
921 return "il_uuid_user_id";
922 case 1:
923 return "il_uuid_ext_account";
924 case 2:
925 return "il_uuid_login";
926 case 3:
927 return "real_email";
928 case 4:
929 return "il_uuid_random";
930 case 5:
931 return "il_uuid_sha256";
932 case 6:
933 return "il_uuid_sha256url";
934 }
935 return '';
936 }

Referenced by ilObjLTIConsumerGUI\infoScreenForward().

+ Here is the caller graph for this function:

◆ getPrivacyNameString()

static ilObjCmiXapiGUI::getPrivacyNameString ( int  $ident)
static

Definition at line 938 of file class.ilObjCmiXapiGUI.php.

938 : string
939 {
940 switch ($ident) {
941 case 0:
942 return "none";
943 case 1:
944 return "firstname";
945 case 2:
946 return "lastname";
947 case 3:
948 return "fullname";
949 }
950 return '';
951 }

Referenced by ilObjLTIConsumerGUI\infoScreenForward().

+ Here is the caller graph for this function:

◆ getType()

ilObjCmiXapiGUI::getType ( )

Functions that must be overwritten.

Reimplemented from ilObject2GUI.

Definition at line 71 of file class.ilObjCmiXapiGUI.php.

71 : string
72 {
73 return 'cmix';
74 }

◆ getXapiStatementsReport()

ilObjCmiXapiGUI::getXapiStatementsReport ( ilCmiXapiDateTime  $since,
ilCmiXapiDateTime  $until 
)
protected

Definition at line 875 of file class.ilObjCmiXapiGUI.php.

879 $filter = $this->buildReportFilter($since, $until);
880
881 $linkBuilder = new ilCmiXapiStatementsReportLinkBuilder(
882 $this->object->getId(),
883 $this->object->getLrsType()->getLrsEndpointStatementsAggregationLink(),
884 $filter
885 );
886
888 $this->object->getLrsType()->getBasicAuth(),
889 $linkBuilder
890 );
891
892 return $request->queryReport($this->object->getId());
893 }
buildReportFilter(ilCmiXapiDateTime $since, ilCmiXapiDateTime $until)

Referenced by fetchXapiStatements().

+ Here is the caller graph for this function:

◆ handleAvailablityMessage()

ilObjCmiXapiGUI::handleAvailablityMessage ( )
protected

Definition at line 799 of file class.ilObjCmiXapiGUI.php.

799 : void
800 {
801 global $DIC;
802 /* @var \ILIAS\DI\Container $DIC */
803
804 if ($this->object->getLrsType()->getAvailability() == ilCmiXapiLrsType::AVAILABILITY_NONE) {
805 $this->tpl->setOnScreenMessage('failure', $DIC->language()->txt('cmix_lrstype_not_avail_msg'));
806 }
807 }

References $DIC, ilCmiXapiLrsType\AVAILABILITY_NONE, and ILIAS\Repository\object().

Referenced by infoScreenForward().

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

◆ infoScreen()

ilObjCmiXapiGUI::infoScreen ( )

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

613 : void
614 {
615 global $DIC;
616 /* @var \ILIAS\DI\Container $DIC */
617
618 $DIC->tabs()->activateTab(self::TAB_ID_INFO);
619
620 $DIC->ctrl()->setCmd("showSummary");
621 $DIC->ctrl()->setCmdClass("ilinfoscreengui");
622 $this->infoScreenForward();
623 }

References $DIC, and infoScreenForward().

+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjCmiXapiGUI::infoScreenForward ( )

Definition at line 625 of file class.ilObjCmiXapiGUI.php.

625 : void
626 {
627 global $DIC;
628 /* @var \ILIAS\DI\Container $DIC */
629 $ilErr = $DIC['ilErr'];
630 /* @var ilErrorHandling $ilErr */
631
632 if (!$this->checkPermissionBool("visible") && !$this->checkPermissionBool("read")) {
633 $ilErr->raiseError($DIC->language()->txt("msg_no_perm_read"));
634 }
635
637 $this->initInfoScreenToolbar();
638
639 $info = new ilInfoScreenGUI($this);
640
641 $info->enablePrivateNotes();
642
643 if ($this->checkPermissionBool("read")) {
644 $info->enableNews();
645 }
646
647 $info->enableNewsEditing(false);
648
649 if ($this->checkPermissionBool("write")) {
650 $news_set = new ilSetting("news");
651 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
652
653 if ($enable_internal_rss) {
654 $info->setBlockProperty("news", "settings", (string) true);
655 $info->setBlockProperty("news", "public_notifications_option", (string) true);
656 }
657 }
658
659 if (DEVMODE) {
660 // Development Info
661 $info->addSection('DEVMODE Info');
662 $info->addProperty('Local Object ID', (string) $this->object->getId());
663 $info->addProperty('Current User ID', (string) $DIC->user()->getId());
664 }
665
666 // standard meta data
667 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
668
669 // Info about privacy
670 if ($this->object->isSourceTypeExternal()) {
671 $info->addSection($DIC->language()->txt("cmix_info_privacy_section"));
672 } else {
673 $info->addSection($DIC->language()->txt("cmix_info_privacy_section_launch"));
674 }
675
676 $info->addProperty($DIC->language()->txt('cmix_lrs_type'), $this->object->getLrsType()->getTitle());
677
678 if ($this->object->isSourceTypeExternal()) {
679 $cmixUser = new ilCmiXapiUser(
680 $this->object->getId(),
681 $DIC->user()->getId(),
682 $this->object->getPrivacyIdent()
683 );
684 if ($cmixUser->getUsrIdent()) {
685 $info->addProperty(
686 $DIC->language()->txt("conf_user_registered_mail"),
687 $cmixUser->getUsrIdent()
688 );
689 }
690 } else {
691 $info->addProperty(
692 $DIC->language()->txt("conf_privacy_name"),
693 $DIC->language()->txt('conf_privacy_name_' . self::getPrivacyNameString($this->object->getPrivacyName()))
694 );
695
696 $info->addProperty(
697 $DIC->language()->txt("conf_privacy_ident"),
698 $DIC->language()->txt('conf_privacy_ident_' . self::getPrivacyIdentString($this->object->getPrivacyIdent()))
699 );
700 }
701
702 if ($this->object->getLrsType()->getExternalLrs()) {
703 $info->addProperty(
704 $DIC->language()->txt("cmix_info_external_lrs_label"),
705 $DIC->language()->txt('cmix_info_external_lrs_info')
706 );
707 }
708
709 if (strlen($this->object->getLrsType()->getPrivacyCommentDefault())) {
710 $info->addProperty(
711 $DIC->language()->txt("cmix_indication_to_user"),
712 nl2br($this->object->getLrsType()->getPrivacyCommentDefault())
713 );
714 }
715
716 // FINISHED INFO SCREEN, NOW FORWARD
717
718 $this->ctrl->forwardCommand($info);
719 }
Class ilInfoScreenGUI.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ilErr
Definition: raiseError.php:17

References $DIC, $ilErr, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), handleAvailablityMessage(), initInfoScreenToolbar(), and ILIAS\Repository\object().

Referenced by infoScreen().

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

◆ initCreateForm()

ilObjCmiXapiGUI::initCreateForm ( string  $a_new_type)
protected
Exceptions
ilCtrlException

Reimplemented from ilObjectGUI.

Definition at line 79 of file class.ilObjCmiXapiGUI.php.

80 {
81 $form = new ilPropertyFormGUI();
82 $form->setTarget("_top");
83 $form->setFormAction($this->ctrl->getFormAction($this, "save"));
84 $form->setTitle($this->lng->txt($a_new_type . "_new"));
85
86 $form = $this->initDidacticTemplate($form);
87
88 $title = new ilHiddenInputGUI('title');
89 $title->setValue(self::NEW_OBJ_TITLE);
90 $form->addItem($title);
91
92 $type = new ilRadioGroupInputGUI('Type', 'content_type');
93 $type->setRequired(true);
94
95 $typeLearningModule = new ilRadioOption($this->lng->txt('cmix_add_cmi5_lm'), ilObjCmiXapi::CONT_TYPE_CMI5);
96 $typeLearningModule->setInfo($this->lng->txt('cmix_add_cmi5_lm_info'));
97 $type->addOption($typeLearningModule);
98
99 $typeGenericModule = new ilRadioOption(
100 $this->lng->txt('cmix_add_xapi_standard_object'),
102 );
103 $typeGenericModule->setInfo($this->lng->txt('cmix_add_xapi_standard_object_info'));
104 $type->addOption($typeGenericModule);
105
106 $form->addItem($type);
107
108 $item = new ilRadioGroupInputGUI($this->lng->txt('cmix_add_lrs_type'), 'lrs_type_id');
109 $item->setRequired(true);
111 foreach ($types as $type) {
112 $option = new ilRadioOption((string) $type['title'], (string) $type['type_id'], (string) $type['description']);
113 $item->addOption($option);
114 }
115 #$item->setValue($this->object->typedef->getTypeId());
116 $form->addItem($item);
117
118 $source = new ilRadioGroupInputGUI($this->lng->txt('cmix_add_source'), 'source_type');
119 $source->setRequired(true);
120
121 $srcRemoteContent = new ilRadioOption($this->lng->txt('cmix_add_source_url'), 'resource');
122 $srcRemoteContent->setInfo($this->lng->txt('cmix_add_source_url_info'));
123 $source->addOption($srcRemoteContent);
124
125 $srcUploadContent = new ilRadioOption($this->lng->txt('cmix_add_source_local_dir'), 'upload');
126 $srcUploadContent->setInfo($this->lng->txt('cmix_add_source_local_dir_info'));
127 $source->addOption($srcUploadContent);
128
129 $srcUpload = new ilFileInputGUI($this->lng->txt("select_file"), "uploadfile");
130 $srcUpload->setAllowDeletion(false);
131 $srcUpload->setSuffixes(['zip', 'xml']);
132 $srcUpload->setRequired(true);
133 $srcUploadContent->addSubItem($srcUpload);
134
136 $srcServerContent = new ilRadioOption($this->lng->txt('cmix_add_source_upload_dir'), 'server');
137 $srcServerContent->setInfo($this->lng->txt('cmix_add_source_upload_dir_info'));
138 $source->addOption($srcServerContent);
139
140 $options = ['' => $this->lng->txt('cmix_add_source_upload_select')];
141
142 foreach (ilUploadFiles::_getUploadFiles() as $file) {
143 $options[$file] = $file;
144 }
145
146 $srcSelect = new ilSelectInputGUI($this->lng->txt("select_file"), "serverfile");
147 $srcSelect->setOptions($options);
148 $srcServerContent->addSubItem($srcSelect);
149 }
150
151 $srcExternalApp = new ilRadioOption($this->lng->txt('cmix_add_source_external_app'), 'external');
152 $srcExternalApp->setInfo($this->lng->txt('cmix_add_source_external_app_info'));
153 $source->addOption($srcExternalApp);
154
155 $form->addItem($source);
156
157 $form->addCommandButton("save", $this->lng->txt($a_new_type . "_add"));
158 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
159
160 return $form;
161 }
static getTypesData(bool $a_extended=false, ?int $a_availability=null)
Get basic data array of all types (without field definitions)
This class represents a file property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initDidacticTemplate(ilPropertyFormGUI $form)
This class represents a property form user interface.
This class represents a property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a selection list property in a property form.
$source
Definition: metadata.php:93

References $source, ilObject2GUI\$type, ilUploadFiles\_getUploadDirectory(), ilUploadFiles\_getUploadFiles(), ilCmiXapiLrsType\AVAILABILITY_CREATE, ilObjCmiXapi\CONT_TYPE_CMI5, ilObjCmiXapi\CONT_TYPE_GENERIC, ILIAS\Repository\ctrl(), ilCmiXapiLrsTypeList\getTypesData(), ilObjectGUI\initDidacticTemplate(), and ILIAS\Repository\lng().

Referenced by afterSave().

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

◆ initHeaderAction()

ilObjCmiXapiGUI::initHeaderAction ( ?string  $sub_type = null,
?int  $sub_id = null 
)
protected

Add header action menu.

Reimplemented from ilObject2GUI.

Definition at line 258 of file class.ilObjCmiXapiGUI.php.

259 {
260 $return = parent::initHeaderAction($sub_type, $sub_id);
261
262 if ($this->creation_mode) {
263 return $return;
264 }
265
266 $validator = new ilCertificateDownloadValidator();
267 if ($validator->isCertificateDownloadable((int) $this->user->getId(), $this->object->getId())) {
268 $certLink = $this->ctrl->getLinkTargetByClass(
269 [ilObjCmiXapiGUI::class, ilCmiXapiSettingsGUI::class],
271 );
272
273 $this->lng->loadLanguageModule('certificate');
274
275 $return->addCustomCommand($certLink, 'download_certificate');
276
277 $return->addHeaderIcon(
278 'cert_icon',
279 ilUtil::getImagePath('icon_cert.svg'),
280 $this->lng->txt('download_certificate'),
281 null,
282 null,
283 $certLink
284 );
285 }
286
287 return $return;
288 }
Validates if an active certificate is stored in the database and can be downloaded by the user.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)

References ilCmiXapiSettingsGUI\CMD_DELIVER_CERTIFICATE, ILIAS\Repository\ctrl(), ilUtil\getImagePath(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ initInfoScreenToolbar()

ilObjCmiXapiGUI::initInfoScreenToolbar ( )
protected

beware: ilCmiXapiUser::exists($this->object->getId(),$DIC->user()->getId()); this is not a valid query because if you switched privacyIdent mode before you will get an existing user without launched data like proxySuccess

Definition at line 721 of file class.ilObjCmiXapiGUI.php.

721 : void
722 {
723 global $DIC;
724 /* @var \ILIAS\DI\Container $DIC */
725
726 if (!$this->object->getOfflineStatus() && $this->object->getLrsType()->isAvailable()) {
727 // TODO : check if this is the correct query
728 // p.e. switched to another privacyIdent before: user exists but not with the new privacyIdent
729 // re_check for isSourceTypeExternal
730 //$cmixUserExists = ilCmiXapiUser::exists($this->object->getId(), $DIC->user()->getId());
731
732 if ($this->object->isSourceTypeExternal()) {
733 $extCmiUserExists = ilCmiXapiUser::exists($this->object->getId(), $DIC->user()->getId());
734 $registerButton = ilLinkButton::getInstance();
735
736 if ($extCmiUserExists) {
737 $registerButton->setCaption('change_registration');
738 } else {
739 $registerButton->setPrimary(true);
740 $registerButton->setCaption('create_registration');
741 }
742
743 $registerButton->setUrl($DIC->ctrl()->getLinkTargetByClass(
744 ilCmiXapiRegistrationGUI::class
745 ));
746
747 $DIC->toolbar()->addButtonInstance($registerButton);
748 } else {
749 $launchButton = ilLinkButton::getInstance();
750 $launchButton->setPrimary(true);
751 $launchButton->setCaption('launch');
752
753 if ($this->object->getLaunchMethod() == ilObjCmiXapi::LAUNCH_METHOD_NEW_WIN) {
754 $launchButton->setTarget('_blank');
755 }
756
757 $launchButton->setUrl($DIC->ctrl()->getLinkTargetByClass(
758 ilCmiXapiLaunchGUI::class
759 ));
760
761 $DIC->toolbar()->addButtonInstance($launchButton);
762 }
763
769 $cmiUserExists = ilCmiXapiUser::exists(
770 $this->object->getId(),
771 $DIC->user()->getId(),
772 $this->object->getPrivacyIdent()
773 );
774
775 if ($cmiUserExists) {
776 $cmixUser = new ilCmiXapiUser(
777 $this->object->getId(),
778 $DIC->user()->getId(),
779 $this->object->getPrivacyIdent()
780 );
781
782 if ($this->isFetchXapiStatementsRequired($cmixUser)) {
783 $fetchButton = ilLinkButton::getInstance();
784 $fetchButton->setCaption('fetch_xapi_statements');
785
786 $fetchButton->setUrl($DIC->ctrl()->getLinkTarget(
787 $this,
788 self::CMD_FETCH_XAPI_STATEMENTS
789 ));
790
791 $DIC->toolbar()->addButtonInstance($fetchButton);
792
793 $this->sendLastFetchInfo($cmixUser);
794 }
795 }
796 }
797 }
static exists(int $objId, int $usrId, int $privacyIdent=999)
sendLastFetchInfo(ilCmiXapiUser $cmixUser)
isFetchXapiStatementsRequired(ilCmiXapiUser $cmixUser)

References $DIC, ilCmiXapiUser\exists(), ilLinkButton\getInstance(), isFetchXapiStatementsRequired(), ilObjCmiXapi\LAUNCH_METHOD_NEW_WIN, ILIAS\Repository\object(), and sendLastFetchInfo().

Referenced by infoScreenForward().

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

◆ initMetadata()

ilObjCmiXapiGUI::initMetadata ( ilObjCmiXapi  $object)

Definition at line 239 of file class.ilObjCmiXapiGUI.php.

239 : void
240 {
241 $metadata = new ilMD($object->getId(), $object->getId(), $object->getType());
242
243 $generalMetadata = $metadata->getGeneral();
244
245 if (!$generalMetadata) {
246 $generalMetadata = $metadata->addGeneral();
247 }
248
249 $generalMetadata->setTitle($object->getTitle());
250 $generalMetadata->save();
251
252 $id = $generalMetadata->addIdentifier();
253 $id->setCatalog('ILIAS');
254 $id->setEntry('il__' . $object->getType() . '_' . $object->getId());
255 $id->save();
256 }

References ilObjectGUI\$id, ilObjectGUI\$object, ilObject\getId(), ilObject\getTitle(), and ilObject\getType().

Referenced by afterSave().

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

◆ isFetchXapiStatementsRequired()

ilObjCmiXapiGUI::isFetchXapiStatementsRequired ( ilCmiXapiUser  $cmixUser)
protected

Definition at line 809 of file class.ilObjCmiXapiGUI.php.

809 : bool
810 {
811 global $DIC;
812 if ($this->object->getLaunchMode() != ilObjCmiXapi::LAUNCH_MODE_NORMAL) {
813 return false;
814 }
815
816 if ($this->object->isBypassProxyEnabled()) {
817 return true;
818 }
819
820 if (!$cmixUser->hasProxySuccess()) {
821 return true;
822 }
823
824 return false;
825 }

References $DIC, ilCmiXapiUser\hasProxySuccess(), ilObjCmiXapi\LAUNCH_MODE_NORMAL, and ILIAS\Repository\object().

Referenced by initInfoScreenToolbar().

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

◆ sendLastFetchInfo()

ilObjCmiXapiGUI::sendLastFetchInfo ( ilCmiXapiUser  $cmixUser)
protected

Definition at line 827 of file class.ilObjCmiXapiGUI.php.

827 : void
828 {
829 global $DIC;
830 /* @var \ILIAS\DI\Container $DIC */
831
832 if (!$cmixUser->getFetchUntil()->get(IL_CAL_UNIX)) {
833 $info = $DIC->language()->txt('xapi_statements_not_fetched_yet');
834 } else {
835 $info = $DIC->language()->txt('xapi_statements_last_fetch_date') . ' ' . ilDatePresentation::formatDate(
836 $cmixUser->getFetchUntil()
837 );
838 }
839
840 $this->tpl->setOnScreenMessage('info', $info);
841 }
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)

References $DIC, ilDatePresentation\formatDate(), ilCmiXapiUser\getFetchUntil(), and IL_CAL_UNIX.

Referenced by initInfoScreenToolbar().

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

◆ setTabs()

ilObjCmiXapiGUI::setTabs ( )
protected

create tabs (repository/workspace switch)

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

Reimplemented from ilObject2GUI.

Definition at line 469 of file class.ilObjCmiXapiGUI.php.

469 : void
470 {
471 global $DIC;
472 /* @var \ILIAS\DI\Container $DIC */
473
474 $DIC->tabs()->addTab(
475 self::TAB_ID_INFO,
476 $DIC->language()->txt(self::TAB_ID_INFO),
477 $DIC->ctrl()->getLinkTargetByClass(self::class)
478 );
479
480 if ($this->cmixAccess->hasWriteAccess()) {
481 $DIC->tabs()->addTab(
482 self::TAB_ID_SETTINGS,
483 $DIC->language()->txt(self::TAB_ID_SETTINGS),
484 $DIC->ctrl()->getLinkTargetByClass(ilCmiXapiSettingsGUI::class)
485 );
486 }
487
488 if ($this->cmixAccess->hasStatementsAccess()) {
489 $DIC->tabs()->addTab(
490 self::TAB_ID_STATEMENTS,
491 $DIC->language()->txt(self::TAB_ID_STATEMENTS),
492 $DIC->ctrl()->getLinkTargetByClass(ilCmiXapiStatementsGUI::class)
493 );
494 }
495
496 if ($this->cmixAccess->hasHighscoreAccess()) {
497 $DIC->tabs()->addTab(
498 self::TAB_ID_SCORING,
499 $DIC->language()->txt(self::TAB_ID_SCORING),
500 $DIC->ctrl()->getLinkTargetByClass(ilCmiXapiScoringGUI::class)
501 );
502 }
503
504 if ($this->cmixAccess->hasLearningProgressAccess()) {
505 $DIC->tabs()->addTab(
506 self::TAB_ID_LEARNING_PROGRESS,
507 $DIC->language()->txt(self::TAB_ID_LEARNING_PROGRESS),
508 $DIC->ctrl()->getLinkTargetByClass(ilLearningProgressGUI::class)
509 );
510 }
511
512 if ($this->cmixAccess->hasWriteAccess()) {
513 $gui = new ilObjectMetaDataGUI($this->object);
514 $link = $gui->getTab();
515
516 if (strlen($link)) {
517 $DIC->tabs()->addTab(
518 self::TAB_ID_METADATA,
519 $DIC->language()->txt('meta_data'),
520 $link
521 );
522 }
523 }
524
525 if ($this->cmixAccess->hasWriteAccess()) {
526 $DIC->tabs()->addTab(
527 self::TAB_ID_EXPORT,
528 $DIC->language()->txt(self::TAB_ID_EXPORT),
529 $DIC->ctrl()->getLinkTargetByClass(ilCmiXapiExportGUI::class)
530 );
531 }
532
533 if ($this->cmixAccess->hasEditPermissionsAccess()) {
534 $DIC->tabs()->addTab(
535 self::TAB_ID_PERMISSIONS,
536 $DIC->language()->txt(self::TAB_ID_PERMISSIONS),
537 $DIC->ctrl()->getLinkTargetByClass(ilPermissionGUI::class, 'perm')
538 );
539 }
540
541 if (defined('DEVMODE') && DEVMODE) {
542 $DIC->tabs()->addTab(
543 'debug',
544 'DEBUG',
545 $DIC->ctrl()->getLinkTarget($this, 'debug')
546 );
547 }
548 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $DIC.

◆ trackObjectReadEvent()

ilObjCmiXapiGUI::trackObjectReadEvent ( )
protected

Definition at line 600 of file class.ilObjCmiXapiGUI.php.

600 : void
601 {
602 global $DIC;
603 /* @var \ILIAS\DI\Container $DIC */
604
606 $this->object->getType(),
607 $this->object->getRefId(),
608 $this->object->getId(),
609 $DIC->user()->getId()
610 );
611 }
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)

References $DIC, ilChangeEvent\_recordReadEvent(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

Field Documentation

◆ $cmixAccess

ilCmiXapiAccess ilObjCmiXapiGUI::$cmixAccess
private

Definition at line 58 of file class.ilObjCmiXapiGUI.php.

◆ CMD_FETCH_XAPI_STATEMENTS

const ilObjCmiXapiGUI::CMD_FETCH_XAPI_STATEMENTS = 'fetchXapiStatements'

Definition at line 52 of file class.ilObjCmiXapiGUI.php.

◆ CMD_INFO_SCREEN

◆ DEFAULT_CMD

const ilObjCmiXapiGUI::DEFAULT_CMD = self::CMD_INFO_SCREEN

Definition at line 54 of file class.ilObjCmiXapiGUI.php.

◆ NEW_OBJ_TITLE

const ilObjCmiXapiGUI::NEW_OBJ_TITLE = ""

Definition at line 56 of file class.ilObjCmiXapiGUI.php.

◆ TAB_ID_EXPORT

const ilObjCmiXapiGUI::TAB_ID_EXPORT = 'tab_export'

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

◆ TAB_ID_INFO

const ilObjCmiXapiGUI::TAB_ID_INFO = 'tab_info'

Definition at line 42 of file class.ilObjCmiXapiGUI.php.

◆ TAB_ID_LEARNING_PROGRESS

const ilObjCmiXapiGUI::TAB_ID_LEARNING_PROGRESS = 'learning_progress'

Definition at line 46 of file class.ilObjCmiXapiGUI.php.

◆ TAB_ID_METADATA

const ilObjCmiXapiGUI::TAB_ID_METADATA = 'tab_metadata'

Definition at line 47 of file class.ilObjCmiXapiGUI.php.

◆ TAB_ID_PERMISSIONS

const ilObjCmiXapiGUI::TAB_ID_PERMISSIONS = 'perm_settings'

Definition at line 49 of file class.ilObjCmiXapiGUI.php.

◆ TAB_ID_SCORING

const ilObjCmiXapiGUI::TAB_ID_SCORING = 'tab_scoring'

Definition at line 45 of file class.ilObjCmiXapiGUI.php.

◆ TAB_ID_SETTINGS

const ilObjCmiXapiGUI::TAB_ID_SETTINGS = 'tab_settings'

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

Referenced by ilObjCmiXapiAccess\_getCommands().

◆ TAB_ID_STATEMENTS

const ilObjCmiXapiGUI::TAB_ID_STATEMENTS = 'tab_statements'

Definition at line 44 of file class.ilObjCmiXapiGUI.php.


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