ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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...
 
 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 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_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 ()
 
 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 230 of file class.ilObjCmiXapi.php.

References ILIAS\GlobalScreen\Provider\__construct().

231  {
232  $this->lrsTypeId = 0;
233  //$this->lrsType = $lrsType;
234 
235  $this->contentType = self::CONT_TYPE_GENERIC;
236  $this->sourceType = self::SRC_TYPE_REMOTE;
237 
238  $this->activityId = '';
239 
240  $this->publisherId = '';
241 
242  $this->instructions = '';
243 
244  $this->launchUrl = '';
245  $this->launchParameters = '';
246  $this->moveOn = '';
247  $this->entitlementKey = '';
248 
249  $this->authFetchUrlEnabled = 0;
250 
251  $this->launchMethod = self::LAUNCH_METHOD_NEW_WIN;
252  $this->launchMode = self::LAUNCH_MODE_NORMAL;
253 
254  $this->switchToReviewEnabled = 1;
255 
256  $this->masteryScore = self::LMS_MASTERY_SCORE;
257  $this->keepLpStatusEnabled = 1;
258 
259  $this->userIdent = self::PRIVACY_IDENT_IL_UUID_USER_ID;
260  $this->userName = self::PRIVACY_NAME_NONE;
261  $this->userPrivacyComment = '';
262 
263  $this->currentCmixUser = null;
264 
265  $this->statementsReportEnabled = 0;
266 
267  $this->xmlManifest = '';
268  $this->version = 0;
269 
270  $this->bypassProxyEnabled = false;
271 
272  parent::__construct($a_id, $a_reference);
273  }
__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.
getHighscorePercentage()
Gets if the percentage column should be shown.
$DIC
Definition: xapitoken.php:46
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
$query
global $ilDB
$DIC
Definition: xapitoken.php:46
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 1996 of file class.ilObjCmiXapi.php.

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

1997  {
1998  if (null === $cmixUser)
1999  {
2000  $cmixUser = $this->getCurrentCmixUser();
2001  }
2002  $statement = $this->getStatement('abandoned',$cmixUser);
2003  // overwrite session with abandoned oldSession
2004  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/sessionid'] = $sessionId;
2005  $statement['result'] = array(
2006  'duration' => $duration
2007  );
2008  return $statement;
2009  }
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 2177 of file class.ilObjCmiXapi.php.

References $activationEndingTime.

Referenced by saveRepositoryActivationSettings().

2178  {
2180  }
+ Here is the caller graph for this function:

◆ getActivationStartingTime()

ilObjCmiXapi::getActivationStartingTime ( )
Returns
int

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

References $activationStartingTime.

Referenced by saveRepositoryActivationSettings().

2162  {
2164  }
+ Here is the caller graph for this function:

◆ getActivationVisibility()

ilObjCmiXapi::getActivationVisibility ( )
Returns
bool

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

References $activationVisibility.

Referenced by saveRepositoryActivationSettings().

2194  {
2196  }
+ 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 326 of file class.ilObjCmiXapi.php.

References $contentType.

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

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

◆ getCurrentCmixUser()

ilObjCmiXapi::getCurrentCmixUser ( )

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

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

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

1712  {
1713  global $DIC;
1714  if (null === $this->currentCmixUser)
1715  {
1716  $this->currentCmixUser = new ilCmiXapiUser($this->getId(), $DIC->user()->getId(), $this->getPrivacyIdent());
1717  }
1718  return $this->currentCmixUser;
1719  }
getId()
get object id public
$DIC
Definition: xapitoken.php:46
+ 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 276 of file class.ilObjCmiXapi.php.

Referenced by XapiProxy\XapiProxyRequest\handleGetStatementsRequest().

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

◆ getInstructions()

ilObjCmiXapi::getInstructions ( )
Returns
string

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

References $instructions.

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

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

◆ getLastStatement()

ilObjCmiXapi::getLastStatement (   $sess)

get latest statement from session

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

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

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

◆ getLastStatementPipline()

ilObjCmiXapi::getLastStatementPipline (   $sess)

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

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

Referenced by getLastStatement().

