ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjCmiXapi Class Reference
+ Inheritance diagram for ilObjCmiXapi:
+ Collaboration diagram for ilObjCmiXapi:

Public Member Functions

 __construct ($a_id=0, $a_reference=true)
 ilObjCmiXapi constructor. More...
 
 getLrsTypeId ()
 
 setLrsTypeId ($lrsTypeId)
 
 getLrsType ()
 
 setLrsType ($lrsType)
 
 initLrsType ()
 
 getContentType ()
 
 setContentType ($contentType)
 
 isMixedContentType ()
 
 getSourceType ()
 
 isSourceTypeRemote ()
 
 isSourceTypeExternal ()
 
 setSourceType ($sourceType)
 
 getActivityId ()
 
 setActivityId ($activityId)
 
 getPublisherId ()
 
 setPublisherId ($publisherId)
 
 getInstructions ()
 
 setInstructions ($instructions)
 
 getLaunchUrl ()
 
 setLaunchUrl ($launchUrl)
 
 getLaunchParameters ()
 
 setLaunchParameters ($launchParameters)
 
 getMoveOn ()
 
 setMoveOn ($moveOn)
 
 getLPMode ()
 
 getLMSMoveOn ()
 
 getEntitlementKey ()
 
 setEntitlementKey ($entitlementKey)
 
 isAuthFetchUrlEnabled ()
 
 setAuthFetchUrlEnabled ($authFetchUrlEnabled)
 
 getLaunchMethod ()
 
 setLaunchMethod ($launchMethod)
 
 getLaunchMode ()
 
 setLaunchMode ($launchMode)
 
 isSwitchToReviewEnabled ()
 
 getSwitchToReviewEnabled ()
 
 setSwitchToReviewEnabled ($switchToReviewEnabled)
 
 getMasteryScore ()
 
 setMasteryScore ($masteryScore)
 
 getMasteryScorePercent ()
 
 setMasteryScorePercent ($masteryScorePercent)
 
 isKeepLpStatusEnabled ()
 
 setKeepLpStatusEnabled ($keepLpStatusEnabled)
 
 getPrivacyIdent ()
 
 setPrivacyIdent ($userIdent)
 
 getPrivacyName ()
 
 setPrivacyName ($userName)
 
 getOnlyMoveon ()
 
 setOnlyMoveon (bool $only_moveon)
 
 getAchieved ()
 
 setAchieved (bool $achieved)
 
 getAnswered ()
 
 setAnswered (bool $answered)
 
 getCompleted ()
 
 setCompleted (bool $completed)
 
 getFailed ()
 
 setFailed (bool $failed)
 
 getInitialized ()
 
 setInitialized (bool $initialized)
 
 getPassed ()
 
 setPassed (bool $passed)
 
 getProgressed ()
 
 setProgressed (bool $progressed)
 
 getSatisfied ()
 
 setSatisfied (bool $satisfied)
 
 getTerminated ()
 
 setTerminated (bool $terminated)
 
 getHideData ()
 
 setHideData (bool $hide_data)
 
 getTimestamp ()
 
 setTimestamp (bool $timestamp)
 
 getDuration ()
 
 setDuration (bool $duration)
 
 getNoSubstatements ()
 
 setNoSubstatements (bool $no_substatements)
 
 getUserPrivacyComment ()
 
 setUserPrivacyComment ($userPrivacyComment)
 
 isStatementsReportEnabled ()
 
 setStatementsReportEnabled ($statementsReportEnabled)
 
 getXmlManifest ()
 
 setXmlManifest ($xmlManifest)
 
 getVersion ()
 
 setVersion ($version)
 
 isBypassProxyEnabled ()
 
 setBypassProxyEnabled (bool $bypassProxyEnabled)
 
 doRead ()
 
 load ()
 
 doUpdate ()
 
 save ()
 
 setHighscoreEnabled ($a_enabled)
 Sets if the highscore feature should be enabled. More...
 
 getHighscoreEnabled ()
 Gets the setting which determines if the highscore feature is enabled. More...
 
 setHighscoreAchievedTS ($a_achieved_ts)
 Sets if the date and time of the scores achievement should be displayed. More...
 
 getHighscoreAchievedTS ()
 Returns if date and time of the scores achievement should be displayed. More...
 
 setHighscorePercentage ($a_percentage)
 Sets if the percentages of the scores pass should be shown. More...
 
 getHighscorePercentage ()
 Gets if the percentage column should be shown. More...
 
 setHighscoreWTime ($a_wtime)
 Sets if the workingtime of the scores should be shown. More...
 
 getHighscoreWTime ()
 Gets if the column with the workingtime should be shown. More...
 
 setHighscoreOwnTable ($a_own_table)
 Sets if the table with the own ranking should be shown. More...
 
 getHighscoreOwnTable ()
 Gets if the own rankings table should be shown. More...
 
 setHighscoreTopTable ($a_top_table)
 Sets if the top-rankings table should be shown. More...
 
 getHighscoreTopTable ()
 Gets, if the top-rankings table should be shown. More...
 
 setHighscoreTopNum ($a_top_num)
 Sets the number of entries which are to be shown in the top-rankings table. More...
 
 getHighscoreTopNum ($a_retval=10)
 Gets the number of entries which are to be shown in the top-rankings table. More...
 
 getHighscoreMode ()
 
 setHighscoreMode ($mode)
 
 getDataSetMapping ()
 
 getRegistrations ()
 
 getCurrentCmixUser ()
 
 getSessionId ($cmixUser=null)
 
 getLaunchData ($cmixUser=null, $lang='en')
 LMS.LaunchData. More...
 
 getLaunchedContextTemplate ($cmixUser=null)
 
 getStatement (string $verb, $cmixUser=null)
 blueprint statement More...
 
 getStatementActor ($cmixUser=null)
 statement actor More...
 
 getStatementExtensions ($cmixUser=null)
 Minimal extensions. More...
 
 getStatementContextActivities ()
 Minimal statementActivities. More...
 
 getStatementObject ()
 
 getLaunchedStatement ($cmixUser=null)
 
 getAbandonedStatement ($sessionId, $duration, $cmixUser=null)
 
 getSatisfiedStatement ($cmixUser=null)
 
 getLastStatement ($sess)
 get latest statement from session More...
 
 getLastStatementPipline ($sess)
 
 isActivationLimited ()
 
 setActivationLimited ($activationLimited)
 
 getActivationStartingTime ()
 
 setActivationStartingTime ($activationStartingTime)
 
 getActivationEndingTime ()
 
 setActivationEndingTime ($activationEndingTime)
 
 getActivationVisibility ()
 
 setActivationVisibility ($activationVisibility)
 
- Public Member Functions inherited from ilObject2
 __construct ($a_id=0, $a_reference=true)
 Constructor public. More...
 
 withReferences ()
 
 read ()
 Read data from db. More...
 
 setRefId ($a_id)
 
 getRefId ()
 
 getType ()
 
 setType ($a_type)
 
 getPresentationTitle ()
 
 getTitle ()
 
 getUntranslatedTitle ()
 
 setTitle ($a_title)
 
 getDescription ()
 
 setDescription ($a_desc)
 
 getLongDescription ()
 
 getImportId ()
 
 setImportId ($a_import_id)
 
 getOwner ()
 
 getOwnerName ()
 
 setOwner ($a_owner)
 
 getCreateDate ()
 
 getLastUpdateDate ()
 
 create ($a_clone_mode=false)
 
 update ()
 
 MDUpdateListener ($a_element)
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 
 putInTree ($a_parent_ref)
 
 setPermissions ($a_parent_ref)
 
 createReference ()
 
 countReferences ()
 
 delete ()
 
 initDefaultRoles ()
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 
 cloneMetaData ($target_obj)
 
 cloneObject ($a_target_id, $a_copy_id=null, $a_omit_tree=false)
 
 cloneDependencies ($a_target_id, $a_copy_id)
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id public More...
 
 setId ($a_id)
 set object id public More...
 
 setRefId ($a_id)
 set reference id public More...
 
 getRefId ()
 get reference id public More...
 
 getType ()
 get object type public More...
 
 setType ($a_type)
 set object type public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title public More...
 
 getUntranslatedTitle ()
 get untranslated object title public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 setOfflineStatus ($a_status)
 Set offline status. More...
 
 getOfflineStatus ()
 Get offline status. More...
 
 supportsOfflineHandling ()
 Check whether object supports offline handling. More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date public More...
 
 getLastUpdateDate ()
 get last update date public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static getInstance ($a_id=0, $a_reference=true)
 
static updatePrivacySettingsFromLrsType (ilCmiXapiLrsType $lrsType)
 
static updateByPassProxyFromLrsType (ilCmiXapiLrsType $lrsType)
 
static getObjectsHavingBypassProxyEnabledAndRegisteredUsers ()
 
static guidv4 ($data=null)
 
static iliasUrl ()
 
static log ()
 
- Static Public Member Functions inherited from ilObject2
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupOwnerName ($a_owner_id)
 
static _getIdForImportId ($a_import_id)
 
static _getAllReferences ($a_id)
 
static _lookupTitle ($a_id)
 
static _lookupOwner ($a_id)
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 
static _getLastUpdateOfObjects ($a_objs)
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id, $a_deleted_by)
 
static _resetDeletedDate ($a_ref_id)
 
static _lookupDeletedDate ($a_ref_id)
 
static _writeTitle ($a_obj_id, $a_title)
 
static _writeDescription ($a_obj_id, $a_desc)
 
static _writeImportId ($a_obj_id, $a_import_id)
 
static _lookupType ($a_id, $a_reference=false)
 
static _isInTrash ($a_ref_id)
 
static _hasUntrashedReference ($a_obj_id)
 
static _lookupObjectId ($a_ref_id)
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $a_show_path=true)
 
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static lookupOfflineStatus ($a_obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id, $a_deleted_by)
 
static setDeletedDates ($a_ref_ids, $a_user_id)
 Set deleted date. More...
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon ( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Data Fields

const PLUGIN = false
 
const DB_TABLE_NAME = 'cmix_settings'
 
const DB_USERS_TABLE_NAME = 'cmix_users'
 
const DB_RESULTS_TABLE_NAME = 'cmix_results'
 
const CONT_TYPE_GENERIC = 'generic'
 
const CONT_TYPE_CMI5 = 'cmi5'
 
const SRC_TYPE_REMOTE = 'remoteSource'
 
const SRC_TYPE_LOCAL = 'localSource'
 
const SRC_TYPE_EXTERNAL = 'externalSource'
 
const ANONYMOUS_HOMEPAGE = 'https://example.org'
 
const LAUNCH_METHOD_OWN_WIN = 'ownWin'
 
const LAUNCH_METHOD_NEW_WIN = 'newWin'
 
const LAUNCH_METHOD_IFRAME = 'iframe'
 
const LAUNCH_MODE_NORMAL = 'Normal'
 
const LAUNCH_MODE_BROWSE = 'Browse'
 
const LAUNCH_MODE_REVIEW = 'Review'
 
const LMS_MASTERY_SCORE = 0.7
 
const PRIVACY_IDENT_IL_UUID_USER_ID = 0
 
const PRIVACY_IDENT_IL_UUID_EXT_ACCOUNT = 1
 
const PRIVACY_IDENT_IL_UUID_LOGIN = 2
 
const PRIVACY_IDENT_REAL_EMAIL = 3
 
const PRIVACY_IDENT_IL_UUID_RANDOM = 4
 
const PRIVACY_IDENT_IL_UUID_SHA256 = 5
 
const PRIVACY_IDENT_IL_UUID_SHA256URL = 6
 
const PRIVACY_NAME_NONE = 0
 
const PRIVACY_NAME_FIRSTNAME = 1
 
const PRIVACY_NAME_LASTNAME = 2
 
const PRIVACY_NAME_FULLNAME = 3
 
const HIGHSCORE_SHOW_ALL_TABLES = 1
 
const HIGHSCORE_SHOW_TOP_TABLE = 2
 
const HIGHSCORE_SHOW_OWN_TABLE = 3
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $lng
 
 $id
 
 $ref_id
 
 $type
 
 $title
 
 $untranslatedTitle
 
 $desc
 
 $long_desc
 
 $owner
 
 $create_date
 
 $last_update
 
 $import_id
 
 $register = false
 
 $referenced
 
 $objectList
 
 $max_title
 
 $max_desc
 
 $add_dots
 

Protected Member Functions

 initType ()
 
 loadRepositoryActivationSettings ()
 
 saveRepositoryActivationSettings ()
 
 doCloneObject ($new_obj, $a_target_id, $a_copy_id=null, $a_omit_tree=false)
 Clone object. More...
 
 doDelete ()
 
- Protected Member Functions inherited from ilObject2
 initType ()
 
 doRead ()
 
 doCreate ()
 
 beforeCreate ()
 If overwritten this method should return true, there is currently no "abort" handling for cases where "false" is returned. More...
 
 doUpdate ()
 
 beforeUpdate ()
 
 doMDUpdateListener ($a_element)
 
 beforeMDUpdateListener ($a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDelete ()
 
 beforeDelete ()
 
 doCloneObject ($new_obj, $a_target_id, $a_copy_id=null)
 
 beforeCloneObject ()
 

Protected Attributes

 $activationLimited
 repository object activation settings (handled by ilObject) More...
 
 $activationStartingTime
 
 $activationEndingTime
 
 $activationVisibility
 
 $lrsTypeId
 
 $lrsType
 
 $contentType
 
 $sourceType
 
 $activityId
 
 $publisherId
 
 $instructions
 
 $launchUrl
 
 $launchParameters
 
 $moveOn
 
 $entitlementKey
 
 $authFetchUrlEnabled
 
 $anonymousHomePage = false
 
 $launchMethod
 
 $launchMode
 
 $switchToReviewEnabled
 
 $masteryScore
 
 $keepLpStatusEnabled
 
 $userIdent
 
 $userName
 
 $userPrivacyComment
 
 $statementsReportEnabled
 
 $xmlManifest
 
 $version
 
 $bypassProxyEnabled
 
 $only_moveon = false
 
 $achieved = true
 
 $answered = true
 
 $completed = true
 
 $failed = true
 
 $initialized = true
 
 $passed = true
 
 $progressed = true
 
 $satisfied = true
 
 $terminated = true
 
 $hide_data = false
 
 $timestamp = false
 
 $duration = true
 
 $no_substatements = false
 
 $currentCmixUser = null
 
 $_highscore_enabled = 0
 
 $anonymity = 0
 
 $_highscore_achieved_ts = 1
 
 $_highscore_percentage = 1
 
 $_highscore_wtime = 1
 
 $_highscore_own_table = 1
 
 $_highscore_top_table = 1
 
 $_highscore_top_num = 10
 
- Protected Attributes inherited from ilObject
 $objDefinition
 
 $db
 
 $log
 
 $error
 
 $tree
 
 $app_event_handler
 
 $rbacadmin
 
 $rbacreview
 

Detailed Description

Definition at line 15 of file class.ilObjCmiXapi.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjCmiXapi::__construct (   $a_id = 0,
  $a_reference = true 
)

ilObjCmiXapi constructor.

Parameters
int$a_id
bool$a_reference

Definition at line 231 of file class.ilObjCmiXapi.php.

References ILIAS\GlobalScreen\Provider\__construct().

232  {
233  $this->lrsTypeId = 0;
234  //$this->lrsType = $lrsType;
235 
236  $this->contentType = self::CONT_TYPE_GENERIC;
237  $this->sourceType = self::SRC_TYPE_REMOTE;
238 
239  $this->activityId = '';
240 
241  $this->publisherId = '';
242 
243  $this->instructions = '';
244 
245  $this->launchUrl = '';
246  $this->launchParameters = '';
247  $this->moveOn = '';
248  $this->entitlementKey = '';
249 
250  $this->authFetchUrlEnabled = 0;
251 
252  $this->launchMethod = self::LAUNCH_METHOD_NEW_WIN;
253  $this->launchMode = self::LAUNCH_MODE_NORMAL;
254 
255  $this->switchToReviewEnabled = 1;
256 
257  $this->masteryScore = self::LMS_MASTERY_SCORE;
258  $this->keepLpStatusEnabled = 1;
259 
260  $this->userIdent = self::PRIVACY_IDENT_IL_UUID_USER_ID;
261  $this->userName = self::PRIVACY_NAME_NONE;
262  $this->userPrivacyComment = '';
263 
264  $this->currentCmixUser = null;
265 
266  $this->statementsReportEnabled = 0;
267 
268  $this->xmlManifest = '';
269  $this->version = 0;
270 
271  $this->bypassProxyEnabled = false;
272 
273  parent::__construct($a_id, $a_reference);
274  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ doCloneObject()

ilObjCmiXapi::doCloneObject (   $new_obj,
  $a_target_id,
  $a_copy_id = null,
  $a_omit_tree = false 
)
protected

Clone object.

public

Parameters
intref_id of target container
intcopy id

Definition at line 1590 of file class.ilObjCmiXapi.php.

References $DIC, ilObject2\cloneMetaData(), getAchieved(), getActivityId(), getAnswered(), getCompleted(), getContentType(), getDuration(), getEntitlementKey(), getFailed(), getHideData(), getHighscoreAchievedTS(), getHighscoreEnabled(), getHighscoreOwnTable(), getHighscorePercentage(), getHighscoreTopNum(), getHighscoreTopTable(), getHighscoreWTime(), getInitialized(), getInstructions(), getLaunchMethod(), getLaunchMode(), getLaunchParameters(), getLaunchUrl(), getLrsTypeId(), getMasteryScore(), getMoveOn(), getNoSubstatements(), getOnlyMoveon(), getPassed(), getPrivacyIdent(), getPrivacyName(), getProgressed(), getPublisherId(), getSatisfied(), getSourceType(), getTerminated(), getTimestamp(), getUserPrivacyComment(), getVersion(), ilUtil\getWebspaceDir(), getXmlManifest(), isAuthFetchUrlEnabled(), isBypassProxyEnabled(), isKeepLpStatusEnabled(), isStatementsReportEnabled(), isSwitchToReviewEnabled(), and ilUtil\rCopy().

1591  {
1592  global $DIC; /* @var \ILIAS\DI\Container $DIC */
1593 
1594  $this->cloneMetaData($new_obj);
1595 
1596  $new_obj->setLrsTypeId($this->getLrsTypeId());
1597  $new_obj->setContentType($this->getContentType());
1598  $new_obj->setSourceType($this->getSourceType());
1599  $new_obj->setActivityId($this->getActivityId());
1600  $new_obj->setPublisherId($this->getPublisherId());
1601  $new_obj->setInstructions($this->getInstructions());
1602  $new_obj->setLaunchUrl($this->getLaunchUrl());
1603  $new_obj->setLaunchParameters($this->getLaunchParameters());
1604  $new_obj->setMoveOn($this->getMoveOn());
1605  $new_obj->setEntitlementKey($this->getEntitlementKey());
1606  $new_obj->setAuthFetchUrlEnabled($this->isAuthFetchUrlEnabled());
1607  $new_obj->setLaunchMethod($this->getLaunchMethod());
1608  $new_obj->setLaunchMode($this->getLaunchMode());
1609  $new_obj->setSwitchToReviewEnabled($this->isSwitchToReviewEnabled());
1610  $new_obj->setMasteryScore($this->getMasteryScore());
1611  $new_obj->setKeepLpStatusEnabled($this->isKeepLpStatusEnabled());
1612  $new_obj->setPrivacyIdent($this->getPrivacyIdent());
1613  $new_obj->setPrivacyName($this->getPrivacyName());
1614  $new_obj->setUserPrivacyComment($this->getUserPrivacyComment());
1615  $new_obj->setStatementsReportEnabled($this->isStatementsReportEnabled());
1616  $new_obj->setXmlManifest($this->getXmlManifest());
1617  $new_obj->setVersion($this->getVersion());
1618  $new_obj->setHighscoreEnabled($this->getHighscoreEnabled());
1619  $new_obj->setHighscoreAchievedTS($this->getHighscoreAchievedTS());
1620  $new_obj->setHighscorePercentage($this->getHighscorePercentage());
1621  $new_obj->setHighscoreWTime($this->getHighscoreWTime());
1622  $new_obj->setHighscoreOwnTable($this->getHighscoreOwnTable());
1623  $new_obj->setHighscoreTopTable($this->getHighscoreTopTable());
1624  $new_obj->setHighscoreTopNum($this->getHighscoreTopNum());
1625  $new_obj->setBypassProxyEnabled($this->isBypassProxyEnabled());
1626  $new_obj->setOnlyMoveon($this->getOnlyMoveon());
1627  $new_obj->setAchieved($this->getAchieved());
1628  $new_obj->setAnswered($this->getAnswered());
1629  $new_obj->setCompleted($this->getCompleted());
1630  $new_obj->setFailed($this->getFailed());
1631  $new_obj->setInitialized($this->getInitialized());
1632  $new_obj->setPassed($this->getPassed());
1633  $new_obj->setProgressed($this->getProgressed());
1634  $new_obj->setSatisfied($this->getSatisfied());
1635  $new_obj->setTerminated($this->getTerminated());
1636  $new_obj->setHideData($this->getHideData());
1637  $new_obj->setTimestamp($this->getTimestamp());
1638  $new_obj->setDuration($this->getDuration());
1639  $new_obj->setNoSubstatements($this->getNoSubstatements());
1640  $new_obj->update();
1641 
1642  if ($this->getSourceType() == self::SRC_TYPE_LOCAL) {
1643  $dirUtil = new ilCmiXapiContentUploadImporter($new_obj);
1644  $dirUtil->ensureCreatedObjectDirectory();
1645  $newDir = implode(DIRECTORY_SEPARATOR, [\ilUtil::getWebspaceDir(), $dirUtil->getWebDataDirRelativeObjectDirectory()]);
1646  $dirUtil = new ilCmiXapiContentUploadImporter($this);
1647  $thisDir = implode(DIRECTORY_SEPARATOR, [\ilUtil::getWebspaceDir(), $dirUtil->getWebDataDirRelativeObjectDirectory()]);
1648  ilUtil::rCopy($thisDir, $newDir);
1649  }
1650  }
getHighscoreTopTable()
Gets, if the top-rankings table should be shown.
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
getHighscoreWTime()
Gets if the column with the workingtime should be shown.
getHighscoreTopNum($a_retval=10)
Gets the number of entries which are to be shown in the top-rankings table.
getHighscoreOwnTable()
Gets if the own rankings table should be shown.
getHighscoreEnabled()
Gets the setting which determines if the highscore feature is enabled.
global $DIC
Definition: goto.php:24
getHighscorePercentage()
Gets if the percentage column should be shown.
static getWebspaceDir($mode="filesystem")
get webspace directory
getHighscoreAchievedTS()
Returns if date and time of the scores achievement should be displayed.
cloneMetaData($target_obj)
+ Here is the call graph for this function:

◆ doDelete()

ilObjCmiXapi::doDelete ( )
protected

Definition at line 1652 of file class.ilObjCmiXapi.php.

References $DIC, $ilDB, $query, ilHistory\_removeEntriesForObject(), ilUtil\delDir(), ilObject2\deleteMetaData(), ilObject\getId(), and ilUtil\getWebspaceDir().

1653  {
1654  global $DIC;
1655  $ilDB = $DIC['ilDB'];
1656 
1657  // delete file data entry
1658  $query = "DELETE FROM " . self::DB_TABLE_NAME . " WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer');
1659  $ilDB->manipulate($query);
1660 
1661  // delete history entries
1662  require_once("./Services/History/classes/class.ilHistory.php");
1664 
1665  // delete entire directory and its content
1666  $dirUtil = new ilCmiXapiContentUploadImporter($this);
1667  $thisDir = implode(DIRECTORY_SEPARATOR, [\ilUtil::getWebspaceDir(), $dirUtil->getWebDataDirRelativeObjectDirectory()]);
1668  if (is_dir($thisDir)) {
1669  ilUtil::delDir($thisDir);
1670  }
1671 
1672  // delete meta data
1673  $this->deleteMetaData();
1674 
1675  //delete results
1676  $query = "DELETE FROM " . self::DB_RESULTS_TABLE_NAME .
1677  " WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer') . " ";
1678  $ilDB->manipulate($query);
1679 
1680  // TODO check xapidel
1681  }
getId()
get object id public
global $DIC
Definition: goto.php:24
$query
global $ilDB
static _removeEntriesForObject($a_obj_id)
remove all history entries for an object
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static getWebspaceDir($mode="filesystem")
get webspace directory
+ Here is the call graph for this function:

◆ doRead()

ilObjCmiXapi::doRead ( )

Definition at line 996 of file class.ilObjCmiXapi.php.

References load().

Referenced by getDataSetMapping().

997  {
998  $this->load();
999  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doUpdate()

ilObjCmiXapi::doUpdate ( )

Definition at line 1073 of file class.ilObjCmiXapi.php.

References save().

1074  {
1075  $this->save();
1076  }
+ Here is the call graph for this function:

◆ getAbandonedStatement()

ilObjCmiXapi::getAbandonedStatement (   $sessionId,
  $duration,
  $cmixUser = null 
)

Definition at line 1983 of file class.ilObjCmiXapi.php.

References $duration, getCurrentCmixUser(), and getStatement().

1984  {
1985  if (null === $cmixUser) {
1986  $cmixUser = $this->getCurrentCmixUser();
1987  }
1988  $statement = $this->getStatement('abandoned', $cmixUser);
1989  // overwrite session with abandoned oldSession
1990  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/sessionid'] = $sessionId;
1991  $statement['result'] = array(
1992  'duration' => $duration
1993  );
1994  return $statement;
1995  }
getStatement(string $verb, $cmixUser=null)
blueprint statement
+ Here is the call graph for this function:

◆ getAchieved()

ilObjCmiXapi::getAchieved ( )
Returns
bool

Definition at line 711 of file class.ilObjCmiXapi.php.

References $achieved.

Referenced by doCloneObject(), getDataSetMapping(), and save().

711  : bool
712  {
713  return $this->achieved;
714  }
+ Here is the caller graph for this function:

◆ getActivationEndingTime()

ilObjCmiXapi::getActivationEndingTime ( )
Returns
int

Definition at line 2157 of file class.ilObjCmiXapi.php.

References $activationEndingTime.

Referenced by saveRepositoryActivationSettings().

2158  {
2160  }
+ Here is the caller graph for this function:

◆ getActivationStartingTime()

ilObjCmiXapi::getActivationStartingTime ( )
Returns
int

Definition at line 2141 of file class.ilObjCmiXapi.php.

References $activationStartingTime.

Referenced by saveRepositoryActivationSettings().

2142  {
2144  }
+ Here is the caller graph for this function:

◆ getActivationVisibility()

ilObjCmiXapi::getActivationVisibility ( )
Returns
bool

Definition at line 2173 of file class.ilObjCmiXapi.php.

References $activationVisibility.

Referenced by saveRepositoryActivationSettings().

2174  {
2176  }
+ Here is the caller graph for this function:

◆ getActivityId()

ilObjCmiXapi::getActivityId ( )

◆ getAnswered()

ilObjCmiXapi::getAnswered ( )
Returns
bool

Definition at line 727 of file class.ilObjCmiXapi.php.

References $answered.

Referenced by doCloneObject(), getDataSetMapping(), and save().

727  : bool
728  {
729  return $this->answered;
730  }
+ Here is the caller graph for this function:

◆ getCompleted()

ilObjCmiXapi::getCompleted ( )
Returns
bool

Definition at line 743 of file class.ilObjCmiXapi.php.

References $completed.

Referenced by doCloneObject(), getDataSetMapping(), and save().

743  : bool
744  {
745  return $this->completed;
746  }
+ Here is the caller graph for this function:

◆ getContentType()

ilObjCmiXapi::getContentType ( )
Returns
string

Definition at line 327 of file class.ilObjCmiXapi.php.

References $contentType.

Referenced by doCloneObject(), getDataSetMapping(), getLastStatementPipline(), getStatementActor(), ilCmiXapiHighscoreReport\initTableData(), isMixedContentType(), and save().

328  {
329  return $this->contentType;
330  }
+ Here is the caller graph for this function:

◆ getCurrentCmixUser()

ilObjCmiXapi::getCurrentCmixUser ( )

Definition at line 1713 of file class.ilObjCmiXapi.php.

References $currentCmixUser, $DIC, ilObject\getId(), and getPrivacyIdent().

Referenced by getAbandonedStatement(), getLaunchData(), getLaunchedContextTemplate(), getLaunchedStatement(), getSatisfiedStatement(), getSessionId(), getStatement(), getStatementActor(), and getStatementExtensions().

1714  {
1715  global $DIC;
1716  if (null === $this->currentCmixUser) {
1717  $this->currentCmixUser = new ilCmiXapiUser($this->getId(), $DIC->user()->getId(), $this->getPrivacyIdent());
1718  }
1719  return $this->currentCmixUser;
1720  }
getId()
get object id public
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDataSetMapping()

ilObjCmiXapi::getDataSetMapping ( )

Definition at line 1528 of file class.ilObjCmiXapi.php.

References $lrsTypeId, doRead(), getAchieved(), getActivityId(), getAnswered(), getCompleted(), getContentType(), getDuration(), getEntitlementKey(), getFailed(), getHideData(), getHighscoreAchievedTS(), getHighscoreEnabled(), getHighscoreOwnTable(), getHighscorePercentage(), getHighscoreTopNum(), getHighscoreTopTable(), getHighscoreWTime(), ilObject\getId(), getInitialized(), getInstructions(), getLaunchMethod(), getLaunchMode(), getLaunchParameters(), getLaunchUrl(), getLrsTypeId(), getMasteryScore(), getMoveOn(), getNoSubstatements(), getOnlyMoveon(), getPassed(), getPrivacyIdent(), getPrivacyName(), getProgressed(), getPublisherId(), getSatisfied(), getSourceType(), getTerminated(), getTimestamp(), getUserPrivacyComment(), getVersion(), getXmlManifest(), isAuthFetchUrlEnabled(), isKeepLpStatusEnabled(), isStatementsReportEnabled(), and isSwitchToReviewEnabled().

1529  {
1530  if (null === ($lrsTypeId = $this->getLrsTypeId())) {
1531  $this->doRead();
1532  }
1533  $mapping = [
1534  'obj_id' => $this->getId(),
1535  'lrs_type_id' => $this->getLrsTypeId(),
1536  'content_type' => $this->getContentType(),
1537  'source_type' => $this->getSourceType(),
1538  'activity_id' => $this->getActivityId(),
1539  'publisher_id' => $this->getPublisherId(),
1540  'instructions' => $this->getInstructions(),
1541  'launch_url' => $this->getLaunchUrl(),
1542  'launch_parameters' => $this->getLaunchParameters(),
1543  'moveon' => $this->getMoveOn(),
1544  'entitlement_key' => $this->getEntitlementKey(),
1545  'auth_fetch_url' => (int) $this->isAuthFetchUrlEnabled(),
1546  'launch_method' => $this->getLaunchMethod(),
1547  'launch_mode' => $this->getLaunchMode(),
1548  'switch_to_review' => (int) $this->isSwitchToReviewEnabled(),
1549  'mastery_score' => $this->getMasteryScore(),
1550  'keep_lp' => (int) $this->isKeepLpStatusEnabled(),
1551  'privacy_ident' => $this->getPrivacyIdent(),
1552  'privacy_name' => $this->getPrivacyName(),
1553  'usr_privacy_comment' => $this->getUserPrivacyComment(),
1554  'show_statements' => (int) $this->isStatementsReportEnabled(),
1555  'xml_manifest' => $this->getXmlManifest(),
1556  'version' => $this->getVersion(),
1557  'highscore_enabled' => (int) $this->getHighscoreEnabled(),
1558  'highscore_achieved_ts' => (int) $this->getHighscoreAchievedTS(),
1559  'highscore_percentage' => (int) $this->getHighscorePercentage(),
1560  'highscore_wtime' => (int) $this->getHighscoreWTime(),
1561  'highscore_own_table' => (int) $this->getHighscoreOwnTable(),
1562  'highscore_top_table' => (int) $this->getHighscoreTopTable(),
1563  'highscore_top_num' => (int) $this->getHighscoreTopNum(),
1564  'only_moveon' => (int) $this->getOnlyMoveon(),
1565  'achieved' => (int) $this->getAchieved(),
1566  'answered' => (int) $this->getAnswered(),
1567  'completed' => (int) $this->getCompleted(),
1568  'failed' => (int) $this->getFailed(),
1569  'initialized' => (int) $this->getInitialized(),
1570  'passed' => (int) $this->getPassed(),
1571  'progressed' => (int) $this->getProgressed(),
1572  'satisfied' => (int) $this->getSatisfied(),
1573  'c_terminated' => (int) $this->getTerminated(),
1574  'hide_data' => (int) $this->getHideData(),
1575  'c_timestamp' => (int) $this->getTimestamp(),
1576  'duration' => (int) $this->getDuration(),
1577  'no_substatements' => (int) $this->getNoSubstatements()
1578  //'bypass_proxy' => (int) $this->isBypassProxyEnabled()
1579  ];
1580  return $mapping;
1581  }
getHighscoreTopTable()
Gets, if the top-rankings table should be shown.
getHighscoreWTime()
Gets if the column with the workingtime should be shown.
getHighscoreTopNum($a_retval=10)
Gets the number of entries which are to be shown in the top-rankings table.
getHighscoreOwnTable()
Gets if the own rankings table should be shown.
getHighscoreEnabled()
Gets the setting which determines if the highscore feature is enabled.
getId()
get object id public
getHighscorePercentage()
Gets if the percentage column should be shown.
getHighscoreAchievedTS()
Returns if date and time of the scores achievement should be displayed.
+ Here is the call graph for this function:

◆ getDuration()

ilObjCmiXapi::getDuration ( )
Returns
bool

Definition at line 887 of file class.ilObjCmiXapi.php.

References $duration.

Referenced by doCloneObject(), getDataSetMapping(), and save().

887  : bool
888  {
889  return $this->duration;
890  }
+ Here is the caller graph for this function:

◆ getEntitlementKey()

ilObjCmiXapi::getEntitlementKey ( )
Returns
string

Definition at line 527 of file class.ilObjCmiXapi.php.

References $entitlementKey.

Referenced by doCloneObject(), getDataSetMapping(), getLaunchData(), and save().

528  {
529  return $this->entitlementKey;
530  }
+ Here is the caller graph for this function:

◆ getFailed()

ilObjCmiXapi::getFailed ( )
Returns
bool

Definition at line 759 of file class.ilObjCmiXapi.php.

References $failed.

Referenced by doCloneObject(), getDataSetMapping(), and save().

759  : bool
760  {
761  return $this->failed;
762  }
+ Here is the caller graph for this function:

◆ getHideData()

ilObjCmiXapi::getHideData ( )
Returns
bool

Definition at line 855 of file class.ilObjCmiXapi.php.

References $hide_data.

Referenced by doCloneObject(), getDataSetMapping(), and save().

855  : bool
856  {
857  return $this->hide_data;
858  }
+ Here is the caller graph for this function:

◆ getHighscoreAchievedTS()

ilObjCmiXapi::getHighscoreAchievedTS ( )

Returns if date and time of the scores achievement should be displayed.

Returns
bool True, if column should be shown.

Definition at line 1369 of file class.ilObjCmiXapi.php.

References $_highscore_achieved_ts.

Referenced by doCloneObject(), getDataSetMapping(), and save().

1370  {
1371  return (bool) $this->_highscore_achieved_ts;
1372  }
+ Here is the caller graph for this function:

◆ getHighscoreEnabled()

ilObjCmiXapi::getHighscoreEnabled ( )

Gets the setting which determines if the highscore feature is enabled.

Returns
bool True, if highscore is enabled.

Definition at line 1349 of file class.ilObjCmiXapi.php.

References $_highscore_enabled.

Referenced by doCloneObject(), getDataSetMapping(), and save().

1350  {
1351  return (bool) $this->_highscore_enabled;
1352  }
+ Here is the caller graph for this function:

◆ getHighscoreMode()

ilObjCmiXapi::getHighscoreMode ( )
Returns
int

Definition at line 1486 of file class.ilObjCmiXapi.php.

References getHighscoreOwnTable(), and getHighscoreTopTable().

1487  {
1488  switch (true) {
1489  case $this->getHighscoreOwnTable() && $this->getHighscoreTopTable():
1490  return self::HIGHSCORE_SHOW_ALL_TABLES;
1491 
1492  case $this->getHighscoreTopTable():
1493  return self::HIGHSCORE_SHOW_TOP_TABLE;
1494 
1495  case $this->getHighscoreOwnTable():
1496  default:
1497  return self::HIGHSCORE_SHOW_OWN_TABLE;
1498  }
1499  }
getHighscoreTopTable()
Gets, if the top-rankings table should be shown.
getHighscoreOwnTable()
Gets if the own rankings table should be shown.
+ Here is the call graph for this function:

◆ getHighscoreOwnTable()

ilObjCmiXapi::getHighscoreOwnTable ( )

Gets if the own rankings table should be shown.

Returns
bool True, if the own rankings table should be shown.

Definition at line 1429 of file class.ilObjCmiXapi.php.

References $_highscore_own_table.

Referenced by doCloneObject(), getDataSetMapping(), getHighscoreMode(), and save().

1430  {
1431  return (bool) $this->_highscore_own_table;
1432  }
+ Here is the caller graph for this function:

◆ getHighscorePercentage()

ilObjCmiXapi::getHighscorePercentage ( )

Gets if the percentage column should be shown.

Returns
bool True, if percentage column should be shown.

Definition at line 1389 of file class.ilObjCmiXapi.php.

References $_highscore_percentage.

Referenced by doCloneObject(), getDataSetMapping(), and save().

1390  {
1391  return (bool) $this->_highscore_percentage;
1392  }
+ Here is the caller graph for this function:

◆ getHighscoreTopNum()

ilObjCmiXapi::getHighscoreTopNum (   $a_retval = 10)

Gets the number of entries which are to be shown in the top-rankings table.

Default: 10 entries

Parameters
integer$a_retvalOptional return value if nothing is set, defaults to 10.
Returns
integer Number of entries to be shown in the top-rankings table.

Definition at line 1473 of file class.ilObjCmiXapi.php.

References $_highscore_top_num.

Referenced by doCloneObject(), getDataSetMapping(), and save().

1474  {
1475  $retval = $a_retval;
1476  if ((int) $this->_highscore_top_num != 0) {
1477  $retval = $this->_highscore_top_num;
1478  }
1479 
1480  return $retval;
1481  }
+ Here is the caller graph for this function:

◆ getHighscoreTopTable()

ilObjCmiXapi::getHighscoreTopTable ( )

Gets, if the top-rankings table should be shown.

Returns
bool True, if top-rankings table should be shown.

Definition at line 1449 of file class.ilObjCmiXapi.php.

References $_highscore_top_table.

Referenced by doCloneObject(), getDataSetMapping(), getHighscoreMode(), and save().

1450  {
1451  return (bool) $this->_highscore_top_table;
1452  }
+ Here is the caller graph for this function:

◆ getHighscoreWTime()

ilObjCmiXapi::getHighscoreWTime ( )

Gets if the column with the workingtime should be shown.

Returns
bool True, if the workingtime column should be shown.

Definition at line 1409 of file class.ilObjCmiXapi.php.

References $_highscore_wtime.

Referenced by doCloneObject(), getDataSetMapping(), and save().

1410  {
1411  return (bool) $this->_highscore_wtime;
1412  }
+ Here is the caller graph for this function:

◆ getInitialized()

ilObjCmiXapi::getInitialized ( )
Returns
bool

Definition at line 775 of file class.ilObjCmiXapi.php.

References $initialized.

Referenced by doCloneObject(), getDataSetMapping(), and save().

775  : bool
776  {
777  return $this->initialized;
778  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilObjCmiXapi::getInstance (   $a_id = 0,
  $a_reference = true 
)
static

Definition at line 277 of file class.ilObjCmiXapi.php.

Referenced by XapiProxy\XapiProxyRequest\handleGetStatementsRequest().

278  {
279  return new self($a_id, $a_reference);
280  }
+ Here is the caller graph for this function:

◆ getInstructions()

ilObjCmiXapi::getInstructions ( )
Returns
string

Definition at line 422 of file class.ilObjCmiXapi.php.

References $instructions.

Referenced by doCloneObject(), getDataSetMapping(), and save().

423  {
424  return $this->instructions;
425  }
+ Here is the caller graph for this function:

◆ getLastStatement()

ilObjCmiXapi::getLastStatement (   $sess)

get latest statement from session

Definition at line 2014 of file class.ilObjCmiXapi.php.

References $client, $DIC, Vendor\Package\$e, $lrsType, ilCmiXapiAbstractRequest\checkResponse(), getLastStatementPipline(), getLrsType(), and log().

2015  {
2016  global $DIC;
2017  $lrsType = $this->getLrsType();
2018 
2019  //$this->getLrsEndpoint())) . '/api/' . self::ENDPOINT_AGGREGATE_SUFFIX;
2020  $defaultLrs = $lrsType->getLrsEndpointStatementsAggregationLink();
2021  //$fallbackLrs = $lrsType->getLrsFallbackEndpoint();
2022  $defaultBasicAuth = $lrsType->getBasicAuth();
2023  //$fallbackBasicAuth = $lrsType->getFallbackBasicAuth();
2024  $defaultHeaders = [
2025  'X-Experience-API-Version' => '1.0.3',
2026  'Authorization' => $defaultBasicAuth,
2027  'Cache-Control' => 'no-cache, no-store, must-revalidate'
2028  ];
2029  /*
2030  $fallbackHeaders = [
2031  'X-Experience-API-Version' => '1.0.3',
2032  'Authorization' => $fallbackBasicAuth,
2033  'Content-Type' => 'application/json;charset=utf-8',
2034  'Cache-Control' => 'no-cache, no-store, must-revalidate'
2035  ];
2036  */
2037  $pipeline = json_encode($this->getLastStatementPipline($sess));
2038  $defaultLastStatementUrl = $defaultLrs . "?pipeline=" . urlencode($pipeline);
2039  $client = new GuzzleHttp\Client();
2040  $req_opts = array(
2041  GuzzleHttp\RequestOptions::VERIFY => true,
2042  GuzzleHttp\RequestOptions::CONNECT_TIMEOUT => 10,
2043  GuzzleHttp\RequestOptions::HTTP_ERRORS => false
2044  );
2045  $defaultLastStatementRequest = new GuzzleHttp\Psr7\Request(
2046  'GET',
2047  $defaultLastStatementUrl,
2048  $defaultHeaders
2049  );
2050  $promises = array();
2051  $promises['defaultLastStatement'] = $client->sendAsync($defaultLastStatementRequest, $req_opts);
2052  try {
2053  $responses = GuzzleHttp\Promise\Utils::settle($promises)->wait();
2054  $body = '';
2055  ilCmiXapiAbstractRequest::checkResponse($responses['defaultLastStatement'], $body, [200]);
2056  return json_decode($body, JSON_OBJECT_AS_ARRAY);
2057  } catch (Exception $e) {
2058  $this->log()->error('error:' . $e->getMessage());
2059  return null;
2060  }
2061  }
if($_SERVER['argc']< 4) $client
Definition: cron.php:12
getLastStatementPipline($sess)
global $DIC
Definition: goto.php:24
static checkResponse($response, &$body, $allowedStatus=[200, 204])
+ Here is the call graph for this function:

◆ getLastStatementPipline()

ilObjCmiXapi::getLastStatementPipline (   $sess)

Definition at line 2063 of file class.ilObjCmiXapi.php.

References $activityId, $DIC, CONT_TYPE_CMI5, getActivityId(), getContentType(), and isMixedContentType().

Referenced by getLastStatement().

2064  {
2065  global $DIC;
2066  $pipeline = array();
2067 
2068  // filter activityId
2069  $match = array();
2070  $match['statement.object.objectType'] = 'Activity';
2071  $match['statement.actor.objectType'] = 'Agent';
2072 
2073  $activityId = array();
2074 
2075  if ($this->getContentType() == ilObjCmiXapi::CONT_TYPE_CMI5 && !$this->isMixedContentType()) {
2076  // https://github.com/AICC/CMI-5_Spec_Current/blob/quartz/cmi5_spec.md#963-extensions
2077  $activityId['statement.context.extensions.https://ilias&46;de/cmi5/activityid'] = $this->getActivityId();
2078  } else {
2079  $activityQuery = [
2080  '$regex' => '^' . preg_quote($this->getActivityId()) . ''
2081  ];
2082  $activityId['$or'] = [];
2083  $activityId['$or'][] = ['statement.object.id' => $activityQuery];
2084  $activityId['$or'][] = ['statement.context.contextActivities.parent.id' => $activityQuery];
2085  $activityId['$or'][] = ['statement.context.contextActivities.grouping.id' => $activityQuery];
2086  }
2087 
2088  $sessionId = array();
2089  $sessionId['statement.context.extensions.https://w3id&46;org/xapi/cmi5/context/extensions/sessionid'] = $sess;
2090  $match['$and'] = array();
2091  $match['$and'][] = $activityId;
2092  $match['$and'][] = $sessionId;
2093  $sort = array('statement.timestamp' => -1);
2094  $project = array('statement.timestamp' => 1, 'statement.verb.id' => 1);
2095  $pipeline[] = array('$match' => $match);
2096  $pipeline[] = array('$sort' => $sort);
2097  $pipeline[] = array('$limit' => 1);
2098  $pipeline[] = array('$project' => $project);
2099 
2100  return $pipeline;
2101  }
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLaunchData()

ilObjCmiXapi::getLaunchData (   $cmixUser = null,
  $lang = 'en' 
)

LMS.LaunchData.

Definition at line 1733 of file class.ilObjCmiXapi.php.

References $launchMode, $moveOn, ilLink\_getStaticLink(), getCurrentCmixUser(), getEntitlementKey(), getLaunchedContextTemplate(), getLaunchMethod(), getLaunchMode(), getLaunchParameters(), getLMSMoveOn(), getMasteryScore(), ilObject2\getRefId(), ilObject2\getType(), and isSwitchToReviewEnabled().

1734  {
1735  if (null === $cmixUser) {
1736  $cmixUser = $this->getCurrentCmixUser();
1737  }
1738  // ToDo
1739  $moveOn = $this->getLMSMoveOn();
1740  if (!$moveOn || $moveOn == '') {
1741  $moveOn = 'Completed';
1742  }
1743  $launchMode = $this->getLaunchMode();
1744  // only check switch if self::LAUNCH_MODE_NORMAL
1745  if ($launchMode == self::LAUNCH_MODE_NORMAL) {
1746  if ($cmixUser->getSatisfied() && $this->isSwitchToReviewEnabled()) {
1747  $launchMode = self::LAUNCH_MODE_REVIEW;
1748  }
1749  }
1750  $ctxTemplate = [
1751  "contextTemplate" => $this->getLaunchedContextTemplate($cmixUser),
1752  "launchMode" => ucfirst($launchMode),
1753  "launchMethod" => "OwnWindow",
1754  "moveOn" => $moveOn
1755  ];
1756  $lmsLaunchMethod = $this->getLaunchMethod();
1757  if ($lmsLaunchMethod === "ownWin") {
1758  include_once('./Services/Link/classes/class.ilLink.php');
1759  $href = ilLink::_getStaticLink(
1760  $this->getRefId(),
1761  $this->getType()
1762  );
1763  $ctxTemplate['returnURL'] = $href;
1764  } else {
1765  $ctxTemplate['returnURL'] = ILIAS_HTTP_PATH . "/Modules/CmiXapi/xapiexit.php?lang={$lang}";
1766  }
1767  if (!empty($this->getMasteryScore())) {
1768  $ctxTemplate['masteryScore'] = $this->getMasteryScore();
1769  }
1770  if (!empty($this->getLaunchParameters())) {
1771  $ctxTemplate['launchParameters'] = $this->getLaunchParameters();
1772  }
1773  if (!empty($this->getEntitlementKey())) {
1774  $ctxTemplate['entitlementKey'] = array("courseStructure" => $this->getEntitlementKey());
1775  }
1776  return $ctxTemplate;
1777  }
getLaunchedContextTemplate($cmixUser=null)
+ Here is the call graph for this function:

◆ getLaunchedContextTemplate()

ilObjCmiXapi::getLaunchedContextTemplate (   $cmixUser = null)

Definition at line 1779 of file class.ilObjCmiXapi.php.

References $launchMode, getCurrentCmixUser(), getLaunchMode(), getLaunchParameters(), getLMSMoveOn(), getMasteryScore(), getStatementContextActivities(), getStatementExtensions(), and isSwitchToReviewEnabled().

Referenced by getLaunchData().

1780  {
1781  if (null === $cmixUser) {
1782  $cmixUser = $this->getCurrentCmixUser();
1783  }
1784  $launchMode = $this->getLaunchMode();
1785  // only check switch if self::LAUNCH_MODE_NORMAL
1786  if ($launchMode == self::LAUNCH_MODE_NORMAL) {
1787  if ($cmixUser->getSatisfied() && $this->isSwitchToReviewEnabled()) {
1788  $launchMode = self::LAUNCH_MODE_REVIEW;
1789  }
1790  }
1791  $extensions = $this->getStatementExtensions($cmixUser);
1792  $extensions['https://w3id.org/xapi/cmi5/context/extensions/launchmode'] = $launchMode;
1793  if (!empty($this->getLMSMoveOn())) {
1794  $extensions['https://w3id.org/xapi/cmi5/context/extensions/moveon'] = $this->getLMSMoveOn();
1795  }
1796  if (!empty($this->getLaunchParameters())) {
1797  $extensions['https://w3id.org/xapi/cmi5/context/extensions/launchparameters'] = $this->getLaunchParameters();
1798  }
1799  if (!empty($this->getMasteryScore())) {
1800  $extensions['https://w3id.org/xapi/cmi5/context/extensions/masteryscore'] = $this->getMasteryScore();
1801  }
1802  $contextTemplate = array(
1803  "contextActivities" => $this->getStatementContextActivities(),
1804  "extensions" => $extensions
1805  );
1806  return $contextTemplate;
1807  }
getStatementExtensions($cmixUser=null)
Minimal extensions.
getStatementContextActivities()
Minimal statementActivities.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLaunchedStatement()

ilObjCmiXapi::getLaunchedStatement (   $cmixUser = null)

Definition at line 1956 of file class.ilObjCmiXapi.php.

References $launchMode, getCurrentCmixUser(), getLaunchMode(), getLaunchParameters(), getLMSMoveOn(), getMasteryScore(), getStatement(), and isSwitchToReviewEnabled().

1957  {
1958  if (null === $cmixUser) {
1959  $cmixUser = $this->getCurrentCmixUser();
1960  }
1961  $launchMode = $this->getLaunchMode();
1962  // only check switch if self::LAUNCH_MODE_NORMAL
1963  if ($launchMode == self::LAUNCH_MODE_NORMAL) {
1964  if ($cmixUser->getSatisfied() && $this->isSwitchToReviewEnabled()) {
1965  $launchMode = self::LAUNCH_MODE_REVIEW;
1966  }
1967  }
1968 
1969  $statement = $this->getStatement('launched', $cmixUser);
1970  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/launchmode'] = $launchMode;
1971  if (!empty($this->getLMSMoveOn())) {
1972  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/moveon'] = $this->getLMSMoveOn();
1973  }
1974  if (!empty($this->getLaunchParameters())) {
1975  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/launchparameters'] = $this->getLaunchParameters();
1976  }
1977  if (!empty($this->getMasteryScore())) {
1978  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/masteryscore'] = $this->getMasteryScore();
1979  }
1980  return $statement;
1981  }
getStatement(string $verb, $cmixUser=null)
blueprint statement
+ Here is the call graph for this function:

◆ getLaunchMethod()

ilObjCmiXapi::getLaunchMethod ( )
Returns
string

Definition at line 559 of file class.ilObjCmiXapi.php.

References $launchMethod.

Referenced by doCloneObject(), getDataSetMapping(), getLaunchData(), and save().

560  {
561  return $this->launchMethod;
562  }
+ Here is the caller graph for this function:

◆ getLaunchMode()

ilObjCmiXapi::getLaunchMode ( )
Returns
string

Definition at line 575 of file class.ilObjCmiXapi.php.

Referenced by doCloneObject(), getDataSetMapping(), getLaunchData(), getLaunchedContextTemplate(), getLaunchedStatement(), and save().

576  {
577  return ucfirst($this->launchMode);
578  }
+ Here is the caller graph for this function:

◆ getLaunchParameters()

ilObjCmiXapi::getLaunchParameters ( )
Returns
string

Definition at line 454 of file class.ilObjCmiXapi.php.

References $launchParameters.

Referenced by doCloneObject(), getDataSetMapping(), getLaunchData(), getLaunchedContextTemplate(), getLaunchedStatement(), and save().

455  {
457  }
+ Here is the caller graph for this function:

◆ getLaunchUrl()

ilObjCmiXapi::getLaunchUrl ( )
Returns
string

Definition at line 438 of file class.ilObjCmiXapi.php.

References $launchUrl.

Referenced by doCloneObject(), getDataSetMapping(), and save().

439  {
440  return $this->launchUrl;
441  }
+ Here is the caller graph for this function:

◆ getLMSMoveOn()

ilObjCmiXapi::getLMSMoveOn ( )
Returns
string ilCmiXapiLP::const for CMI5 statements | state moveOn values

Definition at line 501 of file class.ilObjCmiXapi.php.

References $moveOn, getLPMode(), ilLPObjSettings\LP_MODE_CMIX_COMPL_OR_PASSED_WITH_FAILED, ilLPObjSettings\LP_MODE_CMIX_COMPL_WITH_FAILED, ilLPObjSettings\LP_MODE_CMIX_COMPLETED, ilLPObjSettings\LP_MODE_CMIX_COMPLETED_OR_PASSED, ilLPObjSettings\LP_MODE_CMIX_PASSED, ilLPObjSettings\LP_MODE_CMIX_PASSED_WITH_FAILED, ilLPObjSettings\LP_MODE_DEACTIVATED, ilCmiXapiLP\MOVEON_COMPLETED, ilCmiXapiLP\MOVEON_COMPLETED_OR_PASSED, ilCmiXapiLP\MOVEON_NOT_APPLICABLE, and ilCmiXapiLP\MOVEON_PASSED.

Referenced by getLaunchData(), getLaunchedContextTemplate(), and getLaunchedStatement().

502  {
504  switch ($this->getLPMode()) {
507  break;
511  break;
515  break;
519  break;
520  }
521  return $moveOn;
522  }
const MOVEON_NOT_APPLICABLE
const LP_MODE_CMIX_COMPL_OR_PASSED_WITH_FAILED
const MOVEON_COMPLETED_OR_PASSED
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLPMode()

ilObjCmiXapi::getLPMode ( )
Returns
int ilLPObjSettings::const only for internal LMS usage

Definition at line 491 of file class.ilObjCmiXapi.php.

References ilObject\getId(), and ilObjectLP\getInstance().

Referenced by getLMSMoveOn().

492  {
493  $olp = ilObjectLP::getInstance($this->getId());
494  return $olp->getCurrentMode();
495  }
getId()
get object id public
static getInstance($a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLrsType()

ilObjCmiXapi::getLrsType ( )
Returns
ilCmiXapiLrsType

Definition at line 306 of file class.ilObjCmiXapi.php.

References $lrsType.

Referenced by ilXapiCompliantStatementsReportLinkBuilder\__construct(), getLastStatement(), and ilXapiResultsCronjob\getXapiStatementsReport().

307  {
308  return $this->lrsType;
309  }
+ Here is the caller graph for this function:

◆ getLrsTypeId()

ilObjCmiXapi::getLrsTypeId ( )
Returns
int

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

References $lrsTypeId.

Referenced by doCloneObject(), getDataSetMapping(), initLrsType(), and save().

291  {
292  return $this->lrsTypeId;
293  }
+ Here is the caller graph for this function:

◆ getMasteryScore()

ilObjCmiXapi::getMasteryScore ( )
Returns
float

Definition at line 615 of file class.ilObjCmiXapi.php.

References $masteryScore.

Referenced by doCloneObject(), getDataSetMapping(), getLaunchData(), getLaunchedContextTemplate(), getLaunchedStatement(), and save().

616  {
617  return $this->masteryScore;
618  }
+ Here is the caller graph for this function:

◆ getMasteryScorePercent()

ilObjCmiXapi::getMasteryScorePercent ( )
Returns
float

Definition at line 631 of file class.ilObjCmiXapi.php.

632  {
633  return $this->masteryScore * 100;
634  }

◆ getMoveOn()

ilObjCmiXapi::getMoveOn ( )
Returns
string Attention: this is the original imported moveOn for using in LaunchData and LaunchStatement use getLMSMoveOn!

Definition at line 472 of file class.ilObjCmiXapi.php.

References $moveOn.

Referenced by doCloneObject(), getDataSetMapping(), and save().

473  {
474  return $this->moveOn;
475  }
+ Here is the caller graph for this function:

◆ getNoSubstatements()

ilObjCmiXapi::getNoSubstatements ( )
Returns
bool

Definition at line 903 of file class.ilObjCmiXapi.php.

References $no_substatements.

Referenced by doCloneObject(), getDataSetMapping(), and save().

903  : bool
904  {
906  }
+ Here is the caller graph for this function:

◆ getObjectsHavingBypassProxyEnabledAndRegisteredUsers()

static ilObjCmiXapi::getObjectsHavingBypassProxyEnabledAndRegisteredUsers ( )
static

Definition at line 1261 of file class.ilObjCmiXapi.php.

References $DIC, $query, and $res.

Referenced by ilXapiResultsCronjob\getObjectsToBeReported().

1262  {
1263  global $DIC; /* @var \ILIAS\DI\Container $DIC */
1264 
1265  $query = "
1266  SELECT DISTINCT s.obj_id FROM " . self::DB_TABLE_NAME . " s
1267  INNER JOIN " . self::DB_USERS_TABLE_NAME . " u ON u.obj_id = s.obj_id
1268  WHERE bypass_proxy = %s
1269  ";
1270 
1271  $res = $DIC->database()->queryF($query, array('integer'), array(1));
1272 
1273  $objects = array();
1274 
1275  while ($row = $DIC->database()->fetchAssoc($res)) {
1276  $objects[] = $row['obj_id'];
1277  }
1278 
1279  return $objects;
1280  }
foreach($_POST as $key=> $value) $res
global $DIC
Definition: goto.php:24
$query
+ Here is the caller graph for this function:

◆ getOnlyMoveon()

ilObjCmiXapi::getOnlyMoveon ( )
Returns
bool

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

References $only_moveon.

Referenced by doCloneObject(), getDataSetMapping(), and save().

695  : bool
696  {
697  return $this->only_moveon;
698  }
+ Here is the caller graph for this function:

◆ getPassed()

ilObjCmiXapi::getPassed ( )
Returns
bool

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

References $passed.

Referenced by doCloneObject(), getDataSetMapping(), and save().

791  : bool
792  {
793  return $this->passed;
794  }
+ Here is the caller graph for this function:

◆ getPrivacyIdent()

ilObjCmiXapi::getPrivacyIdent ( )
Returns
string

Definition at line 663 of file class.ilObjCmiXapi.php.

References $userIdent.

Referenced by ilCmiXapiRegistrationGUI\__construct(), doCloneObject(), getCurrentCmixUser(), getDataSetMapping(), and save().

664  {
665  return $this->userIdent;
666  }
+ Here is the caller graph for this function:

◆ getPrivacyName()

ilObjCmiXapi::getPrivacyName ( )
Returns
string

Definition at line 679 of file class.ilObjCmiXapi.php.

References $userName.

Referenced by doCloneObject(), getDataSetMapping(), getStatementActor(), and save().

680  {
681  return $this->userName;
682  }
+ Here is the caller graph for this function:

◆ getProgressed()

ilObjCmiXapi::getProgressed ( )
Returns
bool

Definition at line 807 of file class.ilObjCmiXapi.php.

References $progressed.

Referenced by doCloneObject(), getDataSetMapping(), and save().

807  : bool
808  {
809  return $this->progressed;
810  }
+ Here is the caller graph for this function:

◆ getPublisherId()

ilObjCmiXapi::getPublisherId ( )
Returns
string

Definition at line 406 of file class.ilObjCmiXapi.php.

References $publisherId.

Referenced by doCloneObject(), getDataSetMapping(), getStatementContextActivities(), isMixedContentType(), and save().

407  {
408  return $this->publisherId;
409  }
+ Here is the caller graph for this function:

◆ getRegistrations()

ilObjCmiXapi::getRegistrations ( )

Definition at line 1683 of file class.ilObjCmiXapi.php.

References $DIC, $res, $ret, and ilObject\getId().

1684  {
1685  global $DIC;
1686  $res = $DIC->database()->queryF(
1687  "SELECT DISTINCT registration FROM " . self::DB_USERS_TABLE_NAME . " WHERE obj_id = %s",
1688  array('text'),
1689  array($this->getId())
1690  );
1691  $ret = [];
1692  while ($row = $DIC->database()->fetchAssoc($res)) {
1693  $ret[] = $row['registration'];
1694  }
1695  return $ret;
1696  }
foreach($_POST as $key=> $value) $res
getId()
get object id public
global $DIC
Definition: goto.php:24
$ret
Definition: parser.php:6
+ Here is the call graph for this function:

◆ getSatisfied()

ilObjCmiXapi::getSatisfied ( )
Returns
bool

Definition at line 823 of file class.ilObjCmiXapi.php.

References $satisfied.

Referenced by doCloneObject(), getDataSetMapping(), and save().

823  : bool
824  {
825  return $this->satisfied;
826  }
+ Here is the caller graph for this function:

◆ getSatisfiedStatement()

ilObjCmiXapi::getSatisfiedStatement (   $cmixUser = null)

Definition at line 1997 of file class.ilObjCmiXapi.php.

References ilObject\$type, getCurrentCmixUser(), and getStatement().

1998  {
1999  if (null === $cmixUser) {
2000  $cmixUser = $this->getCurrentCmixUser();
2001  }
2002  $statement = $this->getStatement('satisfied', $cmixUser);
2003  // add type, see https://aicc.github.io/CMI-5_Spec_Current/samples/scenarios/16-not_applicable-no_launch/#satisfied-statement
2004  // see also: https://github.com/AICC/CMI-5_Spec_Current/blob/quartz/cmi5_spec.md#verbs_satisfied
2005  $type = "https://w3id.org/xapi/cmi5/activitytype/course";
2006  $statement['object']['definition']['type'] = $type;
2007  $statement['context']['contextActivities']['grouping'][0]['definition']['type'] = $type;
2008  return $statement;
2009  }
getStatement(string $verb, $cmixUser=null)
blueprint statement
+ Here is the call graph for this function:

◆ getSessionId()

ilObjCmiXapi::getSessionId (   $cmixUser = null)

Definition at line 1722 of file class.ilObjCmiXapi.php.

References ilCmiXapiAuthToken\getCmi5SessionByUsrIdAndObjIdAndRefId(), getCurrentCmixUser(), ilObject\getId(), and ilObject2\getRefId().

Referenced by getStatementExtensions().

1723  {
1724  if (null === $cmixUser) {
1725  $cmixUser = $this->getCurrentCmixUser();
1726  }
1727  return ilCmiXapiAuthToken::getCmi5SessionByUsrIdAndObjIdAndRefId($cmixUser->getUsrId(), $this->getId(), $this->getRefId());
1728  }
getId()
get object id public
static getCmi5SessionByUsrIdAndObjIdAndRefId(int $usrId, int $objId, $refId=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSourceType()

ilObjCmiXapi::getSourceType ( )
Returns
string

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

References $sourceType.

Referenced by doCloneObject(), getDataSetMapping(), and save().

359  {
360  return $this->sourceType;
361  }
+ Here is the caller graph for this function:

◆ getStatement()

ilObjCmiXapi::getStatement ( string  $verb,
  $cmixUser = null 
)

blueprint statement

Definition at line 1812 of file class.ilObjCmiXapi.php.

References ilObject\$id, getCurrentCmixUser(), ilCmiXapiVerbList\getInstance(), getStatementActor(), getStatementContextActivities(), getStatementExtensions(), and getStatementObject().

Referenced by getAbandonedStatement(), getLaunchedStatement(), and getSatisfiedStatement().

1813  {
1814  if (null === $cmixUser) {
1815  $cmixUser = $this->getCurrentCmixUser();
1816  }
1817  $id = self::guidv4();
1818  $actor = $this->getStatementActor($cmixUser);
1819  $verbUri = ilCmiXapiVerbList::getInstance()->getVerbUri($verb);
1820  $extensions = $this->getStatementExtensions($cmixUser);
1821  $registration = $cmixUser->getRegistration();
1822  $contextActivities = $this->getStatementContextActivities();
1823  $object = $this->getStatementObject();
1824  $statement = array(
1825  'id' => $id,
1826  'actor' => $actor,
1827  'verb' =>
1828  array(
1829  'id' => $verbUri
1830  ),
1831  'context' =>
1832  array(
1833  'extensions' => $extensions,
1834  'registration' => $registration,
1835  'contextActivities' => $contextActivities
1836  ),
1837  'object' => $object
1838  );
1839  return $statement;
1840  }
getStatementExtensions($cmixUser=null)
Minimal extensions.
getStatementActor($cmixUser=null)
statement actor
getStatementContextActivities()
Minimal statementActivities.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStatementActor()

ilObjCmiXapi::getStatementActor (   $cmixUser = null)

statement actor

Definition at line 1845 of file class.ilObjCmiXapi.php.

References $DIC, $name, getContentType(), getCurrentCmixUser(), ilCmiXapiUser\getName(), getPrivacyName(), and log().

Referenced by getStatement().

1846  {
1847  global $DIC;
1848  if (null === $cmixUser) {
1849  $cmixUser = $this->getCurrentCmixUser();
1850  }
1851  $user = new ilObjUser($cmixUser->getUsrId()); // ToDo: Caching Names
1853  if ($name == '') {
1854  $this->log()->error('error: no name in cmixuser');
1855  $name = 'UNDEFINED';
1856  }
1857  $homePage = ($this->anonymousHomePage == true) ? self::ANONYMOUS_HOMEPAGE : self::iliasUrl();
1858  if ($this->getContentType() == self::CONT_TYPE_CMI5) {
1859  $actor = [
1860  'objectType' => 'Agent',
1861  'account' => [
1862  'homePage' => $homePage,
1863  'name' => $cmixUser->getUsrIdent()
1864  ]
1865  ];
1866  if ($name !== '') {
1867  $actor['name'] = $name;
1868  }
1869  } else {
1870  $actor = [
1871  'objectType' => 'Agent',
1872  'mbox' => 'mailto:' . $cmixUser->getUsrIdent()
1873  ];
1874  if ($name !== '') {
1875  $actor['name'] = $name;
1876  }
1877  }
1878  return $actor;
1879  }
static getName($userNameMode, ilObjUser $user)
if($format !==null) $name
Definition: metadata.php:230
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStatementContextActivities()

ilObjCmiXapi::getStatementContextActivities ( )

Minimal statementActivities.

Definition at line 1899 of file class.ilObjCmiXapi.php.

References $activityId, $publisherId, getActivityId(), ilObject2\getDescription(), getPublisherId(), and ilObject2\getTitle().

Referenced by getLaunchedContextTemplate(), and getStatement().

1900  {
1901  $publisherId = $this->getPublisherId();
1902  $activityId = $this->getActivityId();
1903  if (empty($publisherId)) {
1905  }
1906  $ctxActivities = array(
1907  "grouping" => [
1908  [
1909  "objectType" => "Activity",
1910  "id" => "{$publisherId}",
1911  'definition' =>
1912  array(
1913  'name' =>
1914  array(
1915  'de-DE' => $this->getTitle(),
1916  'en-US' => $this->getTitle()
1917  ),
1918  'description' =>
1919  array(
1920  'de-DE' => $this->getDescription(),
1921  'en-US' => $this->getDescription()
1922  )
1923  )]
1924  ],
1925  "category" => [
1926  [
1927  "id" => "https://w3id.org/xapi/cmi5/context/categories/cmi5",
1928  "objectType" => "Activity"
1929  ]
1930  ]
1931  );
1932  return $ctxActivities;
1933  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStatementExtensions()

ilObjCmiXapi::getStatementExtensions (   $cmixUser = null)

Minimal extensions.

Definition at line 1884 of file class.ilObjCmiXapi.php.

References getActivityId(), getCurrentCmixUser(), and getSessionId().

Referenced by getLaunchedContextTemplate(), and getStatement().

1885  {
1886  if (null === $cmixUser) {
1887  $cmixUser = $this->getCurrentCmixUser();
1888  }
1889  $extensions = array(
1890  'https://w3id.org/xapi/cmi5/context/extensions/sessionid' => $this->getSessionId($cmixUser),
1891  'https://ilias.de/cmi5/activityid' => $this->getActivityId()
1892  );
1893  return $extensions;
1894  }
getSessionId($cmixUser=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStatementObject()

ilObjCmiXapi::getStatementObject ( )

Definition at line 1935 of file class.ilObjCmiXapi.php.

References getActivityId(), ilObject2\getDescription(), and ilObject2\getTitle().

Referenced by getStatement().

1936  {
1937  $object = array(
1938  'id' => $this->getActivityId(),
1939  'definition' =>
1940  array(
1941  'name' =>
1942  array(
1943  'de-DE' => $this->getTitle(),
1944  'en-US' => $this->getTitle()
1945  ),
1946  'description' =>
1947  array(
1948  'de-DE' => $this->getDescription(),
1949  'en-US' => $this->getDescription()
1950  )
1951  )
1952  );
1953  return $object;
1954  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSwitchToReviewEnabled()

ilObjCmiXapi::getSwitchToReviewEnabled ( )
Returns
bool

Definition at line 599 of file class.ilObjCmiXapi.php.

References $switchToReviewEnabled.

600  {
602  }

◆ getTerminated()

ilObjCmiXapi::getTerminated ( )
Returns
bool

Definition at line 839 of file class.ilObjCmiXapi.php.

References $terminated.

Referenced by doCloneObject(), getDataSetMapping(), and save().

839  : bool
840  {
841  return $this->terminated;
842  }
+ Here is the caller graph for this function:

◆ getTimestamp()

ilObjCmiXapi::getTimestamp ( )
Returns
bool

Definition at line 871 of file class.ilObjCmiXapi.php.

References $timestamp.

Referenced by doCloneObject(), getDataSetMapping(), and save().

871  : bool
872  {
873  return $this->timestamp;
874  }
+ Here is the caller graph for this function:

◆ getUserPrivacyComment()

ilObjCmiXapi::getUserPrivacyComment ( )
Returns
string

Definition at line 919 of file class.ilObjCmiXapi.php.

References $userPrivacyComment.

Referenced by doCloneObject(), getDataSetMapping(), and save().

920  {
922  }
+ Here is the caller graph for this function:

◆ getVersion()

ilObjCmiXapi::getVersion ( )
Returns
int

Definition at line 967 of file class.ilObjCmiXapi.php.

References $version.

Referenced by doCloneObject(), getDataSetMapping(), and save().

968  {
969  return $this->version;
970  }
+ Here is the caller graph for this function:

◆ getXmlManifest()

ilObjCmiXapi::getXmlManifest ( )
Returns
string

Definition at line 951 of file class.ilObjCmiXapi.php.

References $xmlManifest.

Referenced by doCloneObject(), getDataSetMapping(), and save().

952  {
953  return $this->xmlManifest;
954  }
+ Here is the caller graph for this function:

◆ guidv4()

static ilObjCmiXapi::guidv4 (   $data = null)
static

Definition at line 1698 of file class.ilObjCmiXapi.php.

References $data.

Referenced by ilCmiXapiLaunchGUI\CMI5preLaunch().

1699  {
1700  // Generate 16 bytes (128 bits) of random data or use the data passed into the function.
1701  $data = $data ?? random_bytes(16);
1702  assert(strlen($data) == 16);
1703 
1704  // Set version to 0100
1705  $data[6] = chr(ord($data[6]) & 0x0f | 0x40);
1706  // Set bits 6-7 to 10
1707  $data[8] = chr(ord($data[8]) & 0x3f | 0x80);
1708 
1709  // Output the 36 character UUID.
1710  return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
1711  }
$data
Definition: storeScorm.php:23
+ Here is the caller graph for this function:

◆ iliasUrl()

static ilObjCmiXapi::iliasUrl ( )
static

Definition at line 2103 of file class.ilObjCmiXapi.php.

References $GLOBALS, and ILIAS\FileDelivery\http().

2104  {
2105  $regex = '/^(https?\:\/\/[^\/]+).*/';
2106  preg_match($regex, $GLOBALS['DIC']->http()->request()->getUri(), $request_parts);
2107  return $request_parts[1];
2108  }
static http()
Fetches the global http state from ILIAS.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
+ Here is the call graph for this function:

◆ initLrsType()

ilObjCmiXapi::initLrsType ( )

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

References getLrsTypeId(), and setLrsType().

Referenced by load().

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

◆ initType()

ilObjCmiXapi::initType ( )
protected

Definition at line 282 of file class.ilObjCmiXapi.php.

282  : void
283  {
284  $this->type = "cmix";
285  }

◆ isActivationLimited()

ilObjCmiXapi::isActivationLimited ( )
Returns
bool

Definition at line 2124 of file class.ilObjCmiXapi.php.

References $activationLimited.

Referenced by saveRepositoryActivationSettings().

2125  {
2126  return $this->activationLimited;
2127  }
$activationLimited
repository object activation settings (handled by ilObject)
+ Here is the caller graph for this function:

◆ isAuthFetchUrlEnabled()

ilObjCmiXapi::isAuthFetchUrlEnabled ( )
Returns
bool

Definition at line 543 of file class.ilObjCmiXapi.php.

References $authFetchUrlEnabled.

Referenced by doCloneObject(), getDataSetMapping(), and save().

544  {
546  }
+ Here is the caller graph for this function:

◆ isBypassProxyEnabled()

ilObjCmiXapi::isBypassProxyEnabled ( )
Returns
bool

Definition at line 983 of file class.ilObjCmiXapi.php.

References $bypassProxyEnabled.

Referenced by doCloneObject(), and save().

983  : bool
984  {
986  }
+ Here is the caller graph for this function:

◆ isKeepLpStatusEnabled()

ilObjCmiXapi::isKeepLpStatusEnabled ( )
Returns
bool

Definition at line 647 of file class.ilObjCmiXapi.php.

References $keepLpStatusEnabled.

Referenced by doCloneObject(), getDataSetMapping(), and save().

648  {
650  }
+ Here is the caller graph for this function:

◆ isMixedContentType()

ilObjCmiXapi::isMixedContentType ( )
Parameters
string$contentType

Definition at line 347 of file class.ilObjCmiXapi.php.

References getContentType(), and getPublisherId().

Referenced by getLastStatementPipline(), and ilCmiXapiHighscoreReport\initTableData().

347  : bool
348  {
349  // after 21-07-24 and before cmi5 refactoring
350  // launched before cmi5 refactoring ident in: statement.actor.mbox
351  // launched after cmi5 refactoring ident in: statement.actor.account.name
352  return (($this->getContentType() == self::CONT_TYPE_CMI5) && empty($this->getPublisherId()));
353  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSourceTypeExternal()

ilObjCmiXapi::isSourceTypeExternal ( )
Returns
bool

Definition at line 374 of file class.ilObjCmiXapi.php.

375  {
376  return $this->sourceType == self::SRC_TYPE_EXTERNAL;
377  }

◆ isSourceTypeRemote()

ilObjCmiXapi::isSourceTypeRemote ( )
Returns
bool

Definition at line 366 of file class.ilObjCmiXapi.php.

367  {
368  return $this->sourceType == self::SRC_TYPE_REMOTE;
369  }

◆ isStatementsReportEnabled()

ilObjCmiXapi::isStatementsReportEnabled ( )
Returns
bool

Definition at line 935 of file class.ilObjCmiXapi.php.

References $statementsReportEnabled.

Referenced by doCloneObject(), getDataSetMapping(), and save().

936  {
938  }
+ Here is the caller graph for this function:

◆ isSwitchToReviewEnabled()

ilObjCmiXapi::isSwitchToReviewEnabled ( )
Returns
bool

Definition at line 591 of file class.ilObjCmiXapi.php.

References $switchToReviewEnabled.

Referenced by doCloneObject(), getDataSetMapping(), getLaunchData(), getLaunchedContextTemplate(), getLaunchedStatement(), and save().

592  {
594  }
+ Here is the caller graph for this function:

◆ load()

ilObjCmiXapi::load ( )

Definition at line 1001 of file class.ilObjCmiXapi.php.

References $DIC, $query, $res, ilObject\getId(), initLrsType(), loadRepositoryActivationSettings(), setAchieved(), setActivityId(), setAnswered(), setAuthFetchUrlEnabled(), setBypassProxyEnabled(), setCompleted(), setContentType(), setDuration(), setEntitlementKey(), setFailed(), setHideData(), setHighscoreAchievedTS(), setHighscoreEnabled(), setHighscoreOwnTable(), setHighscorePercentage(), setHighscoreTopNum(), setHighscoreTopTable(), setHighscoreWTime(), setInitialized(), setInstructions(), setKeepLpStatusEnabled(), setLaunchMethod(), setLaunchMode(), setLaunchParameters(), setLaunchUrl(), setLrsTypeId(), setMasteryScore(), setMoveOn(), setNoSubstatements(), setOnlyMoveon(), setPassed(), setPrivacyIdent(), setPrivacyName(), setProgressed(), setPublisherId(), setSatisfied(), setSourceType(), setStatementsReportEnabled(), setSwitchToReviewEnabled(), setTerminated(), setTimestamp(), setUserPrivacyComment(), setVersion(), and setXmlManifest().

Referenced by doRead().

1002  {
1003  global $DIC; /* @var \ILIAS\DI\Container $DIC */
1004 
1005  $query = "SELECT * FROM " . self::DB_TABLE_NAME . " WHERE obj_id = %s";
1006  $res = $DIC->database()->queryF($query, ['integer'], [$this->getId()]);
1007 
1008  while ($row = $DIC->database()->fetchAssoc($res)) {
1009  if ($row['lrs_type_id']) {
1010  $this->setLrsTypeId((int) $row['lrs_type_id']);
1011  $this->initLrsType();
1012  }
1013 
1014  $this->setContentType($row['content_type']);
1015  $this->setSourceType($row['source_type']);
1016 
1017  $this->setActivityId($row['activity_id']);
1018  $this->setPublisherId($row['publisher_id']);
1019  $this->setInstructions($row['instructions']);
1020 
1021  $this->setLaunchUrl($row['launch_url']);
1022  $this->setLaunchParameters($row['launch_parameters']);
1023  $this->setMoveOn($row['moveon']);
1024  $this->setEntitlementKey($row['entitlement_key']);
1025  $this->setAuthFetchUrlEnabled((bool) $row['auth_fetch_url']);
1026 
1027  $this->setLaunchMethod($row['launch_method']);
1028 
1029  $this->setLaunchMode($row['launch_mode']);
1030  $this->setSwitchToReviewEnabled((bool) $row['switch_to_review']);
1031  $this->setMasteryScore((float) $row['mastery_score']);
1032  $this->setKeepLpStatusEnabled((bool) $row['keep_lp']);
1033 
1034  $this->setPrivacyIdent($row['privacy_ident']);
1035  $this->setPrivacyName($row['privacy_name']);
1036 
1037  $this->setOnlyMoveon((bool) $row['only_moveon']);
1038  $this->setAchieved((bool) $row['achieved']);
1039  $this->setAnswered((bool) $row['answered']);
1040  $this->setCompleted((bool) $row['completed']);
1041  $this->setFailed((bool) $row['failed']);
1042  $this->setInitialized((bool) $row['initialized']);
1043  $this->setPassed((bool) $row['passed']);
1044  $this->setProgressed((bool) $row['progressed']);
1045  $this->setSatisfied((bool) $row['satisfied']);
1046  $this->setTerminated((bool) $row['c_terminated']);
1047  $this->setHideData((bool) $row['hide_data']);
1048  $this->setTimestamp((bool) $row['c_timestamp']);
1049  $this->setDuration((bool) $row['duration']);
1050  $this->setNoSubstatements((bool) $row['no_substatements']);
1051 
1052  $this->setUserPrivacyComment($row['usr_privacy_comment']);
1053 
1054  $this->setStatementsReportEnabled((bool) $row['show_statements']);
1055 
1056  $this->setXmlManifest($row['xml_manifest']);
1057  $this->setVersion((int) $row['version']);
1058 
1059  $this->setBypassProxyEnabled((bool) $row['bypass_proxy']);
1060 
1061  $this->setHighscoreEnabled((bool) $row['highscore_enabled']);
1062  $this->setHighscoreAchievedTS((bool) $row['highscore_achieved_ts']);
1063  $this->setHighscorePercentage((bool) $row['highscore_percentage']);
1064  $this->setHighscoreWTime((bool) $row['highscore_wtime']);
1065  $this->setHighscoreOwnTable((bool) $row['highscore_own_table']);
1066  $this->setHighscoreTopTable((bool) $row['highscore_top_table']);
1067  $this->setHighscoreTopNum((int) $row['highscore_top_num']);
1068  }
1069 
1071  }
setDuration(bool $duration)
setAuthFetchUrlEnabled($authFetchUrlEnabled)
setInstructions($instructions)
setEntitlementKey($entitlementKey)
setNoSubstatements(bool $no_substatements)
setOnlyMoveon(bool $only_moveon)
setAchieved(bool $achieved)
setLaunchUrl($launchUrl)
setMasteryScore($masteryScore)
setContentType($contentType)
setLaunchMode($launchMode)
setBypassProxyEnabled(bool $bypassProxyEnabled)
setTerminated(bool $terminated)
setFailed(bool $failed)
setHighscoreTopTable($a_top_table)
Sets if the top-rankings table should be shown.
setPassed(bool $passed)
foreach($_POST as $key=> $value) $res
getId()
get object id public
setLrsTypeId($lrsTypeId)
setKeepLpStatusEnabled($keepLpStatusEnabled)
setCompleted(bool $completed)
global $DIC
Definition: goto.php:24
setSwitchToReviewEnabled($switchToReviewEnabled)
$query
setXmlManifest($xmlManifest)
setHighscoreEnabled($a_enabled)
Sets if the highscore feature should be enabled.
setPrivacyIdent($userIdent)
setLaunchParameters($launchParameters)
setInitialized(bool $initialized)
setProgressed(bool $progressed)
setPublisherId($publisherId)
setActivityId($activityId)
setSatisfied(bool $satisfied)
setPrivacyName($userName)
setTimestamp(bool $timestamp)
setAnswered(bool $answered)
setHighscoreOwnTable($a_own_table)
Sets if the table with the own ranking should be shown.
setStatementsReportEnabled($statementsReportEnabled)
setHideData(bool $hide_data)
setLaunchMethod($launchMethod)
setSourceType($sourceType)
setHighscoreWTime($a_wtime)
Sets if the workingtime of the scores should be shown.
setHighscoreAchievedTS($a_achieved_ts)
Sets if the date and time of the scores achievement should be displayed.
setHighscoreTopNum($a_top_num)
Sets the number of entries which are to be shown in the top-rankings table.
setUserPrivacyComment($userPrivacyComment)
setHighscorePercentage($a_percentage)
Sets if the percentages of the scores pass should be shown.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadRepositoryActivationSettings()

ilObjCmiXapi::loadRepositoryActivationSettings ( )
protected

Definition at line 1134 of file class.ilObjCmiXapi.php.

References ilObjectActivation\getItem(), setActivationEndingTime(), setActivationLimited(), setActivationStartingTime(), setActivationVisibility(), and ilObjectActivation\TIMINGS_ACTIVATION.

Referenced by load().

1135  {
1136  if ($this->ref_id) {
1137  include_once "./Services/Object/classes/class.ilObjectActivation.php";
1138  $activation = ilObjectActivation::getItem($this->ref_id);
1139  switch ($activation["timing_type"]) {
1141  $this->setActivationLimited(true);
1142  $this->setActivationStartingTime($activation["timing_start"]);
1143  $this->setActivationEndingTime($activation["timing_end"]);
1144  $this->setActivationVisibility($activation["visible"]);
1145  break;
1146 
1147  default:
1148  $this->setActivationLimited(false);
1149  break;
1150  }
1151  }
1152  }
static getItem($a_ref_id)
Get item data.
setActivationEndingTime($activationEndingTime)
setActivationLimited($activationLimited)
setActivationStartingTime($activationStartingTime)
setActivationVisibility($activationVisibility)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ log()

static ilObjCmiXapi::log ( )
static

Definition at line 2110 of file class.ilObjCmiXapi.php.

References ilObject\$log.

Referenced by ilCmiXapiAbstractRequest\checkResponse(), getLastStatement(), getStatementActor(), and ilCmiXapiAbstractRequest\sendRequest().

2111  {
2112  global $log;
2113  if (self::PLUGIN) {
2114  return $log;
2115  } else {
2116  return \ilLoggerFactory::getLogger('cmix');
2117  }
2118  }
+ Here is the caller graph for this function:

◆ save()

ilObjCmiXapi::save ( )

Definition at line 1078 of file class.ilObjCmiXapi.php.

References $DIC, getAchieved(), getActivityId(), getAnswered(), getCompleted(), getContentType(), getDuration(), getEntitlementKey(), getFailed(), getHideData(), getHighscoreAchievedTS(), getHighscoreEnabled(), getHighscoreOwnTable(), getHighscorePercentage(), getHighscoreTopNum(), getHighscoreTopTable(), getHighscoreWTime(), ilObject\getId(), getInitialized(), getInstructions(), getLaunchMethod(), getLaunchMode(), getLaunchParameters(), getLaunchUrl(), getLrsTypeId(), getMasteryScore(), getMoveOn(), getNoSubstatements(), getOnlyMoveon(), getPassed(), getPrivacyIdent(), getPrivacyName(), getProgressed(), getPublisherId(), getSatisfied(), getSourceType(), getTerminated(), getTimestamp(), getUserPrivacyComment(), getVersion(), getXmlManifest(), isAuthFetchUrlEnabled(), isBypassProxyEnabled(), isKeepLpStatusEnabled(), isStatementsReportEnabled(), isSwitchToReviewEnabled(), and saveRepositoryActivationSettings().

Referenced by doUpdate().

1079  {
1080  global $DIC; /* @var \ILIAS\DI\Container $DIC */
1081 
1082  $DIC->database()->replace(self::DB_TABLE_NAME, [
1083  'obj_id' => ['integer', $this->getId()]
1084  ], [
1085  'lrs_type_id' => ['integer', $this->getLrsTypeId()],
1086  'content_type' => ['text', $this->getContentType()],
1087  'source_type' => ['text', $this->getSourceType()],
1088  'activity_id' => ['text', $this->getActivityId()],
1089  'publisher_id' => ['text', $this->getPublisherId()],
1090  'instructions' => ['text', $this->getInstructions()],
1091  'launch_url' => ['text', $this->getLaunchUrl()],
1092  'launch_parameters' => ['text', $this->getLaunchParameters()],
1093  'moveon' => ['text', $this->getMoveOn()],
1094  'entitlement_key' => ['text', $this->getEntitlementKey()],
1095  'auth_fetch_url' => ['integer', (int) $this->isAuthFetchUrlEnabled()],
1096  'launch_method' => ['text', $this->getLaunchMethod()],
1097  'launch_mode' => ['text', $this->getLaunchMode()],
1098  'switch_to_review' => ['integer', (int) $this->isSwitchToReviewEnabled()],
1099  'mastery_score' => ['float', $this->getMasteryScore()],
1100  'keep_lp' => ['integer', (int) $this->isKeepLpStatusEnabled()],
1101  'privacy_ident' => ['integer', $this->getPrivacyIdent()],
1102  'privacy_name' => ['integer', $this->getPrivacyName()],
1103  'usr_privacy_comment' => ['text', $this->getUserPrivacyComment()],
1104  'show_statements' => ['integer', (int) $this->isStatementsReportEnabled()],
1105  'xml_manifest' => ['text', $this->getXmlManifest()],
1106  'version' => ['integer', $this->getVersion()],
1107  'bypass_proxy' => ['integer', (int) $this->isBypassProxyEnabled()],
1108  'highscore_enabled' => ['integer', (int) $this->getHighscoreEnabled()],
1109  'highscore_achieved_ts' => ['integer', (int) $this->getHighscoreAchievedTS()],
1110  'highscore_percentage' => ['integer', (int) $this->getHighscorePercentage()],
1111  'highscore_wtime' => ['integer', (int) $this->getHighscoreWTime()],
1112  'highscore_own_table' => ['integer', (int) $this->getHighscoreOwnTable()],
1113  'highscore_top_table' => ['integer', (int) $this->getHighscoreTopTable()],
1114  'highscore_top_num' => ['integer', (int) $this->getHighscoreTopNum()],
1115  'only_moveon' => ['integer', (int) $this->getOnlyMoveon()],
1116  'achieved' => ['integer', (int) $this->getAchieved()],
1117  'answered' => ['integer', (int) $this->getAnswered()],
1118  'completed' => ['integer', (int) $this->getCompleted()],
1119  'failed' => ['integer', (int) $this->getFailed()],
1120  'initialized' => ['integer', (int) $this->getInitialized()],
1121  'passed' => ['integer', (int) $this->getPassed()],
1122  'progressed' => ['integer', (int) $this->getProgressed()],
1123  'satisfied' => ['integer', (int) $this->getSatisfied()],
1124  'c_terminated' => ['integer', (int) $this->getTerminated()],
1125  'hide_data' => ['integer', (int) $this->getHideData()],
1126  'c_timestamp' => ['integer', (int) $this->getTimestamp()],
1127  'duration' => ['integer', (int) $this->getDuration()],
1128  'no_substatements' => ['integer', (int) $this->getNoSubstatements()]
1129  ]);
1130 
1132  }
getHighscoreTopTable()
Gets, if the top-rankings table should be shown.
getHighscoreWTime()
Gets if the column with the workingtime should be shown.
getHighscoreTopNum($a_retval=10)
Gets the number of entries which are to be shown in the top-rankings table.
getHighscoreOwnTable()
Gets if the own rankings table should be shown.
getHighscoreEnabled()
Gets the setting which determines if the highscore feature is enabled.
getId()
get object id public
global $DIC
Definition: goto.php:24
getHighscorePercentage()
Gets if the percentage column should be shown.
getHighscoreAchievedTS()
Returns if date and time of the scores achievement should be displayed.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveRepositoryActivationSettings()

ilObjCmiXapi::saveRepositoryActivationSettings ( )
protected

Definition at line 1154 of file class.ilObjCmiXapi.php.

References getActivationEndingTime(), getActivationStartingTime(), getActivationVisibility(), ilObjectActivation\getItem(), isActivationLimited(), ilObjectActivation\setTimingType(), ilObjectActivation\TIMINGS_ACTIVATION, and ilObjectActivation\TIMINGS_DEACTIVATED.

Referenced by save().

1155  {
1156  if ($this->ref_id) {
1157  include_once "./Services/Object/classes/class.ilObjectActivation.php";
1158  ilObjectActivation::getItem($this->ref_id);
1159 
1160  $item = new ilObjectActivation;
1161  if (!$this->isActivationLimited()) {
1163  } else {
1164  $item->setTimingType(ilObjectActivation::TIMINGS_ACTIVATION);
1165  $item->setTimingStart($this->getActivationStartingTime());
1166  $item->setTimingEnd($this->getActivationEndingTime());
1167  $item->toggleVisible($this->getActivationVisibility());
1168  }
1169 
1170  $item->update($this->ref_id);
1171  }
1172  }
static getItem($a_ref_id)
Get item data.
setTimingType($a_type)
Set timing type.
Class ilObjectActivation.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAchieved()

ilObjCmiXapi::setAchieved ( bool  $achieved)
Parameters
bool$achieved

Definition at line 719 of file class.ilObjCmiXapi.php.

References $achieved.

Referenced by load().

720  {
721  $this->achieved = $achieved;
722  }
+ Here is the caller graph for this function:

◆ setActivationEndingTime()

ilObjCmiXapi::setActivationEndingTime (   $activationEndingTime)
Parameters
int$activationEndingTime

Definition at line 2165 of file class.ilObjCmiXapi.php.

References $activationEndingTime.

Referenced by loadRepositoryActivationSettings().

2166  {
2167  $this->activationEndingTime = $activationEndingTime;
2168  }
+ Here is the caller graph for this function:

◆ setActivationLimited()

ilObjCmiXapi::setActivationLimited (   $activationLimited)
Parameters
bool$activationLimited

Definition at line 2133 of file class.ilObjCmiXapi.php.

References $activationLimited.

Referenced by loadRepositoryActivationSettings().

2134  {
2135  $this->activationLimited = $activationLimited;
2136  }
$activationLimited
repository object activation settings (handled by ilObject)
+ Here is the caller graph for this function:

◆ setActivationStartingTime()

ilObjCmiXapi::setActivationStartingTime (   $activationStartingTime)
Parameters
int$activationStartingTime

Definition at line 2149 of file class.ilObjCmiXapi.php.

References $activationStartingTime.

Referenced by loadRepositoryActivationSettings().

2150  {
2151  $this->activationStartingTime = $activationStartingTime;
2152  }
+ Here is the caller graph for this function:

◆ setActivationVisibility()

ilObjCmiXapi::setActivationVisibility (   $activationVisibility)
Parameters
bool$activationVisibility

Definition at line 2181 of file class.ilObjCmiXapi.php.

References $activationVisibility.

Referenced by loadRepositoryActivationSettings().

2182  {
2183  $this->activationVisibility = $activationVisibility;
2184  }
+ Here is the caller graph for this function:

◆ setActivityId()

ilObjCmiXapi::setActivityId (   $activityId)
Parameters
string$activityId

Definition at line 398 of file class.ilObjCmiXapi.php.

References $activityId.

Referenced by load().

399  {
400  $this->activityId = $activityId;
401  }
+ Here is the caller graph for this function:

◆ setAnswered()

ilObjCmiXapi::setAnswered ( bool  $answered)
Parameters
bool$answered

Definition at line 735 of file class.ilObjCmiXapi.php.

References $answered.

Referenced by load().

736  {
737  $this->answered = $answered;
738  }
+ Here is the caller graph for this function:

◆ setAuthFetchUrlEnabled()

ilObjCmiXapi::setAuthFetchUrlEnabled (   $authFetchUrlEnabled)
Parameters
bool$authFetchUrlEnabled

Definition at line 551 of file class.ilObjCmiXapi.php.

References $authFetchUrlEnabled.

Referenced by load().

552  {
553  $this->authFetchUrlEnabled = $authFetchUrlEnabled;
554  }
+ Here is the caller graph for this function:

◆ setBypassProxyEnabled()

ilObjCmiXapi::setBypassProxyEnabled ( bool  $bypassProxyEnabled)
Parameters
bool$bypassProxyEnabled

Definition at line 991 of file class.ilObjCmiXapi.php.

References $bypassProxyEnabled.

Referenced by load().

992  {
993  $this->bypassProxyEnabled = $bypassProxyEnabled;
994  }
+ Here is the caller graph for this function:

◆ setCompleted()

ilObjCmiXapi::setCompleted ( bool  $completed)
Parameters
bool$completed

Definition at line 751 of file class.ilObjCmiXapi.php.

References $completed.

Referenced by load().

752  {
753  $this->completed = $completed;
754  }
+ Here is the caller graph for this function:

◆ setContentType()

ilObjCmiXapi::setContentType (   $contentType)
Parameters
string$contentType

Definition at line 335 of file class.ilObjCmiXapi.php.

References $contentType.

Referenced by load().

336  {
337  //bug before 21-07-24
338  if ($contentType == "learning") {
339  $contentType = self::CONT_TYPE_GENERIC;
340  }
341  $this->contentType = $contentType;
342  }
+ Here is the caller graph for this function:

◆ setDuration()

ilObjCmiXapi::setDuration ( bool  $duration)
Parameters
bool$duration

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

References $duration.

Referenced by load().

896  {
897  $this->duration = $duration;
898  }
+ Here is the caller graph for this function:

◆ setEntitlementKey()

ilObjCmiXapi::setEntitlementKey (   $entitlementKey)
Parameters
string$entitlementKey

Definition at line 535 of file class.ilObjCmiXapi.php.

References $entitlementKey.

Referenced by load().

536  {
537  $this->entitlementKey = $entitlementKey;
538  }
+ Here is the caller graph for this function:

◆ setFailed()

ilObjCmiXapi::setFailed ( bool  $failed)
Parameters
bool$failed

Definition at line 767 of file class.ilObjCmiXapi.php.

References $failed.

Referenced by load().

768  {
769  $this->failed = $failed;
770  }
+ Here is the caller graph for this function:

◆ setHideData()

ilObjCmiXapi::setHideData ( bool  $hide_data)
Parameters
bool$hide_data

Definition at line 863 of file class.ilObjCmiXapi.php.

References $hide_data.

Referenced by load().

864  {
865  $this->hide_data = $hide_data;
866  }
+ Here is the caller graph for this function:

◆ setHighscoreAchievedTS()

ilObjCmiXapi::setHighscoreAchievedTS (   $a_achieved_ts)

Sets if the date and time of the scores achievement should be displayed.

Parameters
bool$a_achieved_ts

Definition at line 1359 of file class.ilObjCmiXapi.php.

Referenced by load().

1360  {
1361  $this->_highscore_achieved_ts = (bool) $a_achieved_ts;
1362  }
+ Here is the caller graph for this function:

◆ setHighscoreEnabled()

ilObjCmiXapi::setHighscoreEnabled (   $a_enabled)

Sets if the highscore feature should be enabled.

Parameters
bool$a_enabled

Definition at line 1339 of file class.ilObjCmiXapi.php.

Referenced by load().

1340  {
1341  $this->_highscore_enabled = (bool) $a_enabled;
1342  }
+ Here is the caller graph for this function:

◆ setHighscoreMode()

ilObjCmiXapi::setHighscoreMode (   $mode)
Parameters
$modeint

Definition at line 1504 of file class.ilObjCmiXapi.php.

References setHighscoreOwnTable(), and setHighscoreTopTable().

1505  {
1506  switch ($mode) {
1507  case self::HIGHSCORE_SHOW_ALL_TABLES:
1508  $this->setHighscoreTopTable(1);
1509  $this->setHighscoreOwnTable(1);
1510  break;
1511 
1512  case self::HIGHSCORE_SHOW_TOP_TABLE:
1513  $this->setHighscoreTopTable(1);
1514  $this->setHighscoreOwnTable(0);
1515  break;
1516 
1517  case self::HIGHSCORE_SHOW_OWN_TABLE:
1518  default:
1519  $this->setHighscoreTopTable(0);
1520  $this->setHighscoreOwnTable(1);
1521  break;
1522  }
1523  }
setHighscoreTopTable($a_top_table)
Sets if the top-rankings table should be shown.
setHighscoreOwnTable($a_own_table)
Sets if the table with the own ranking should be shown.
+ Here is the call graph for this function:

◆ setHighscoreOwnTable()

ilObjCmiXapi::setHighscoreOwnTable (   $a_own_table)

Sets if the table with the own ranking should be shown.

Parameters
bool$a_own_tableTrue, if table with own ranking should be shown.

Definition at line 1419 of file class.ilObjCmiXapi.php.

Referenced by load(), and setHighscoreMode().

1420  {
1421  $this->_highscore_own_table = (bool) $a_own_table;
1422  }
+ Here is the caller graph for this function:

◆ setHighscorePercentage()

ilObjCmiXapi::setHighscorePercentage (   $a_percentage)

Sets if the percentages of the scores pass should be shown.

Parameters
bool$a_percentage

Definition at line 1379 of file class.ilObjCmiXapi.php.

Referenced by load().

1380  {
1381  $this->_highscore_percentage = (bool) $a_percentage;
1382  }
+ Here is the caller graph for this function:

◆ setHighscoreTopNum()

ilObjCmiXapi::setHighscoreTopNum (   $a_top_num)

Sets the number of entries which are to be shown in the top-rankings table.

Parameters
integer$a_top_numNumber of entries in the top-rankings table.

Definition at line 1460 of file class.ilObjCmiXapi.php.

Referenced by load().

1461  {
1462  $this->_highscore_top_num = (int) $a_top_num;
1463  }
+ Here is the caller graph for this function:

◆ setHighscoreTopTable()

ilObjCmiXapi::setHighscoreTopTable (   $a_top_table)

Sets if the top-rankings table should be shown.

Parameters
bool$a_top_table

Definition at line 1439 of file class.ilObjCmiXapi.php.

Referenced by load(), and setHighscoreMode().

1440  {
1441  $this->_highscore_top_table = (bool) $a_top_table;
1442  }
+ Here is the caller graph for this function:

◆ setHighscoreWTime()

ilObjCmiXapi::setHighscoreWTime (   $a_wtime)

Sets if the workingtime of the scores should be shown.

Parameters
bool$a_wtime

Definition at line 1399 of file class.ilObjCmiXapi.php.

Referenced by load().

1400  {
1401  $this->_highscore_wtime = (bool) $a_wtime;
1402  }
+ Here is the caller graph for this function:

◆ setInitialized()

ilObjCmiXapi::setInitialized ( bool  $initialized)
Parameters
bool$initialized

Definition at line 783 of file class.ilObjCmiXapi.php.

References $initialized.

Referenced by load().

784  {
785  $this->initialized = $initialized;
786  }
+ Here is the caller graph for this function:

◆ setInstructions()

ilObjCmiXapi::setInstructions (   $instructions)
Parameters
string$instructions

Definition at line 430 of file class.ilObjCmiXapi.php.

References $instructions.

Referenced by load().

431  {
432  $this->instructions = $instructions;
433  }
+ Here is the caller graph for this function:

◆ setKeepLpStatusEnabled()

ilObjCmiXapi::setKeepLpStatusEnabled (   $keepLpStatusEnabled)
Parameters
bool$keepLpStatusEnabled

Definition at line 655 of file class.ilObjCmiXapi.php.

References $keepLpStatusEnabled.

Referenced by load().

656  {
657  $this->keepLpStatusEnabled = $keepLpStatusEnabled;
658  }
+ Here is the caller graph for this function:

◆ setLaunchMethod()

ilObjCmiXapi::setLaunchMethod (   $launchMethod)
Parameters
string$launchMethod

Definition at line 567 of file class.ilObjCmiXapi.php.

References $launchMethod.

Referenced by load().

568  {
569  $this->launchMethod = $launchMethod;
570  }
+ Here is the caller graph for this function:

◆ setLaunchMode()

ilObjCmiXapi::setLaunchMode (   $launchMode)
Parameters
string$launchMode

Definition at line 583 of file class.ilObjCmiXapi.php.

References $launchMode.

Referenced by load().

584  {
585  $this->launchMode = ucfirst($launchMode);
586  }
+ Here is the caller graph for this function:

◆ setLaunchParameters()

ilObjCmiXapi::setLaunchParameters (   $launchParameters)
Parameters
string$launchParameters

Definition at line 462 of file class.ilObjCmiXapi.php.

References $launchParameters.

Referenced by load().

463  {
464  $this->launchParameters = $launchParameters;
465  }
+ Here is the caller graph for this function:

◆ setLaunchUrl()

ilObjCmiXapi::setLaunchUrl (   $launchUrl)
Parameters
string$launchUrl

Definition at line 446 of file class.ilObjCmiXapi.php.

References $launchUrl.

Referenced by load().

447  {
448  $this->launchUrl = $launchUrl;
449  }
+ Here is the caller graph for this function:

◆ setLrsType()

ilObjCmiXapi::setLrsType (   $lrsType)
Parameters
ilCmiXapiLrsType$lrsType

Definition at line 314 of file class.ilObjCmiXapi.php.

References $lrsType.

Referenced by initLrsType().

315  {
316  $this->lrsType = $lrsType;
317  }
+ Here is the caller graph for this function:

◆ setLrsTypeId()

ilObjCmiXapi::setLrsTypeId (   $lrsTypeId)
Parameters
int$lrsTypeId

Definition at line 298 of file class.ilObjCmiXapi.php.

References $lrsTypeId.

Referenced by load().

299  {
300  $this->lrsTypeId = $lrsTypeId;
301  }
+ Here is the caller graph for this function:

◆ setMasteryScore()

ilObjCmiXapi::setMasteryScore (   $masteryScore)
Parameters
float$masteryScore

Definition at line 623 of file class.ilObjCmiXapi.php.

References $masteryScore.

Referenced by load().

624  {
625  $this->masteryScore = $masteryScore;
626  }
+ Here is the caller graph for this function:

◆ setMasteryScorePercent()

ilObjCmiXapi::setMasteryScorePercent (   $masteryScorePercent)
Parameters
float$masteryScorePercent

Definition at line 639 of file class.ilObjCmiXapi.php.

640  {
641  $this->masteryScore = $masteryScorePercent / 100;
642  }

◆ setMoveOn()

ilObjCmiXapi::setMoveOn (   $moveOn)
Parameters
string$moveOnAttention: this is the original moveOn from course import should only be set on import!

Definition at line 482 of file class.ilObjCmiXapi.php.

References $moveOn.

Referenced by load().

483  {
484  $this->moveOn = $moveOn;
485  }
+ Here is the caller graph for this function:

◆ setNoSubstatements()

ilObjCmiXapi::setNoSubstatements ( bool  $no_substatements)
Parameters
bool$no_substatements

Definition at line 911 of file class.ilObjCmiXapi.php.

References $no_substatements.

Referenced by load().

912  {
913  $this->no_substatements = $no_substatements;
914  }
+ Here is the caller graph for this function:

◆ setOnlyMoveon()

ilObjCmiXapi::setOnlyMoveon ( bool  $only_moveon)
Parameters
bool$only_moveon

Definition at line 703 of file class.ilObjCmiXapi.php.

References $only_moveon.

Referenced by load().

704  {
705  $this->only_moveon = $only_moveon;
706  }
+ Here is the caller graph for this function:

◆ setPassed()

ilObjCmiXapi::setPassed ( bool  $passed)
Parameters
bool$passed

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

References $passed.

Referenced by load().

800  {
801  $this->passed = $passed;
802  }
+ Here is the caller graph for this function:

◆ setPrivacyIdent()

ilObjCmiXapi::setPrivacyIdent (   $userIdent)
Parameters
string$userIdent

Definition at line 671 of file class.ilObjCmiXapi.php.

References $userIdent.

Referenced by load().

672  {
673  $this->userIdent = $userIdent;
674  }
+ Here is the caller graph for this function:

◆ setPrivacyName()

ilObjCmiXapi::setPrivacyName (   $userName)
Parameters
string$userName

Definition at line 687 of file class.ilObjCmiXapi.php.

References $userName.

Referenced by load().

688  {
689  $this->userName = $userName;
690  }
+ Here is the caller graph for this function:

◆ setProgressed()

ilObjCmiXapi::setProgressed ( bool  $progressed)
Parameters
bool$progressed

Definition at line 815 of file class.ilObjCmiXapi.php.

References $progressed.

Referenced by load().

816  {
817  $this->progressed = $progressed;
818  }
+ Here is the caller graph for this function:

◆ setPublisherId()

ilObjCmiXapi::setPublisherId (   $publisherId)
Parameters
string$publisherId

Definition at line 414 of file class.ilObjCmiXapi.php.

References $publisherId.

Referenced by load().

415  {
416  $this->publisherId = $publisherId;
417  }
+ Here is the caller graph for this function:

◆ setSatisfied()

ilObjCmiXapi::setSatisfied ( bool  $satisfied)
Parameters
bool$satisfied

Definition at line 831 of file class.ilObjCmiXapi.php.

References $satisfied.

Referenced by load().

832  {
833  $this->satisfied = $satisfied;
834  }
+ Here is the caller graph for this function:

◆ setSourceType()

ilObjCmiXapi::setSourceType (   $sourceType)
Parameters
string$sourceType

Definition at line 382 of file class.ilObjCmiXapi.php.

References $sourceType.

Referenced by load().

383  {
384  $this->sourceType = $sourceType;
385  }
+ Here is the caller graph for this function:

◆ setStatementsReportEnabled()

ilObjCmiXapi::setStatementsReportEnabled (   $statementsReportEnabled)
Parameters
bool$statementsReportEnabled

Definition at line 943 of file class.ilObjCmiXapi.php.

References $statementsReportEnabled.

Referenced by load().

944  {
945  $this->statementsReportEnabled = $statementsReportEnabled;
946  }
+ Here is the caller graph for this function:

◆ setSwitchToReviewEnabled()

ilObjCmiXapi::setSwitchToReviewEnabled (   $switchToReviewEnabled)
Parameters
bool$switchToReviewEnabled

Definition at line 607 of file class.ilObjCmiXapi.php.

References $switchToReviewEnabled.

Referenced by load().

608  {
609  $this->switchToReviewEnabled = $switchToReviewEnabled;
610  }
+ Here is the caller graph for this function:

◆ setTerminated()

ilObjCmiXapi::setTerminated ( bool  $terminated)
Parameters
bool$terminated

Definition at line 847 of file class.ilObjCmiXapi.php.

References $terminated.

Referenced by load().

848  {
849  $this->terminated = $terminated;
850  }
+ Here is the caller graph for this function:

◆ setTimestamp()

ilObjCmiXapi::setTimestamp ( bool  $timestamp)
Parameters
bool$timestamp

Definition at line 879 of file class.ilObjCmiXapi.php.

References $timestamp.

Referenced by load().

880  {
881  $this->timestamp = $timestamp;
882  }
+ Here is the caller graph for this function:

◆ setUserPrivacyComment()

ilObjCmiXapi::setUserPrivacyComment (   $userPrivacyComment)
Parameters
string$userPrivacyComment

Definition at line 927 of file class.ilObjCmiXapi.php.

References $userPrivacyComment.

Referenced by load().

928  {
929  $this->userPrivacyComment = $userPrivacyComment;
930  }
+ Here is the caller graph for this function:

◆ setVersion()

ilObjCmiXapi::setVersion (   $version)
Parameters
int$version

Definition at line 975 of file class.ilObjCmiXapi.php.

References $version.

Referenced by load().

976  {
977  $this->version = $version;
978  }
+ Here is the caller graph for this function:

◆ setXmlManifest()

ilObjCmiXapi::setXmlManifest (   $xmlManifest)
Parameters
string$xmlManifest

Definition at line 959 of file class.ilObjCmiXapi.php.

References $xmlManifest.

Referenced by load().

960  {
961  $this->xmlManifest = $xmlManifest;
962  }
+ Here is the caller graph for this function:

◆ updateByPassProxyFromLrsType()

static ilObjCmiXapi::updateByPassProxyFromLrsType ( ilCmiXapiLrsType  $lrsType)
static

Definition at line 1242 of file class.ilObjCmiXapi.php.

References $DIC, $query, ilCmiXapiLrsType\getTypeId(), and ilCmiXapiLrsType\isBypassProxyEnabled().

Referenced by ilObjCmiXapiAdministrationGUI\saveLrsTypeFormCmd().

1243  {
1244  global $DIC; /* @var \ILIAS\DI\Container $DIC */
1245 
1246  $tableName = self::DB_TABLE_NAME;
1247 
1248  $query = "
1249  UPDATE {$tableName}
1250  SET bypass_proxy = %s
1251  WHERE lrs_type_id = %s
1252  ";
1253 
1254  $DIC->database()->manipulateF(
1255  $query,
1256  ['integer', 'integer'],
1257  [$lrsType->isBypassProxyEnabled(), $lrsType->getTypeId()]
1258  );
1259  }
global $DIC
Definition: goto.php:24
$query
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updatePrivacySettingsFromLrsType()

static ilObjCmiXapi::updatePrivacySettingsFromLrsType ( ilCmiXapiLrsType  $lrsType)
static

Definition at line 1174 of file class.ilObjCmiXapi.php.

References $DIC, $query, ilCmiXapiLrsType\getAchieved(), ilCmiXapiLrsType\getAnswered(), ilCmiXapiLrsType\getCompleted(), ilCmiXapiLrsType\getDuration(), ilCmiXapiLrsType\getFailed(), ilCmiXapiLrsType\getHideData(), ilCmiXapiLrsType\getInitialized(), ilCmiXapiLrsType\getNoSubstatements(), ilCmiXapiLrsType\getOnlyMoveon(), ilCmiXapiLrsType\getPassed(), ilCmiXapiLrsType\getPrivacyIdent(), ilCmiXapiLrsType\getPrivacyName(), ilCmiXapiLrsType\getProgressed(), ilCmiXapiLrsType\getSatisfied(), ilCmiXapiLrsType\getTerminated(), ilCmiXapiLrsType\getTimestamp(), and ilCmiXapiLrsType\getTypeId().

Referenced by ilObjCmiXapiAdministrationGUI\saveLrsTypeFormCmd().

1175  {
1176  global $DIC; /* @var \ILIAS\DI\Container $DIC */
1177 
1178  $tableName = self::DB_TABLE_NAME;
1179 
1180  $query = "
1181  UPDATE {$tableName}
1182  SET privacy_ident = %s,
1183  privacy_name = %s,
1184  only_moveon = %s,
1185  achieved = %s,
1186  answered = %s,
1187  completed = %s,
1188  failed = %s,
1189  initialized = %s,
1190  passed = %s,
1191  progressed = %s,
1192  satisfied = %s,
1193  c_terminated = %s,
1194  hide_data = %s,
1195  c_timestamp = %s,
1196  duration = %s,
1197  no_substatements = %s
1198  WHERE lrs_type_id = %s
1199  ";
1200 
1201  $DIC->database()->manipulateF(
1202  $query,
1203  ['integer',
1204  'integer',
1205  'integer',
1206  'integer',
1207  'integer',
1208  'integer',
1209  'integer',
1210  'integer',
1211  'integer',
1212  'integer',
1213  'integer',
1214  'integer',
1215  'integer',
1216  'integer',
1217  'integer',
1218  'integer',
1219  'integer'
1220  ],
1221  [$lrsType->getPrivacyIdent(),
1222  $lrsType->getPrivacyName(),
1223  $lrsType->getOnlyMoveon(),
1224  $lrsType->getAchieved(),
1225  $lrsType->getAnswered(),
1226  $lrsType->getCompleted(),
1227  $lrsType->getFailed(),
1228  $lrsType->getInitialized(),
1229  $lrsType->getPassed(),
1230  $lrsType->getProgressed(),
1231  $lrsType->getSatisfied(),
1232  $lrsType->getTerminated(),
1233  $lrsType->getHideData(),
1234  $lrsType->getTimestamp(),
1235  $lrsType->getDuration(),
1236  $lrsType->getNoSubstatements(),
1237  $lrsType->getTypeId()
1238  ]
1239  );
1240  }
global $DIC
Definition: goto.php:24
$query
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $_highscore_achieved_ts

ilObjCmiXapi::$_highscore_achieved_ts = 1
protected

Definition at line 1301 of file class.ilObjCmiXapi.php.

Referenced by getHighscoreAchievedTS().

◆ $_highscore_enabled

ilObjCmiXapi::$_highscore_enabled = 0
protected

Definition at line 1290 of file class.ilObjCmiXapi.php.

Referenced by getHighscoreEnabled().

◆ $_highscore_own_table

ilObjCmiXapi::$_highscore_own_table = 1
protected

Definition at line 1316 of file class.ilObjCmiXapi.php.

Referenced by getHighscoreOwnTable().

◆ $_highscore_percentage

ilObjCmiXapi::$_highscore_percentage = 1
protected

Definition at line 1306 of file class.ilObjCmiXapi.php.

Referenced by getHighscorePercentage().

◆ $_highscore_top_num

ilObjCmiXapi::$_highscore_top_num = 10
protected

Definition at line 1326 of file class.ilObjCmiXapi.php.

Referenced by getHighscoreTopNum().

◆ $_highscore_top_table

ilObjCmiXapi::$_highscore_top_table = 1
protected

Definition at line 1321 of file class.ilObjCmiXapi.php.

Referenced by getHighscoreTopTable().

◆ $_highscore_wtime

ilObjCmiXapi::$_highscore_wtime = 1
protected

Definition at line 1311 of file class.ilObjCmiXapi.php.

Referenced by getHighscoreWTime().

◆ $achieved

ilObjCmiXapi::$achieved = true
protected

Definition at line 185 of file class.ilObjCmiXapi.php.

Referenced by getAchieved(), and setAchieved().

◆ $activationEndingTime

ilObjCmiXapi::$activationEndingTime
protected

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

Referenced by getActivationEndingTime(), and setActivationEndingTime().

◆ $activationLimited

ilObjCmiXapi::$activationLimited
protected

repository object activation settings (handled by ilObject)

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

Referenced by isActivationLimited(), and setActivationLimited().

◆ $activationStartingTime

ilObjCmiXapi::$activationStartingTime
protected

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

Referenced by getActivationStartingTime(), and setActivationStartingTime().

◆ $activationVisibility

ilObjCmiXapi::$activationVisibility
protected

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

Referenced by getActivationVisibility(), and setActivationVisibility().

◆ $activityId

ilObjCmiXapi::$activityId
protected

◆ $anonymity

ilObjCmiXapi::$anonymity = 0
protected

Definition at line 1296 of file class.ilObjCmiXapi.php.

◆ $anonymousHomePage

ilObjCmiXapi::$anonymousHomePage = false
protected

Definition at line 99 of file class.ilObjCmiXapi.php.

◆ $answered

ilObjCmiXapi::$answered = true
protected

Definition at line 188 of file class.ilObjCmiXapi.php.

Referenced by getAnswered(), and setAnswered().

◆ $authFetchUrlEnabled

ilObjCmiXapi::$authFetchUrlEnabled
protected

Definition at line 94 of file class.ilObjCmiXapi.php.

Referenced by isAuthFetchUrlEnabled(), and setAuthFetchUrlEnabled().

◆ $bypassProxyEnabled

ilObjCmiXapi::$bypassProxyEnabled
protected

Definition at line 179 of file class.ilObjCmiXapi.php.

Referenced by isBypassProxyEnabled(), and setBypassProxyEnabled().

◆ $completed

ilObjCmiXapi::$completed = true
protected

Definition at line 191 of file class.ilObjCmiXapi.php.

Referenced by getCompleted(), and setCompleted().

◆ $contentType

ilObjCmiXapi::$contentType
protected

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

Referenced by getContentType(), and setContentType().

◆ $currentCmixUser

ilObjCmiXapi::$currentCmixUser = null
protected

Definition at line 224 of file class.ilObjCmiXapi.php.

Referenced by getCurrentCmixUser().

◆ $duration

ilObjCmiXapi::$duration = true
protected

Definition at line 218 of file class.ilObjCmiXapi.php.

Referenced by getAbandonedStatement(), getDuration(), and setDuration().

◆ $entitlementKey

ilObjCmiXapi::$entitlementKey
protected

Definition at line 89 of file class.ilObjCmiXapi.php.

Referenced by getEntitlementKey(), and setEntitlementKey().

◆ $failed

ilObjCmiXapi::$failed = true
protected

Definition at line 194 of file class.ilObjCmiXapi.php.

Referenced by getFailed(), and setFailed().

◆ $hide_data

ilObjCmiXapi::$hide_data = false
protected

Definition at line 212 of file class.ilObjCmiXapi.php.

Referenced by getHideData(), and setHideData().

◆ $initialized

ilObjCmiXapi::$initialized = true
protected

Definition at line 197 of file class.ilObjCmiXapi.php.

Referenced by getInitialized(), and setInitialized().

◆ $instructions

ilObjCmiXapi::$instructions
protected

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

Referenced by getInstructions(), and setInstructions().

◆ $keepLpStatusEnabled

ilObjCmiXapi::$keepLpStatusEnabled
protected

Definition at line 132 of file class.ilObjCmiXapi.php.

Referenced by isKeepLpStatusEnabled(), and setKeepLpStatusEnabled().

◆ $launchMethod

ilObjCmiXapi::$launchMethod
protected

Definition at line 105 of file class.ilObjCmiXapi.php.

Referenced by getLaunchMethod(), and setLaunchMethod().

◆ $launchMode

ilObjCmiXapi::$launchMode
protected

◆ $launchParameters

ilObjCmiXapi::$launchParameters
protected

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

Referenced by getLaunchParameters(), and setLaunchParameters().

◆ $launchUrl

ilObjCmiXapi::$launchUrl
protected

Definition at line 74 of file class.ilObjCmiXapi.php.

Referenced by getLaunchUrl(), and setLaunchUrl().

◆ $lrsType

ilObjCmiXapi::$lrsType
protected

Definition at line 39 of file class.ilObjCmiXapi.php.

Referenced by getLastStatement(), getLrsType(), and setLrsType().

◆ $lrsTypeId

ilObjCmiXapi::$lrsTypeId
protected

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

Referenced by getDataSetMapping(), getLrsTypeId(), and setLrsTypeId().

◆ $masteryScore

ilObjCmiXapi::$masteryScore
protected

Definition at line 127 of file class.ilObjCmiXapi.php.

Referenced by getMasteryScore(), and setMasteryScore().

◆ $moveOn

ilObjCmiXapi::$moveOn
protected

Definition at line 84 of file class.ilObjCmiXapi.php.

Referenced by getLaunchData(), getLMSMoveOn(), getMoveOn(), and setMoveOn().

◆ $no_substatements

ilObjCmiXapi::$no_substatements = false
protected

Definition at line 221 of file class.ilObjCmiXapi.php.

Referenced by getNoSubstatements(), and setNoSubstatements().

◆ $only_moveon

ilObjCmiXapi::$only_moveon = false
protected

Definition at line 182 of file class.ilObjCmiXapi.php.

Referenced by getOnlyMoveon(), and setOnlyMoveon().

◆ $passed

ilObjCmiXapi::$passed = true
protected

Definition at line 200 of file class.ilObjCmiXapi.php.

Referenced by getPassed(), and setPassed().

◆ $progressed

ilObjCmiXapi::$progressed = true
protected

Definition at line 203 of file class.ilObjCmiXapi.php.

Referenced by getProgressed(), and setProgressed().

◆ $publisherId

ilObjCmiXapi::$publisherId
protected

◆ $satisfied

ilObjCmiXapi::$satisfied = true
protected

Definition at line 206 of file class.ilObjCmiXapi.php.

Referenced by getSatisfied(), and setSatisfied().

◆ $sourceType

ilObjCmiXapi::$sourceType
protected

Definition at line 51 of file class.ilObjCmiXapi.php.

Referenced by getSourceType(), and setSourceType().

◆ $statementsReportEnabled

ilObjCmiXapi::$statementsReportEnabled
protected

◆ $switchToReviewEnabled

ilObjCmiXapi::$switchToReviewEnabled
protected

◆ $terminated

ilObjCmiXapi::$terminated = true
protected

Definition at line 209 of file class.ilObjCmiXapi.php.

Referenced by getTerminated(), and setTerminated().

◆ $timestamp

ilObjCmiXapi::$timestamp = false
protected

Definition at line 215 of file class.ilObjCmiXapi.php.

Referenced by getTimestamp(), and setTimestamp().

◆ $userIdent

ilObjCmiXapi::$userIdent
protected

Definition at line 137 of file class.ilObjCmiXapi.php.

Referenced by getPrivacyIdent(), and setPrivacyIdent().

◆ $userName

ilObjCmiXapi::$userName
protected

Definition at line 149 of file class.ilObjCmiXapi.php.

Referenced by getPrivacyName(), and setPrivacyName().

◆ $userPrivacyComment

ilObjCmiXapi::$userPrivacyComment
protected

Definition at line 159 of file class.ilObjCmiXapi.php.

Referenced by getUserPrivacyComment(), and setUserPrivacyComment().

◆ $version

ilObjCmiXapi::$version
protected

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

Referenced by getVersion(), and setVersion().

◆ $xmlManifest

ilObjCmiXapi::$xmlManifest
protected

Definition at line 169 of file class.ilObjCmiXapi.php.

Referenced by getXmlManifest(), and setXmlManifest().

◆ ANONYMOUS_HOMEPAGE

const ilObjCmiXapi::ANONYMOUS_HOMEPAGE = 'https://example.org'

Definition at line 100 of file class.ilObjCmiXapi.php.

◆ CONT_TYPE_CMI5

◆ CONT_TYPE_GENERIC

◆ DB_RESULTS_TABLE_NAME

const ilObjCmiXapi::DB_RESULTS_TABLE_NAME = 'cmix_results'

Definition at line 21 of file class.ilObjCmiXapi.php.

◆ DB_TABLE_NAME

const ilObjCmiXapi::DB_TABLE_NAME = 'cmix_settings'

Definition at line 19 of file class.ilObjCmiXapi.php.

◆ DB_USERS_TABLE_NAME

const ilObjCmiXapi::DB_USERS_TABLE_NAME = 'cmix_users'

Definition at line 20 of file class.ilObjCmiXapi.php.

◆ HIGHSCORE_SHOW_ALL_TABLES

const ilObjCmiXapi::HIGHSCORE_SHOW_ALL_TABLES = 1

Definition at line 1328 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ HIGHSCORE_SHOW_OWN_TABLE

const ilObjCmiXapi::HIGHSCORE_SHOW_OWN_TABLE = 3

Definition at line 1330 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ HIGHSCORE_SHOW_TOP_TABLE

const ilObjCmiXapi::HIGHSCORE_SHOW_TOP_TABLE = 2

Definition at line 1329 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ LAUNCH_METHOD_IFRAME

const ilObjCmiXapi::LAUNCH_METHOD_IFRAME = 'iframe'

Definition at line 108 of file class.ilObjCmiXapi.php.

◆ LAUNCH_METHOD_NEW_WIN

const ilObjCmiXapi::LAUNCH_METHOD_NEW_WIN = 'newWin'

◆ LAUNCH_METHOD_OWN_WIN

const ilObjCmiXapi::LAUNCH_METHOD_OWN_WIN = 'ownWin'

Definition at line 106 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ LAUNCH_MODE_BROWSE

const ilObjCmiXapi::LAUNCH_MODE_BROWSE = 'Browse'

Definition at line 115 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ LAUNCH_MODE_NORMAL

◆ LAUNCH_MODE_REVIEW

const ilObjCmiXapi::LAUNCH_MODE_REVIEW = 'Review'

Definition at line 116 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiSettingsGUI\buildForm().

◆ LMS_MASTERY_SCORE

const ilObjCmiXapi::LMS_MASTERY_SCORE = 0.7

◆ PLUGIN

const ilObjCmiXapi::PLUGIN = false

Definition at line 17 of file class.ilObjCmiXapi.php.

◆ PRIVACY_IDENT_IL_UUID_EXT_ACCOUNT

const ilObjCmiXapi::PRIVACY_IDENT_IL_UUID_EXT_ACCOUNT = 1

Definition at line 139 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getIdent(), and ilCmiXapiUser\getIdentAsId().

◆ PRIVACY_IDENT_IL_UUID_LOGIN

const ilObjCmiXapi::PRIVACY_IDENT_IL_UUID_LOGIN = 2

Definition at line 140 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getIdent(), and ilCmiXapiUser\getIdentAsId().

◆ PRIVACY_IDENT_IL_UUID_RANDOM

const ilObjCmiXapi::PRIVACY_IDENT_IL_UUID_RANDOM = 4

Definition at line 142 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getIdent(), and ilCmiXapiUser\getIdentAsId().

◆ PRIVACY_IDENT_IL_UUID_SHA256

const ilObjCmiXapi::PRIVACY_IDENT_IL_UUID_SHA256 = 5

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

Referenced by ilCmiXapiUser\getIdent(), and ilCmiXapiUser\getIdentAsId().

◆ PRIVACY_IDENT_IL_UUID_SHA256URL

const ilObjCmiXapi::PRIVACY_IDENT_IL_UUID_SHA256URL = 6

Definition at line 144 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getIdent(), and ilCmiXapiUser\getIdentAsId().

◆ PRIVACY_IDENT_IL_UUID_USER_ID

const ilObjCmiXapi::PRIVACY_IDENT_IL_UUID_USER_ID = 0

Definition at line 138 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getIdent(), and ilCmiXapiUser\getIdentAsId().

◆ PRIVACY_IDENT_REAL_EMAIL

const ilObjCmiXapi::PRIVACY_IDENT_REAL_EMAIL = 3

Definition at line 141 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getIdent(), and ilCmiXapiUser\getIdentAsId().

◆ PRIVACY_NAME_FIRSTNAME

const ilObjCmiXapi::PRIVACY_NAME_FIRSTNAME = 1

Definition at line 151 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getName().

◆ PRIVACY_NAME_FULLNAME

const ilObjCmiXapi::PRIVACY_NAME_FULLNAME = 3

Definition at line 153 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getName().

◆ PRIVACY_NAME_LASTNAME

const ilObjCmiXapi::PRIVACY_NAME_LASTNAME = 2

Definition at line 152 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getName().

◆ PRIVACY_NAME_NONE

const ilObjCmiXapi::PRIVACY_NAME_NONE = 0

◆ SRC_TYPE_EXTERNAL

const ilObjCmiXapi::SRC_TYPE_EXTERNAL = 'externalSource'

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

Referenced by ilObjCmiXapiGUI\afterSave().

◆ SRC_TYPE_LOCAL

const ilObjCmiXapi::SRC_TYPE_LOCAL = 'localSource'

◆ SRC_TYPE_REMOTE

const ilObjCmiXapi::SRC_TYPE_REMOTE = 'remoteSource'

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