2082  {
2083  global $DIC;
2084  $pipeline = array();
2085 
2086  // filter activityId
2087  $match = array();
2088  $match['statement.object.objectType'] = 'Activity';
2089  $match['statement.actor.objectType'] = 'Agent';
2090 
2091  $activityId = array();
2092 
2093  if ($this->getContentType() == ilObjCmiXapi::CONT_TYPE_CMI5 && !$this->isMixedContentType())
2094  {
2095  // https://github.com/AICC/CMI-5_Spec_Current/blob/quartz/cmi5_spec.md#963-extensions
2096  $activityId['statement.context.extensions.https://ilias&46;de/cmi5/activityid'] = $this->getActivityId();
2097  }
2098  else
2099  {
2100  $activityQuery = [
2101  '$regex' => '^' . preg_quote($this->getActivityId()) . ''
2102  ];
2103  $activityId['$or'] = [];
2104  $activityId['$or'][] = ['statement.object.id' => $activityQuery];
2105  $activityId['$or'][] = ['statement.context.contextActivities.parent.id' => $activityQuery];
2106  $activityId['$or'][] = ['statement.context.contextActivities.grouping.id' => $activityQuery];
2107  }
2108 
2109  $sessionId = array();
2110  $sessionId['statement.context.extensions.https://w3id&46;org/xapi/cmi5/context/extensions/sessionid'] = $sess;
2111  $match['$and'] = array();
2112  $match['$and'][] = $activityId;
2113  $match['$and'][] = $sessionId;
2114  $sort = array('statement.timestamp' => -1);
2115  $project = array('statement.timestamp' => 1, 'statement.verb.id' => 1);
2116  $pipeline[] = array('$match' => $match);
2117  $pipeline[] = array('$sort' => $sort);
2118  $pipeline[] = array('$limit' => 1);
2119  $pipeline[] = array('$project' => $project);
2120 
2121  return $pipeline;
2122  }
$DIC
Definition: xapitoken.php:46
+ 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(), ILIAS_HTTP_PATH, and isSwitchToReviewEnabled().

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

◆ getLaunchedContextTemplate()

ilObjCmiXapi::getLaunchedContextTemplate (   $cmixUser = null)

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

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

Referenced by getLaunchData().

1783  {
1784  if (null === $cmixUser)
1785  {
1786  $cmixUser = $this->getCurrentCmixUser();
1787  }
1788  $launchMode = $this->getLaunchMode();
1789  // only check switch if self::LAUNCH_MODE_NORMAL
1790  if ($launchMode == self::LAUNCH_MODE_NORMAL) {
1791  if ($cmixUser->getSatisfied() && $this->isSwitchToReviewEnabled()) {
1792  $launchMode = self::LAUNCH_MODE_REVIEW;
1793  }
1794  }
1795  $extensions = $this->getStatementExtensions($cmixUser);
1796  $extensions['https://w3id.org/xapi/cmi5/context/extensions/launchmode'] = $launchMode;
1797  if (!empty($this->getLMSMoveOn())) {
1798  $extensions['https://w3id.org/xapi/cmi5/context/extensions/moveon'] = $this->getLMSMoveOn();
1799  }
1800  if (!empty($this->getLaunchParameters())) {
1801  $extensions['https://w3id.org/xapi/cmi5/context/extensions/launchparameters'] = $this->getLaunchParameters();
1802  }
1803  if (!empty($this->getMasteryScore())) {
1804  $extensions['https://w3id.org/xapi/cmi5/context/extensions/masteryscore'] = $this->getMasteryScore();
1805  }
1806  $contextTemplate = array(
1807  "contextActivities" => $this->getStatementContextActivities(),
1808  "extensions" => $extensions
1809  );
1810  return $contextTemplate;
1811  }
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 1969 of file class.ilObjCmiXapi.php.

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

1970  {
1971  if (null === $cmixUser) {
1972  $cmixUser = $this->getCurrentCmixUser();
1973  }
1974  $launchMode = $this->getLaunchMode();
1975  // only check switch if self::LAUNCH_MODE_NORMAL
1976  if ($launchMode == self::LAUNCH_MODE_NORMAL) {
1977  if ($cmixUser->getSatisfied() && $this->isSwitchToReviewEnabled()) {
1978  $launchMode = self::LAUNCH_MODE_REVIEW;
1979  }
1980  }
1981 
1982  $statement = $this->getStatement('launched', $cmixUser);
1983  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/launchmode'] = $launchMode;
1984  if (!empty($this->getLMSMoveOn())) {
1985  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/moveon'] = $this->getLMSMoveOn();
1986  }
1987  if (!empty($this->getLaunchParameters())) {
1988  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/launchparameters'] = $this->getLaunchParameters();
1989  }
1990  if (!empty($this->getMasteryScore())) {
1991  $statement['context']['extensions']['https://w3id.org/xapi/cmi5/context/extensions/masteryscore'] = $this->getMasteryScore();
1992  }
1993  return $statement;
1994  }
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 453 of file class.ilObjCmiXapi.php.

References $launchParameters.

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

454  {
456  }
+ Here is the caller graph for this function:

◆ getLaunchUrl()

ilObjCmiXapi::getLaunchUrl ( )
Returns
string

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

References $launchUrl.

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

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

◆ getLMSMoveOn()

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

Definition at line 500 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().

501  {
503  switch ($this->getLPMode())
504  {
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 490 of file class.ilObjCmiXapi.php.

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

Referenced by getLMSMoveOn().

491  {
492  $olp = ilObjectLP::getInstance($this->getId());
493  return $olp->getCurrentMode();
494  }
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 305 of file class.ilObjCmiXapi.php.

References $lrsType.

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

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

◆ getLrsTypeId()

ilObjCmiXapi::getLrsTypeId ( )
Returns
int

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

References $lrsTypeId.

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

290  {
291  return $this->lrsTypeId;
292  }
+ 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 471 of file class.ilObjCmiXapi.php.

References $moveOn.

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

472  {
473  return $this->moveOn;
474  }
+ 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
$query
$DIC
Definition: xapitoken.php:46
+ 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 405 of file class.ilObjCmiXapi.php.

References $publisherId.

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

406  {
407  return $this->publisherId;
408  }
+ 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().

1683  {
1684  global $DIC;
1685  $res = $DIC->database()->queryF(
1686  "SELECT DISTINCT registration FROM " . self::DB_USERS_TABLE_NAME ." WHERE obj_id = %s",
1687  array('text'),
1688  array($this->getId())
1689  );
1690  $ret = [];
1691  while ($row = $DIC->database()->fetchAssoc($res)) {
1692  $ret[] = $row['registration'];
1693  }
1694  return $ret;
1695  }
foreach($_POST as $key=> $value) $res
getId()
get object id public
$ret
Definition: parser.php:6
$DIC
Definition: xapitoken.php:46
+ 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 2011 of file class.ilObjCmiXapi.php.

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

2012  {
2013  if (null === $cmixUser)
2014  {
2015  $cmixUser = $this->getCurrentCmixUser();
2016  }
2017  $statement = $this->getStatement('satisfied', $cmixUser);
2018  // add type, see https://aicc.github.io/CMI-5_Spec_Current/samples/scenarios/16-not_applicable-no_launch/#satisfied-statement
2019  // see also: https://github.com/AICC/CMI-5_Spec_Current/blob/quartz/cmi5_spec.md#verbs_satisfied
2020  $type = "https://w3id.org/xapi/cmi5/activitytype/course";
2021  $statement['object']['definition']['type'] = $type;
2022  $statement['context']['contextActivities']['grouping'][0]['definition']['type'] = $type;
2023  return $statement;
2024  }
getStatement(string $verb, $cmixUser=null)
blueprint statement
+ Here is the call graph for this function:

◆ getSessionId()

ilObjCmiXapi::getSessionId (   $cmixUser = null)

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

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

Referenced by getStatementExtensions().

1722  {
1723  if (null === $cmixUser)
1724  {
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 357 of file class.ilObjCmiXapi.php.

References $sourceType.

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

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

◆ getStatement()

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

blueprint statement

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

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

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

1817  {
1818  if (null === $cmixUser)
1819  {
1820  $cmixUser = $this->getCurrentCmixUser();
1821  }
1822  $id = self::guidv4();
1823  $actor = $this->getStatementActor($cmixUser);
1824  $verbUri = ilCmiXapiVerbList::getInstance()->getVerbUri($verb);
1825  $extensions = $this->getStatementExtensions($cmixUser);
1826  $registration = $cmixUser->getRegistration();
1827  $contextActivities = $this->getStatementContextActivities();
1828  $object = $this->getStatementObject();
1829  $statement = array (
1830  'id' => $id,
1831  'actor' => $actor,
1832  'verb' =>
1833  array (
1834  'id' => $verbUri
1835  ),
1836  'context' =>
1837  array (
1838  'extensions' => $extensions,
1839  'registration' => $registration,
1840  'contextActivities' => $contextActivities
1841  ),
1842  'object' => $object
1843  );
1844  return $statement;
1845  }
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 1850 of file class.ilObjCmiXapi.php.

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

Referenced by getStatement().

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

◆ getStatementContextActivities()

ilObjCmiXapi::getStatementContextActivities ( )

Minimal statementActivities.

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

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

Referenced by getLaunchedContextTemplate(), and getStatement().

1912  {
1913  $publisherId = $this->getPublisherId();
1914  $activityId = $this->getActivityId();
1915  if (empty($publisherId))
1916  {
1918  }
1919  $ctxActivities = array(
1920  "grouping" => [
1921  [
1922  "objectType" => "Activity",
1923  "id" => "{$publisherId}",
1924  'definition' =>
1925  array (
1926  'name' =>
1927  array (
1928  'de-DE' => $this->getTitle(),
1929  'en-US' => $this->getTitle()
1930  ),
1931  'description' =>
1932  array (
1933  'de-DE' => $this->getDescription(),
1934  'en-US' => $this->getDescription()
1935  )
1936  )]
1937  ],
1938  "category" => [
1939  [
1940  "id" => "https://w3id.org/xapi/cmi5/context/categories/cmi5",
1941  "objectType" => "Activity"
1942  ]
1943  ]
1944  );
1945  return $ctxActivities;
1946  }
+ 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 1895 of file class.ilObjCmiXapi.php.

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

Referenced by getLaunchedContextTemplate(), and getStatement().

1896  {
1897  if (null === $cmixUser)
1898  {
1899  $cmixUser = $this->getCurrentCmixUser();
1900  }
1901  $extensions = array (
1902  'https://w3id.org/xapi/cmi5/context/extensions/sessionid' => $this->getSessionId($cmixUser),
1903  'https://ilias.de/cmi5/activityid' => $this->getActivityId()
1904  );
1905  return $extensions;
1906  }
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 1948 of file class.ilObjCmiXapi.php.

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

Referenced by getStatement().

1949  {
1950  $object = array (
1951  'id' => $this->getActivityId(),
1952  'definition' =>
1953  array (
1954  'name' =>
1955  array (
1956  'de-DE' => $this->getTitle(),
1957  'en-US' => $this->getTitle()
1958  ),
1959  'description' =>
1960  array (
1961  'de-DE' => $this->getDescription(),
1962  'en-US' => $this->getDescription()
1963  )
1964  )
1965  );
1966  return $object;
1967  }
+ 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 1697 of file class.ilObjCmiXapi.php.

References $data.

Referenced by ilCmiXapiLaunchGUI\CMI5preLaunch().

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

◆ iliasUrl()

static ilObjCmiXapi::iliasUrl ( )
static

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

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

2124  {
2125  $regex = '/^(https?\:\/\/[^\/]+).*/';
2126  preg_match($regex, $GLOBALS['DIC']->http()->request()->getUri(), $request_parts);
2127  return $request_parts[1];
2128  }
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 318 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 281 of file class.ilObjCmiXapi.php.

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

◆ isActivationLimited()

ilObjCmiXapi::isActivationLimited ( )
Returns
bool

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

References $activationLimited.

Referenced by saveRepositoryActivationSettings().

2145  {
2146  return $this->activationLimited;
2147  }
$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 346 of file class.ilObjCmiXapi.php.

References getContentType(), and getPublisherId().

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

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

◆ isSourceTypeExternal()

ilObjCmiXapi::isSourceTypeExternal ( )
Returns
bool

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

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

◆ isSourceTypeRemote()

ilObjCmiXapi::isSourceTypeRemote ( )
Returns
bool

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

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

◆ 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)
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.
$DIC
Definition: xapitoken.php:46
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 2130 of file class.ilObjCmiXapi.php.

References ilObject\$log.

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

2130  {
2131  global $log;
2132  if (self::PLUGIN) {
2133  return $log;
2134  }
2135  else {
2136  return \ilLoggerFactory::getLogger('cmix');
2137  }
2138  }
+ 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
getHighscorePercentage()
Gets if the percentage column should be shown.
$DIC
Definition: xapitoken.php:46
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 2185 of file class.ilObjCmiXapi.php.

References $activationEndingTime.

Referenced by loadRepositoryActivationSettings().

2186  {
2187  $this->activationEndingTime = $activationEndingTime;
2188  }
+ Here is the caller graph for this function:

◆ setActivationLimited()

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

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

References $activationLimited.

Referenced by loadRepositoryActivationSettings().

2154  {
2155  $this->activationLimited = $activationLimited;
2156  }
$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 2169 of file class.ilObjCmiXapi.php.

References $activationStartingTime.

Referenced by loadRepositoryActivationSettings().

2170  {
2171  $this->activationStartingTime = $activationStartingTime;
2172  }
+ Here is the caller graph for this function:

◆ setActivationVisibility()

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

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

References $activationVisibility.

Referenced by loadRepositoryActivationSettings().

2202  {
2203  $this->activationVisibility = $activationVisibility;
2204  }
+ Here is the caller graph for this function:

◆ setActivityId()

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

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

References $activityId.

Referenced by load().

398  {
399  $this->activityId = $activityId;
400  }
+ 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 334 of file class.ilObjCmiXapi.php.

References $contentType.

Referenced by load().

335  {
336  //bug before 21-07-24
337  if ($contentType == "learning") {
338  $contentType = self::CONT_TYPE_GENERIC;
339  }
340  $this->contentType = $contentType;
341  }
+ 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 429 of file class.ilObjCmiXapi.php.

References $instructions.

Referenced by load().

430  {
431  $this->instructions = $instructions;
432  }
+ 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 461 of file class.ilObjCmiXapi.php.

References $launchParameters.

Referenced by load().

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

◆ setLaunchUrl()

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

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

References $launchUrl.

Referenced by load().

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

◆ setLrsType()

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

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

References $lrsType.

Referenced by initLrsType().

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

◆ setLrsTypeId()

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

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

References $lrsTypeId.

Referenced by load().

298  {
299  $this->lrsTypeId = $lrsTypeId;
300  }
+ 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 481 of file class.ilObjCmiXapi.php.

References $moveOn.

Referenced by load().

482  {
483  $this->moveOn = $moveOn;
484  }
+ 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 413 of file class.ilObjCmiXapi.php.

References $publisherId.

Referenced by load().

414  {
415  $this->publisherId = $publisherId;
416  }
+ 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 381 of file class.ilObjCmiXapi.php.

References $sourceType.

Referenced by load().

382  {
383  $this->sourceType = $sourceType;
384  }
+ 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  }
$query
$DIC
Definition: xapitoken.php:46
+ 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  }
$query
$DIC
Definition: xapitoken.php:46
+ 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 184 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 187 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 178 of file class.ilObjCmiXapi.php.

Referenced by isBypassProxyEnabled(), and setBypassProxyEnabled().

◆ $completed

ilObjCmiXapi::$completed = true
protected

Definition at line 190 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 223 of file class.ilObjCmiXapi.php.

Referenced by getCurrentCmixUser().

◆ $duration

ilObjCmiXapi::$duration = true
protected

Definition at line 217 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 193 of file class.ilObjCmiXapi.php.

Referenced by getFailed(), and setFailed().

◆ $hide_data

ilObjCmiXapi::$hide_data = false
protected

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

Referenced by getHideData(), and setHideData().

◆ $initialized

ilObjCmiXapi::$initialized = true
protected

Definition at line 196 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 220 of file class.ilObjCmiXapi.php.

Referenced by getNoSubstatements(), and setNoSubstatements().

◆ $only_moveon

ilObjCmiXapi::$only_moveon = false
protected

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

Referenced by getOnlyMoveon(), and setOnlyMoveon().

◆ $passed

ilObjCmiXapi::$passed = true
protected

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

Referenced by getPassed(), and setPassed().

◆ $progressed

ilObjCmiXapi::$progressed = true
protected

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

Referenced by getProgressed(), and setProgressed().

◆ $publisherId

ilObjCmiXapi::$publisherId
protected

◆ $satisfied

ilObjCmiXapi::$satisfied = true
protected

Definition at line 205 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 208 of file class.ilObjCmiXapi.php.

Referenced by getTerminated(), and setTerminated().

◆ $timestamp

ilObjCmiXapi::$timestamp = false
protected

Definition at line 214 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 148 of file class.ilObjCmiXapi.php.

Referenced by getPrivacyName(), and setPrivacyName().

◆ $userPrivacyComment

ilObjCmiXapi::$userPrivacyComment
protected

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

Referenced by getUserPrivacyComment(), and setUserPrivacyComment().

◆ $version

ilObjCmiXapi::$version
protected

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

Referenced by getVersion(), and setVersion().

◆ $xmlManifest

ilObjCmiXapi::$xmlManifest
protected

Definition at line 168 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_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 150 of file class.ilObjCmiXapi.php.

Referenced by ilCmiXapiUser\getName().

◆ PRIVACY_NAME_FULLNAME

const ilObjCmiXapi::PRIVACY_NAME_FULLNAME = 3

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

Referenced by ilCmiXapiUser\getName().

◆ PRIVACY_NAME_LASTNAME

const ilObjCmiXapi::PRIVACY_NAME_LASTNAME = 2

Definition at line 151 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: