ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilObjLearningSequence Class Reference
+ Inheritance diagram for ilObjLearningSequence:
+ Collaboration diagram for ilObjLearningSequence:

Public Member Functions

 __construct (int $id=0, bool $call_by_reference=true)
 
 read ()
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 update ()
 
 delete ()
 delete category and all related data More...
 
 getObjectReferenceProperties ()
 
 storeAvailabilityPeriod (AvailabilityPeriod $period)
 
 getDI ()
 
 getLocalDI ()
 
 getLSSettings ()
 
 updateSettings (ilLearningSequenceSettings $settings)
 
 getLSParticipants ()
 
 getMembersObject ()
 
 getLSAccess ()
 
 getLSItems ()
 
 storeLSItems (array $ls_items)
 Update LSItems. More...
 
 deletePostConditionsForSubObjects (array $ref_ids)
 Delete post-conditions for ref ids. More...
 
 getPossiblePostConditionsForType (string $type)
 
 getStateDB ()
 
 getLSLearnerItems (int $usr_id)
 
 getLSRoles ()
 
 getMailToMembersType ()
 Get mail to members type. More...
 
 getShowMembers ()
 
 announceLSOOnline ()
 
 announceLSOOffline ()
 
 setEffectiveOnlineStatus (bool $status)
 
 getCurrentUserLearningMap (bool $with_panel=true)
 The learning map of the current user, rendered as html. More...
 
 renderLearningMap (LSOLearningMapDataBuilder $data_builder, bool $with_panel=true)
 Renders the learning map from the given data builder. More...
 
 getCurrentUserLaunchButtons ()
 
 getLocalLearningSequenceRoles (bool $translate=false)
 
 getDefaultMemberRole ()
 
 getDefaultAdminRole ()
 
 getDefaultLearningSequenceRoles (string $a_grp_id="")
 
 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. More...
 
 readMemberData (array $user_ids, ?array $columns=null)
 
 getParentObjectInfo (int $ref_id, array $search_types)
 
 getLPCompletionStates ()
 
 getContentPageId ()
 
 hasContentPage (LSOPageType $page_type)
 
 createContentPage (LSOPageType $page_type)
 
 getContentPageHTML (LSOPageType $page_type)
 
- Public Member Functions inherited from ilContainer
 getTileSizes ()
 
 getObjectTranslation ()
 
 setObjectTranslation (?Translations $obj_trans)
 
 createContainerDirectory ()
 
 getContainerDirectory ()
 
 setHiddenFilesFound (bool $a_hiddenfilesfound)
 
 getHiddenFilesFound ()
 
 getStyleSheetId ()
 
 setStyleSheetId (int $a_style_id)
 
 setNewsTimeline (bool $a_val)
 
 getNewsTimeline ()
 
 setNewsTimelineAutoEntries (bool $a_val)
 
 getNewsTimelineAutoEntries ()
 
 setNewsTimelineLandingPage (bool $a_val)
 
 getNewsTimelineLandingPage ()
 
 isNewsTimelineEffective ()
 
 isNewsTimelineLandingPageEffective ()
 
 setNewsBlockActivated (bool $a_val)
 
 getNewsBlockActivated ()
 
 setUseNews (bool $a_val)
 
 getUseNews ()
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies (container sorting) More...
 
 cloneAllObject (string $session_id, string $client_id, string $new_type, int $ref_id, int $clone_source, array $options, bool $soap_call=false, int $a_submode=1)
 
 delete ()
 delete category and all related data More...
 
 getViewMode ()
 
 getOrderType ()
 
 setOrderType (int $a_value)
 
 isClassificationFilterActive ()
 
 filteredSubtree ()
 Note grp/crs currently allow to filter in their whole subtrees Catetories only their direct childs. More...
 
 getSubItems (bool $a_admin_panel_enabled=false, bool $a_include_side_block=false, int $a_get_single=0, ?ilContainerUserFilter $container_user_filter=null)
 
 gotItems ()
 
 addAdditionalSubItemInformation (array &$object)
 Add additional information to sub item, e.g. More...
 
 getGroupedObjTypes ()
 
 enablePageEditing ()
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 update ()
 
 read ()
 
 readContainerSettings ()
 
 removeTranslations ()
 
 deleteTranslation (string $a_lang)
 
 addTranslation (string $a_title, string $a_desc, string $a_lang, string $a_lang_default)
 
- Public Member Functions inherited from ilObject
 getObjectProperties ()
 
 flushObjectProperties ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 processAutoRating ()
 
 read ()
 
 getId ()
 
 setId (int $id)
 
 setRefId (int $ref_id)
 
 getRefId ()
 
 getType ()
 
 setType (string $type)
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 
 getUntranslatedTitle ()
 Get untranslated object title WebDAV needs to access the untranslated title of an object. More...
 
 setTitle (string $title)
 
 getDescription ()
 
 setDescription (string $description)
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 
 setImportId (string $import_id)
 
 setOfflineStatus (bool $status)
 
 getOfflineStatus ()
 
 supportsOfflineHandling ()
 
 getOwner ()
 
 getOwnerName ()
 get full name of object owner More...
 
 setOwner (int $usr_id)
 
 getCreateDate ()
 Get create date in YYYY-MM-DD HH-MM-SS format. More...
 
 getLastUpdateDate ()
 Get last update date in YYYY-MM-DD HH-MM-SS format. More...
 
 create ()
 note: title, description and type should be set when this function is called More...
 
 update ()
 
 MDUpdateListener (string $element)
 Metadata update listener. More...
 
 createMetaData ()
 
 updateMetaData ()
 
 deleteMetaData ()
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree (int $parent_ref_id)
 maybe this method should be in tree object!? More...
 
 setPermissions (int $parent_ref_id)
 
 setParentRolePermissions (int $parent_ref_id)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type. More...
 
 applyDidacticTemplate (int $tpl_id)
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo (int $target_id, int $copy_id, int $new_obj_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies (int $target_id, int $copy_id)
 Clone object dependencies. More...
 
 cloneMetaData (ilObject $target_obj)
 Copy meta data. More...
 
 selfOrParentWithRatingEnabled ()
 
 getPossibleSubObjects (bool $filter=true)
 get all possible sub objects of this type the object can decide which types of sub objects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static getInstanceByRefId (int $ref_id)
 
static _goto (string $target, string $add="")
 Goto target learning sequence. More...
 
- Static Public Member Functions inherited from ilContainer
static _getContainerDirectory (int $a_id)
 
static _lookupContainerSetting (int $a_id, string $a_keyword, ?string $a_default_value=null)
 
static _hasContainerSetting (int $a_id, string $a_keyword)
 
static _writeContainerSetting (int $a_id, string $a_keyword, string $a_value)
 
static _getContainerSettings (int $a_id)
 
static _deleteContainerSettings (int $a_id, string $a_keyword="", bool $a_keyword_like=false)
 
static _exportContainerSettings (ilXmlWriter $a_xml, int $a_obj_id)
 
static getCompleteDescriptions (array $objects)
 overwrites description fields to long or short description in an assoc array keys needed (obj_id and description) More...
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId (string $import_id)
 Get (latest) object id for an import id. More...
 
static _lookupImportId (int $obj_id)
 
static _lookupOwnerName (int $owner_id)
 Lookup owner name for owner id. More...
 
static _getIdForImportId (string $import_id)
 
static _getAllReferences (int $id)
 get all reference ids for object ID More...
 
static _lookupTitle (int $obj_id)
 
static lookupOfflineStatus (int $obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner (int $obj_id)
 Lookup owner user ID for object ID. More...
 
static _getIdsForTitle (string $title, string $type='', bool $partial_match=false)
 
static _lookupDescription (int $obj_id)
 
static _lookupLastUpdate (int $obj_id, bool $formatted=false)
 
static _getLastUpdateOfObjects (array $obj_ids)
 
static _lookupObjId (int $ref_id)
 
static _setDeletedDate (int $ref_id, int $deleted_by)
 
static setDeletedDates (array $ref_ids, int $user_id)
 
static _resetDeletedDate (int $ref_id)
 
static _lookupDeletedDate (int $ref_id)
 
static _writeTitle (int $obj_id, string $title)
 write title to db (static) More...
 
static _writeDescription (int $obj_id, string $desc)
 write description to db (static) More...
 
static _writeImportId (int $obj_id, string $import_id)
 write import id to db (static) More...
 
static _lookupType (int $id, bool $reference=false)
 
static _isInTrash (int $ref_id)
 
static _hasUntrashedReference (int $obj_id)
 checks whether an object has at least one reference that is not in trash More...
 
static _lookupObjectId (int $ref_id)
 
static _getObjectsDataForType (string $type, bool $omit_trash=false)
 get all objects of a certain type More...
 
static _exists (int $id, bool $reference=false, ?string $type=null)
 checks if an object exists in object_data More...
 
static _getObjectsByType (string $obj_type="", ?int $owner=null)
 
static _prepareCloneSelection (array $ref_ids, string $new_type, bool $show_path=true)
 Prepare copy wizard object selection. More...
 
static getIconForType (string $type)
 
static _getIcon (int $obj_id=0, string $size="big", string $type="", bool $offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (array &$deps, int $ref_id, int $obj_id, string $type, int $depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies (int $obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $obj_ids)
 
static getAllOwnedRepositoryObjects (int $user_id)
 
static fixMissingTitles ($type, array &$obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate (int $obj_id)
 
static _getObjectTypeIdByTitle (string $type, ?\ilDBInterface $ilDB=null)
 

Data Fields

const string OBJ_TYPE = 'lso'
 
const string E_CREATE = 'create'
 
const string E_UPDATE = 'update'
 
const string E_DELETE = 'delete'
 
- Data Fields inherited from ilContainer
const VIEW_SESSIONS = 0
 
const VIEW_OBJECTIVE = 1
 
const VIEW_TIMING = 2
 
const VIEW_ARCHIVE = 3
 
const VIEW_SIMPLE = 4
 
const VIEW_BY_TYPE = 5
 
const VIEW_INHERIT = 6
 
const VIEW_DEFAULT = self::VIEW_BY_TYPE
 
const SORT_TITLE = 0
 
const SORT_MANUAL = 1
 
const SORT_ACTIVATION = 2
 
const SORT_INHERIT = 3
 
const SORT_CREATION = 4
 
const SORT_DIRECTION_ASC = 0
 
const SORT_DIRECTION_DESC = 1
 
const SORT_NEW_ITEMS_POSITION_TOP = 0
 
const SORT_NEW_ITEMS_POSITION_BOTTOM = 1
 
const SORT_NEW_ITEMS_ORDER_TITLE = 0
 
const SORT_NEW_ITEMS_ORDER_CREATION = 1
 
const SORT_NEW_ITEMS_ORDER_ACTIVATION = 2
 
const TILE_NORMAL = 0
 
const TILE_SMALL = 1
 
const TILE_LARGE = 2
 
const TILE_EXTRA_LARGE = 3
 
const TILE_FULL = 4
 
array $items = []
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 
const DESC_LENGTH = 128
 
const LONG_DESC_LENGTH = 4000
 
const TABLE_OBJECT_DATA = "object_data"
 
array $objectList
 
string $untranslatedTitle
 

Protected Member Functions

 raiseEvent (string $event_type)
 
 cloneIntroAndExtroContentPages (ilObjLearningSequence $new_obj, array $cp_types)
 
 cloneAutoGeneratedRoles (ilObjLearningSequence $new_obj)
 
 cloneSettings (ilObjLearningSequence $new_obj)
 
 cloneLPSettings (int $obj_id)
 
 getDIC ()
 
 getSettingsDB ()
 
 getLSItemsDB ()
 
 getPostConditionDB ()
 
 getLearnerProgressDB ()
 
- Protected Member Functions inherited from ilContainer
 getInitialSubitems ()
 
 applyContainerUserFilter (array $objects, ?ilContainerUserFilter $container_user_filter=null)
 
- Protected Member Functions inherited from ilObject
 doMDUpdateListener (string $a_element)
 
 beforeMDUpdateListener (string $a_element)
 
 doCreateMetaData ()
 
 beforeCreateMetaData ()
 
 doUpdateMetaData ()
 
 beforeUpdateMetaData ()
 
 doDeleteMetaData ()
 
 beforeDeleteMetaData ()
 
 handleAutoRating ()
 
 hasAutoRating ()
 

Static Protected Member Functions

static getCopyWizardRefIdMapping (int $copy_id)
 
static mapCopiedRefId (int $source_ref_id, array $mapping)
 

Protected Attributes

ilLSItemsDB $items_db = null
 
ilLSPostConditionDB $conditions_db = null
 
ilLearnerProgressDB $learner_progress_db = null
 
ilLearningSequenceParticipants $ls_participants = null
 
ilLearningSequenceSettings $ls_settings = null
 
ilLSStateDB $state_db = null
 
ilLearningSequenceRoles $ls_roles = null
 
ilLearningSequenceSettingsDB $settings_db = null
 
ArrayAccess $di = null
 
ArrayAccess $local_di = null
 
ilObjLearningSequenceAccess $ls_access = null
 
ArrayAccess $dic
 
ilCtrl $ctrl
 
Service $il_news
 
ilConditionHandler $il_condition_handler
 
ReferencePropertiesRepository $repo_ref_props
 
ObjectReferenceProperties $ref_props = null
 
- Protected Attributes inherited from ilContainer
News $news
 
ILIAS Style Content DomainService $content_style_domain
 
ILIAS Container InternalDomainService $domain
 
ilAccessHandler $access
 
ilRbacSystem $rbacsystem
 
ilObjUser $user
 
ilObjectDefinition $obj_definition
 
int $order_type = 0
 
bool $hiddenfilesfound = false
 
bool $news_timeline = false
 
bool $news_timeline_auto_entries = false
 
ilSetting $setting
 
Translations $obj_trans = null
 
int $style_id = 0
 
bool $news_timeline_landing_page = false
 
bool $news_block_activated = false
 
bool $use_news = false
 
ilRecommendedContentManager $recommended_content_manager
 
array $type_grps = null
 
- Protected Attributes inherited from ilObject
ilLogger $obj_log
 
ILIAS $ilias
 
ilObjectDefinition $obj_definition
 
ilDBInterface $db
 
ilLogger $log
 
ilErrorHandling $error
 
ilTree $tree
 
ilAppEventHandler $app_event_handler
 
ilRbacAdmin $rbac_admin
 
ilRbacReview $rbac_review
 
ilObjUser $user
 
ilLanguage $lng
 
LOMServices $lom_services
 
bool $call_by_reference
 
int $max_title = self::TITLE_LENGTH
 
int $max_desc = self::DESC_LENGTH
 
bool $add_dots = true
 
int $ref_id = null
 
string $type = ""
 
string $title = ""
 
string $desc = ""
 
string $long_desc = ""
 
int $owner = 0
 
string $create_date = ""
 
string $last_update = ""
 
string $import_id = ""
 
bool $register = false
 

Private Member Functions

 cloneConditions (int $target_id, int $copy_id)
 

Additional Inherited Members

- Static Public Attributes inherited from ilContainer
static bool $data_preloaded = false
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilObjLearningSequence::__construct ( int  $id = 0,
bool  $call_by_reference = true 
)

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

61 {
62 global $DIC;
63 $this->dic = $DIC;
64
65 $this->type = self::OBJ_TYPE;
66 $this->lng = $DIC['lng'];
67 $this->ctrl = $DIC['ilCtrl'];
68 $this->user = $DIC['ilUser'];
69 $this->tree = $DIC['tree'];
70 $this->log = $DIC["ilLoggerFactory"]->getComponentLogger('lso');
71 $this->app_event_handler = $DIC['ilAppEventHandler'];
72 $this->il_news = $DIC->news();
73 $this->il_condition_handler = new ilConditionHandler();
74 $this->repo_ref_props = LocalDIC::dic()['properties.object_reference.repositoy'];
76
77 $this->lng->loadLanguageModule('rbac');
78 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
INTERNAL CLASS: Please do not use in consumer code.
bool $call_by_reference
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References ilObject\$call_by_reference, $DIC, $id, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), OBJ_TYPE, and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjLearningSequence::_goto ( string  $target,
string  $add = "" 
)
static

Goto target learning sequence.

Definition at line 572 of file class.ilObjLearningSequence.php.

572 : void
573 {
574 global $DIC;
575 $main_tpl = $DIC->ui()->mainTemplate();
576
577 $ilAccess = $DIC['ilAccess'];
578 $ilErr = $DIC['ilErr'];
579 $lng = $DIC['lng'];
580 $ilUser = $DIC['ilUser'];
581 $request_wrapper = $DIC->http()->wrapper()->query();
582 $refinery = $DIC->refinery();
583
584 if (substr($add, 0, 5) == 'rcode') {
585 if ($ilUser->getId() == ANONYMOUS_USER_ID) {
586 $request_target = $request_wrapper->retrieve("target", $refinery->kindlyTo()->string());
587 // Redirect to login for anonymous
589 "login.php?target=" . $request_target . "&cmd=force_login&lang=" .
590 $ilUser->getCurrentLanguage()
591 );
592 }
593
594 // Redirects to target location after assigning user to learning sequence
596 $target,
598 substr($add, 5)
599 );
600 }
601
602 if ($add == "mem" && $ilAccess->checkAccess("manage_members", "", $target)) {
604 }
605
606 if ($ilAccess->checkAccess("read", "", $target)) {
608 } else {
609 // to do: force flat view
610 if ($ilAccess->checkAccess("visible", "", $target)) {
611 ilObjectGUI::_gotoRepositoryNode($target, "infoScreenGoto");
612 } else {
613 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
614 $main_tpl->setOnScreenMessage('failure', sprintf(
615 $lng->txt("msg_no_perm_read_item"),
617 ), true);
619 }
620 }
621 }
622
623 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
624 }
txt(string|LanguageIdentifier $a_topic, ?int $n=null)
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static handleCode(int $a_ref_id, string $a_type, string $a_code)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
static _lookupType(int $id, bool $reference=false)
ilLanguage $lng
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
static redirect(string $a_script)
const ANONYMOUS_USER_ID
Definition: constants.php:27
const ROOT_FOLDER_ID
Definition: constants.php:32

References $DIC, ilObject\$lng, ILIAS\UI\examples\Layout\Page\Mail\$refinery, ILIAS\UI\examples\Layout\Page\Mail\$request_wrapper, ILIAS\Scripts\PHPStan\$target, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ANONYMOUS_USER_ID, ilMembershipRegistrationCodeUtils\handleCode(), ilUtil\redirect(), ROOT_FOLDER_ID, and ilLanguage\txt().

+ Here is the call graph for this function:

◆ announceLSOOffline()

ilObjLearningSequence::announceLSOOffline ( )

Definition at line 643 of file class.ilObjLearningSequence.php.

643 : void
644 {
645 //NYI
646 }

◆ announceLSOOnline()

ilObjLearningSequence::announceLSOOnline ( )

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

631 : void
632 {
633 $ns = $this->il_news;
634 $context = $ns->contextForRefId($this->getRefId());
635 $item = $ns->item($context);
636 $item->setContentIsLangVar(true);
637 $item->setContentTextIsLangVar(true);
638 $item->setTitle("lso_news_online_title");
639 $item->setContent("lso_news_online_txt");
640 $ns->data()->save($item);
641 }
contextForRefId(int $ref_id, int $subid=0, string $subtype="")
Get context object for news.

References $il_news, ILIAS\News\Service\contextForRefId(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ cloneAutoGeneratedRoles()

ilObjLearningSequence::cloneAutoGeneratedRoles ( ilObjLearningSequence  $new_obj)
protected

Definition at line 336 of file class.ilObjLearningSequence.php.

336 : bool
337 {
338 $admin = $this->getDefaultAdminRole();
339 $new_admin = $new_obj->getDefaultAdminRole();
340
341 if (!$admin || !$new_admin || !$this->getRefId() || !$new_obj->getRefId()) {
342 $this->log->info('Error cloning auto generated role: il_lso_admin');
343 }
344
345 $this->rbac_admin->copyRolePermissions($admin, $this->getRefId(), $new_obj->getRefId(), $new_admin, true);
346 $this->log->info('Finished copying of role lso_admin.');
347
348 $member = $this->getDefaultMemberRole();
349 $new_member = $new_obj->getDefaultMemberRole();
350
351 if (!$member || !$new_member) {
352 $this->log->info('Error cloning auto generated role: il_lso_member');
353 }
354
355 $this->rbac_admin->copyRolePermissions($member, $this->getRefId(), $new_obj->getRefId(), $new_member, true);
356 $this->log->info('Finished copying of role lso_member.');
357
358 return true;
359 }

References getDefaultAdminRole(), getDefaultMemberRole(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ cloneConditions()

ilObjLearningSequence::cloneConditions ( int  $target_id,
int  $copy_id 
)
private
Parameters
int$target_id
int$copy_id
Returns
bool
Exceptions
ReflectionException
ilException

Definition at line 238 of file class.ilObjLearningSequence.php.

238 : bool
239 {
240 $mapping = self::getCopyWizardRefIdMapping($copy_id);
241 $condition_factory = $this->getDI()["conditions.factory"];
242
243 foreach ($this->getLSItems() as $ls_item) {
244 $item_ref_id = $ls_item->getRefId();
245 $new_item_ref_id = self::mapCopiedRefId($item_ref_id, $mapping);
246 if ($new_item_ref_id === 0) {
247 continue;
248 }
249
250 $conditions = $condition_factory->getConditionIdsForItem($item_ref_id);
251 foreach ($conditions as $condition_id) {
252 $created = false;
253 try {
254 $condition = $condition_factory->getConditionInstanceById($condition_id);
256 $this->log->warning(
257 'Condition ' . $condition_id . ' is not copied: ' . $e->getMessage()
258 );
259 continue;
260 }
261 $condition_name = $condition->getIdentifierForClass($condition::class);
262
263 try {
264 $new_condition = $condition_factory->getConditionInstanceByName($condition_name);
265 $new_condition->setLsoRefId($target_id);
266 $new_condition->setObjRefId($new_item_ref_id);
267 if ($condition instanceof SubtypeAwareInterface) {
268 $new_condition->setSubtype($condition->getSubtype());
269 }
270 $export_payload = $condition->export();
271
272 $new_condition->create(true);
273 $created = true;
274
275 $new_condition_id = (int) $new_condition->getConditionId();
276 if ($new_condition_id > 0) {
277 $new_condition->setImportMapping($mapping);
278 $new_condition->import($export_payload, $new_condition_id);
279 }
280 } catch (Throwable $e) {
281 if ($created && isset($new_condition)) {
282 $new_condition->delete();
283 }
284
285 $this->log->warning(__METHOD__ . ': condition copy failed: ' . $e->getMessage());
286 continue;
287 }
288 }
289 }
290
291 return true;
292 }
Thrown if a condition is stored with a type which is not contributed (anymore).
static mapCopiedRefId(int $source_ref_id, array $mapping)
static getCopyWizardRefIdMapping(int $copy_id)

References Vendor\Package\$e, getCopyWizardRefIdMapping(), getDI(), getLSItems(), ILIAS\Repository\int(), and mapCopiedRefId().

+ Here is the call graph for this function:

◆ cloneIntroAndExtroContentPages()

ilObjLearningSequence::cloneIntroAndExtroContentPages ( ilObjLearningSequence  $new_obj,
array  $cp_types 
)
protected
Parameters
list<LSOPageType>$cp_types

Definition at line 318 of file class.ilObjLearningSequence.php.

318 : void
319 {
320 foreach ($cp_types as $type) {
321 $new_obj->createContentPage($type);
322 if ($this->hasContentPage($type)) {
323 $target_page_id = $new_obj->getContentPageId();
324 $source_page_id = $this->getContentPageId();
325
326 if ($type === LSOPageType::INTRO) {
327 $source_page = new ilLSOIntroPage($source_page_id);
328 } else {
329 $source_page = new ilLSOExtroPage($source_page_id);
330 }
331 $source_page->copy($target_page_id, $type->value, $target_page_id);
332 }
333 }
334 }
createContentPage(LSOPageType $page_type)
hasContentPage(LSOPageType $page_type)
string $type

References ilObject\$type, createContentPage(), getContentPageId(), and hasContentPage().

+ Here is the call graph for this function:

◆ cloneLPSettings()

ilObjLearningSequence::cloneLPSettings ( int  $obj_id)
protected

Definition at line 383 of file class.ilObjLearningSequence.php.

383 : void
384 {
385 $lp_settings = new ilLPObjSettings($this->getId());
386 $lp_settings->cloneSettings($obj_id);
387 }

References ilObject\getId().

+ Here is the call graph for this function:

◆ cloneSettings()

ilObjLearningSequence::cloneSettings ( ilObjLearningSequence  $new_obj)
protected

Definition at line 361 of file class.ilObjLearningSequence.php.

361 : void
362 {
363 $source = $this->getLSSettings();
364 $target = $new_obj->getLSSettings();
365
366 foreach ($source->getUploads() as $key => $upload_info) {
367 $target = $target->withUpload($upload_info, $key);
368 }
369
370 foreach ($source->getDeletions() as $deletion) {
371 $target = $target->withDeletion($deletion);
372 }
373
375 ->withAbstract($source->getAbstract())
376 ->withExtro($source->getExtro())
377 ->withAbstractImage($source->getAbstractImage())
378 ->withExtroImage($source->getExtroImage());
379
380 $new_obj->updateSettings($target);
381 }
updateSettings(ilLearningSequenceSettings $settings)

References ILIAS\Scripts\PHPStan\$target, getLSSettings(), and updateSettings().

+ Here is the call graph for this function:

◆ create()

ilObjLearningSequence::create ( )

note: title, description and type should be set when this function is called

Reimplemented from ilContainer.

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

100 : int
101 {
102 $id = parent::create();
103 if (!$id) {
104 return 0;
105 }
106
107 $this->createMetaData();
108 $this->raiseEvent(self::E_CREATE);
109
110 return $this->getId();
111 }

References $id, ilObject\createMetaData(), ilObject\getId(), and raiseEvent().

+ Here is the call graph for this function:

◆ createContentPage()

ilObjLearningSequence::createContentPage ( LSOPageType  $page_type)

Definition at line 779 of file class.ilObjLearningSequence.php.

779 : void
780 {
781 if ($this->hasContentPage($page_type)) {
782 throw new LogicException('will not create content page - it already exists.');
783 }
784 $new_page_object = $page_type === LSOPageType::INTRO ? new ilLSOIntroPage() : new ilLSOExtroPage();
785 $new_page_object->setId($this->getContentPageId());
786 $new_page_object->setParentId($this->getId());
787 $new_page_object->createFromXML();
788 }

References getContentPageId(), ilObject\getId(), and hasContentPage().

Referenced by cloneIntroAndExtroContentPages().

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

◆ delete()

ilObjLearningSequence::delete ( )

delete category and all related data

Returns
bool true if all object data were removed; false if only a references were removed

Reimplemented from ilContainer.

Definition at line 125 of file class.ilObjLearningSequence.php.

125 : bool
126 {
127 $this->deleteMetaData();
128 $lso_ref_id = $this->getRefId();
129
130 if (!parent::delete()) {
131 return false;
132 }
133
135 $this->getSettingsDB()->delete($this->getId());
136 $this->getStateDB()->deleteFor($lso_ref_id);
137 $this->getDI()["conditions.handler"]->deleteConditionsByLSORefId($lso_ref_id);
138
139 $this->raiseEvent(self::E_DELETE);
140
141 return true;
142 }
static _deleteAllEntries(int $a_obj_id)
Delete all entries Normally called in case of object deletion.

References ilParticipants\_deleteAllEntries(), ilObject\deleteMetaData(), getDI(), ilObject\getId(), ilObject\getRefId(), getSettingsDB(), getStateDB(), and raiseEvent().

+ Here is the call graph for this function:

◆ deletePostConditionsForSubObjects()

ilObjLearningSequence::deletePostConditionsForSubObjects ( array  $ref_ids)

Delete post-conditions for ref ids.

Parameters
int[]$ref_ids
Exceptions
ilRepositoryException

Definition at line 505 of file class.ilObjLearningSequence.php.

505 : void
506 {
507 $rep_utils = new ilRepUtil();
508 $rep_utils->deleteObjects($this->getRefId(), $ref_ids);
509 $db = $this->getPostConditionDB();
510 $db->delete($ref_ids);
511 }
ilDBInterface $db
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilObject\$db, getPostConditionDB(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ getContentPageHTML()

ilObjLearningSequence::getContentPageHTML ( LSOPageType  $page_type)

Definition at line 790 of file class.ilObjLearningSequence.php.

790 : string
791 {
792 if (!$this->hasContentPage($page_type)) {
793 return '';
794 }
795
796 $gui = $page_type === LSOPageType::INTRO ?
797 new ilObjLearningSequenceEditIntroGUI(LSOPageType::INTRO->value, $this->getContentPageId()) :
799
800 $gui->setPresentationTitle("");
801 $gui->setTemplateOutput(false);
802 $gui->setHeader("");
803 $ret = $gui->showPage();
804 return $ret;
805 }
LSOPageType
Definition: LSOPageType.php:22
@ EXTRO
Definition: LSOPageType.php:24
Class ilObjLearningSequenceEditExtroGUI @ilCtrl_Calls ilObjLearningSequenceEditExtroGUI: ilPageEditor...
Class ilObjLearningSequenceEditIntroGUI @ilCtrl_Calls ilObjLearningSequenceEditIntroGUI: ilPageEditor...
setPresentationTitle(string $a_title="")

References EXTRO, getContentPageId(), and hasContentPage().

+ Here is the call graph for this function:

◆ getContentPageId()

ilObjLearningSequence::getContentPageId ( )

Definition at line 769 of file class.ilObjLearningSequence.php.

769 : int
770 {
771 return $this->getId();
772 }

References ilObject\getId().

Referenced by cloneIntroAndExtroContentPages(), createContentPage(), and getContentPageHTML().

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

◆ getCopyWizardRefIdMapping()

static ilObjLearningSequence::getCopyWizardRefIdMapping ( int  $copy_id)
staticprotected
Returns
array<int|string, mixed>

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

297 : array
298 {
299 $cp_options = ilCopyWizardOptions::_getInstance($copy_id);
300 return array_filter($cp_options->getMappings(), 'is_numeric', ARRAY_FILTER_USE_KEY);
301 }
static _getInstance(int $a_copy_id)

References ilCopyWizardOptions\_getInstance().

Referenced by cloneConditions().

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

◆ getCurrentUserLaunchButtons()

ilObjLearningSequence::getCurrentUserLaunchButtons ( )

Definition at line 697 of file class.ilObjLearningSequence.php.

697 : string
698 {
699 $dic = $this->getLocalDI();
700 $buttons = $dic["player.launchlinksbuilder"]->getLaunchbuttonsComponent();
701 return $dic['ui.renderer']->render($buttons);
702 }

References $dic, and getLocalDI().

+ Here is the call graph for this function:

◆ getCurrentUserLearningMap()

ilObjLearningSequence::getCurrentUserLearningMap ( bool  $with_panel = true)

The learning map of the current user, rendered as html.

Used by the page content element ilPCLearningMap on the intro-/extro-page. Which map is built - the condition graph of the adaptive mode or the plain chain of the sequential one - is decided in the local DI by the operation mode.

Definition at line 660 of file class.ilObjLearningSequence.php.

660 : string
661 {
662 return $this->renderLearningMap(
663 $this->getLocalDI()['learning_map.data_builder'],
664 $with_panel
665 );
666 }
renderLearningMap(LSOLearningMapDataBuilder $data_builder, bool $with_panel=true)
Renders the learning map from the given data builder.

References getLocalDI(), and renderLearningMap().

+ Here is the call graph for this function:

◆ getDefaultAdminRole()

ilObjLearningSequence::getDefaultAdminRole ( )

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

721 : int
722 {
723 return $this->getLSRoles()->getDefaultAdminRole();
724 }

References getLSRoles().

Referenced by cloneAutoGeneratedRoles().

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

◆ getDefaultLearningSequenceRoles()

ilObjLearningSequence::getDefaultLearningSequenceRoles ( string  $a_grp_id = "")
Returns
array<string, int>|[]

Definition at line 729 of file class.ilObjLearningSequence.php.

729 : array
730 {
731 return $this->getLSRoles()->getDefaultLearningSequenceRoles($a_grp_id);
732 }

References getLSRoles().

+ Here is the call graph for this function:

◆ getDefaultMemberRole()

ilObjLearningSequence::getDefaultMemberRole ( )

Definition at line 716 of file class.ilObjLearningSequence.php.

716 : int
717 {
718 return $this->getLSRoles()->getDefaultMemberRole();
719 }

References getLSRoles().

Referenced by cloneAutoGeneratedRoles().

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

◆ getDI()

ilObjLearningSequence::getDI ( )

Definition at line 394 of file class.ilObjLearningSequence.php.

394 : ArrayAccess
395 {
396 if (is_null($this->di)) {
397 $di = new ilLSDI();
398 $di->init($this->getDIC());
399 $this->di = $di;
400 }
401 return $this->di;
402 }

References $di, and getDIC().

Referenced by ilLearningSequenceXMLWriter\__construct(), cloneConditions(), delete(), ILIAS\LearningSequence\Content\enforceOfflineForMissingBoundaries(), getLocalDI(), getPostConditionDB(), getSettingsDB(), getStateDB(), ILIAS\LearningSequence\Content\Adaptive\LSOAdaptiveContent\manageContent(), and ilObjLearningSequenceSettingsGUI\update().

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

◆ getDIC()

ilObjLearningSequence::getDIC ( )
protected

Definition at line 389 of file class.ilObjLearningSequence.php.

389 : ArrayAccess
390 {
391 return $this->dic;
392 }

References $dic.

Referenced by getDI(), and getLocalDI().

+ Here is the caller graph for this function:

◆ getInstanceByRefId()

◆ getLearnerProgressDB()

ilObjLearningSequence::getLearnerProgressDB ( )
protected

Definition at line 528 of file class.ilObjLearningSequence.php.

529 {
530 if (!$this->learner_progress_db) {
531 $this->learner_progress_db = $this->getLocalDI()['db.progress'];
532 }
534 }
Get LearningProgress and availability of items in sequence.
ilLearnerProgressDB $learner_progress_db

References $learner_progress_db, and getLocalDI().

Referenced by getLSLearnerItems().

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

◆ getLocalDI()

ilObjLearningSequence::getLocalDI ( )

Definition at line 404 of file class.ilObjLearningSequence.php.

404 : ArrayAccess
405 {
406 if (is_null($this->local_di)) {
407 $di = new ilLSLocalDI();
408 $di->init(
409 $this->getDIC(),
410 $this->getDI(),
411 new Factory(),
412 $this
413 );
414 $this->local_di = $di;
415 }
416 return $this->local_di;
417 }
Builds data types.
Definition: Factory.php:36

References $di, $local_di, getDI(), and getDIC().

Referenced by getCurrentUserLaunchButtons(), getCurrentUserLearningMap(), getLearnerProgressDB(), getLSItemsDB(), getLSParticipants(), and getLSRoles().

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

◆ getLocalLearningSequenceRoles()

ilObjLearningSequence::getLocalLearningSequenceRoles ( bool  $translate = false)
Returns
array<string, int>

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

711 : array
712 {
713 return $this->getLSRoles()->getLocalLearningSequenceRoles($translate);
714 }

References getLSRoles().

+ Here is the call graph for this function:

◆ getLPCompletionStates()

ilObjLearningSequence::getLPCompletionStates ( )
Returns
int[]

Definition at line 762 of file class.ilObjLearningSequence.php.

762 : array
763 {
764 return [
766 ];
767 }
const int LP_STATUS_COMPLETED_NUM

References ilLPStatus\LP_STATUS_COMPLETED_NUM.

◆ getLSAccess()

ilObjLearningSequence::getLSAccess ( )

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

473 {
474 if (is_null($this->ls_access)) {
475 $this->ls_access = new ilObjLearningSequenceAccess();
476 }
477
478 return $this->ls_access;
479 }
ilObjLearningSequenceAccess $ls_access

References $ls_access.

◆ getLSItems()

ilObjLearningSequence::getLSItems ( )
Returns
LSItem[]

Definition at line 484 of file class.ilObjLearningSequence.php.

484 : array
485 {
486 $db = $this->getLSItemsDB();
487 return $db->getLSItems($this->getRefId());
488 }

References ilObject\$db, getLSItemsDB(), and ilObject\getRefId().

Referenced by cloneConditions(), and ILIAS\LearningSequence\Content\Adaptive\LSOAdaptiveContent\manageContent().

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

◆ getLSItemsDB()

ilObjLearningSequence::getLSItemsDB ( )
protected

Definition at line 442 of file class.ilObjLearningSequence.php.

443 {
444 if (!$this->items_db) {
445 $this->items_db = $this->getLocalDI()['db.lsitems'];
446 }
447 return $this->items_db;
448 }
Class ilLSItemsDB.
Definition: ilLSItemsDB.php:25

References $items_db, and getLocalDI().

Referenced by getLSItems(), and storeLSItems().

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

◆ getLSLearnerItems()

ilObjLearningSequence::getLSLearnerItems ( int  $usr_id)
Returns
LSLearnerItem[]

Definition at line 547 of file class.ilObjLearningSequence.php.

547 : array
548 {
549 $db = $this->getLearnerProgressDB();
550 return $db->getLearnerItems($usr_id, $this->getRefId());
551 }

References ilObject\$db, getLearnerProgressDB(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ getLSParticipants()

ilObjLearningSequence::getLSParticipants ( )

Definition at line 458 of file class.ilObjLearningSequence.php.

459 {
460 if (!$this->ls_participants) {
461 $this->ls_participants = $this->getLocalDI()['participants'];
462 }
463
465 }
ilLearningSequenceParticipants $ls_participants

References $ls_participants, and getLocalDI().

Referenced by ilLearningSequenceParticipantsTableGUI\__construct(), and getMembersObject().

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

◆ getLSRoles()

ilObjLearningSequence::getLSRoles ( )

Definition at line 553 of file class.ilObjLearningSequence.php.

554 {
555 if (!$this->ls_roles) {
556 $this->ls_roles = $this->getLocalDI()['roles'];
557 }
558 return $this->ls_roles;
559 }
ilLearningSequenceRoles $ls_roles

References $ls_roles, and getLocalDI().

Referenced by getDefaultAdminRole(), getDefaultLearningSequenceRoles(), getDefaultMemberRole(), getLocalLearningSequenceRoles(), and initDefaultRoles().

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

◆ getLSSettings()

ilObjLearningSequence::getLSSettings ( )

Definition at line 427 of file class.ilObjLearningSequence.php.

428 {
429 if (!$this->ls_settings) {
430 $this->ls_settings = $this->getSettingsDB()->getSettingsFor($this->getId());
431 }
432
433 return $this->ls_settings;
434 }
Settings for an LSO (like abstract, extro)
ilLearningSequenceSettings $ls_settings

References $ls_settings, ilObject\getId(), and getSettingsDB().

Referenced by ilLearningSequenceXMLWriter\__construct(), cloneSettings(), ILIAS\LearningSequence\Content\enforceOfflineForMissingBoundaries(), getShowMembers(), read(), renderLearningMap(), and ilObjLearningSequenceSettingsGUI\update().

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

◆ getMailToMembersType()

ilObjLearningSequence::getMailToMembersType ( )

Get mail to members type.

Definition at line 564 of file class.ilObjLearningSequence.php.

564 : int
565 {
566 return 0;
567 }

◆ getMembersObject()

ilObjLearningSequence::getMembersObject ( )

Definition at line 467 of file class.ilObjLearningSequence.php.

467 : ilLearningSequenceParticipants //used by Services/Membership/classes/class.ilMembershipGUI.php
468 {
469 return $this->getLSParticipants();
470 }

References getLSParticipants().

+ Here is the call graph for this function:

◆ getObjectReferenceProperties()

ilObjLearningSequence::getObjectReferenceProperties ( )

◆ getParentObjectInfo()

ilObjLearningSequence::getParentObjectInfo ( int  $ref_id,
array  $search_types 
)

Definition at line 749 of file class.ilObjLearningSequence.php.

749 : ?array
750 {
751 foreach ($this->tree->getPathFull($ref_id) as $hop) {
752 if (in_array($hop['type'], $search_types)) {
753 return $hop;
754 }
755 }
756 return null;
757 }

References ilObject\$ref_id.

◆ getPossiblePostConditionsForType()

ilObjLearningSequence::getPossiblePostConditionsForType ( string  $type)
Returns
array<"value" => "option_text">

Definition at line 516 of file class.ilObjLearningSequence.php.

516 : array
517 {
518 $condition_types = $this->il_condition_handler->getOperatorsByTriggerType($type);
519 $conditions = [
520 $this->getPostConditionDB()::STD_ALWAYS_OPERATOR => $this->lng->txt('always')
521 ];
522 foreach ($condition_types as $cond_type) {
523 $conditions[$cond_type] = $this->lng->txt('condition_' . $cond_type);
524 }
525 return $conditions;
526 }

References ilObject\$type, getPostConditionDB(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getPostConditionDB()

ilObjLearningSequence::getPostConditionDB ( )
protected

Definition at line 450 of file class.ilObjLearningSequence.php.

451 {
452 if (!$this->conditions_db) {
453 $this->conditions_db = $this->getDI()["db.postconditions"];
454 }
456 }
Storage for ilLSPostConditions.

References $conditions_db, and getDI().

Referenced by deletePostConditionsForSubObjects(), and getPossiblePostConditionsForType().

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

◆ getSettingsDB()

ilObjLearningSequence::getSettingsDB ( )
protected

Definition at line 419 of file class.ilObjLearningSequence.php.

420 {
421 if (!$this->settings_db) {
422 $this->settings_db = $this->getDI()['db.settings'];
423 }
424 return $this->settings_db;
425 }
Persistence for Settings (like abstract, extro)
ilLearningSequenceSettingsDB $settings_db

References $settings_db, and getDI().

Referenced by delete(), getLSSettings(), and updateSettings().

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

◆ getShowMembers()

ilObjLearningSequence::getShowMembers ( )

Definition at line 626 of file class.ilObjLearningSequence.php.

626 : bool
627 {
628 return $this->getLSSettings()->getMembersGallery();
629 }

References getLSSettings().

+ Here is the call graph for this function:

◆ getStateDB()

ilObjLearningSequence::getStateDB ( )

Definition at line 536 of file class.ilObjLearningSequence.php.

537 {
538 if (!$this->state_db) {
539 $this->state_db = $this->getDI()['db.states'];
540 }
541 return $this->state_db;
542 }
Persistence for View-States.

References $state_db, and getDI().

Referenced by delete().

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

◆ hasContentPage()

ilObjLearningSequence::hasContentPage ( LSOPageType  $page_type)

Definition at line 774 of file class.ilObjLearningSequence.php.

774 : bool
775 {
776 return ilContainerPage::_exists($page_type->value, $this->getContentPageId());
777 }
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.

References ilPageObject\_exists().

Referenced by cloneIntroAndExtroContentPages(), createContentPage(), and getContentPageHTML().

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

◆ initDefaultRoles()

ilObjLearningSequence::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 set up default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example).

Reimplemented from ilObject.

Definition at line 734 of file class.ilObjLearningSequence.php.

734 : void
735 {
736 $this->getLSRoles()->initDefaultRoles();
737 }

References getLSRoles().

+ Here is the call graph for this function:

◆ mapCopiedRefId()

static ilObjLearningSequence::mapCopiedRefId ( int  $source_ref_id,
array  $mapping 
)
staticprotected
Parameters
array<int|string,mixed>$mapping

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

306 : int
307 {
308 if ($source_ref_id <= 0) {
309 return 0;
310 }
311
312 return (int) ($mapping[$source_ref_id] ?? 0);
313 }

Referenced by cloneConditions().

+ Here is the caller graph for this function:

◆ raiseEvent()

ilObjLearningSequence::raiseEvent ( string  $event_type)
protected

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

144 : void
145 {
146 $this->app_event_handler->raise(
147 'components/ILIAS/LearningSequence',
148 $event_type,
149 array(
150 'obj_id' => $this->getId(),
151 'appointments' => null
152 )
153 );
154 }

References ilObject\getId().

Referenced by create(), delete(), and update().

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

◆ read()

ilObjLearningSequence::read ( )

Reimplemented from ilContainer.

Definition at line 85 of file class.ilObjLearningSequence.php.

85 : void
86 {
87 parent::read();
88 $this->getLSSettings();
89 try {
90 $this->ref_props = $this->repo_ref_props->getFor($this->getRefId());
91 } catch (Exception $e) {
92 $this->ref_props = $this->repo_ref_props->getFor(null);
93 $this->repo_ref_props->storePropertyAvailabilityPeriod(
94 $this->ref_props->getPropertyAvailabilityPeriod()
95 ->withObjectReferenceId($this->getRefId())
96 );
97 }
98 }

References Vendor\Package\$e, getLSSettings(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ readMemberData()

ilObjLearningSequence::readMemberData ( array  $user_ids,
?array  $columns = null 
)
Parameters
array<int|string>$user_ids
string[]$columns
Returns
array<int|string, array>

Definition at line 744 of file class.ilObjLearningSequence.php.

744 : array
745 {
746 return $this->getLsRoles()->readMemberData($user_ids, $columns);
747 }

◆ renderLearningMap()

ilObjLearningSequence::renderLearningMap ( LSOLearningMapDataBuilder  $data_builder,
bool  $with_panel = true 
)

Renders the learning map from the given data builder.

The player hands in the builder of its own local DI, resolved before the current object is rendered: some kiosk views (e.g. the ILIAS learning module) change the ilCtrl context while rendering, so building the player url afterwards fails.

Definition at line 675 of file class.ilObjLearningSequence.php.

675 : string
676 {
677 global $DIC;
678 $sequential = $this->getLSSettings()->getMode() !== ilLearningSequenceSettings::MODE_ADAPTIVE;
680 $DIC['ui.factory'],
681 $DIC['ui.renderer'],
682 $DIC['tpl'],
683 $this->lng,
684 $sequential
685 );
686 $map_data = $data_builder
687 ->build(LSOLearningMapViewMode::MODE_FULL_ROUTE)
688 ->toArray();
689 $graph = $renderer->fromMapData($map_data);
690
691 if (!$with_panel) {
692 return $renderer->renderWithoutPanel($graph);
693 }
694 return $renderer->render($graph);
695 }
$renderer
build(int $mode, ?int $usr_id=null)
Creates a learning map data builder.
Renders Learning Map data as an interactive HTML graph.

References $DIC, $renderer, ILIAS\LearningSequence\LearningMap\LSOLearningMapDataBuilder\build(), getLSSettings(), ILIAS\Repository\lng(), and ilLearningSequenceSettings\MODE_ADAPTIVE.

Referenced by getCurrentUserLearningMap().

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

◆ setEffectiveOnlineStatus()

ilObjLearningSequence::setEffectiveOnlineStatus ( bool  $status)

Definition at line 648 of file class.ilObjLearningSequence.php.

648 : void
649 {
650 $act_db = $this->getActivationDB();
651 $act_db->setEffectiveOnlineStatus($this->getRefId(), $status);
652 }

References ilObject\getRefId().

+ Here is the call graph for this function:

◆ storeAvailabilityPeriod()

ilObjLearningSequence::storeAvailabilityPeriod ( AvailabilityPeriod  $period)

Definition at line 161 of file class.ilObjLearningSequence.php.

161 : void
162 {
163 $this->repo_ref_props->storePropertyAvailabilityPeriod($period);
164 }

Referenced by ilObjLearningSequenceSettingsGUI\update().

+ Here is the caller graph for this function:

◆ storeLSItems()

ilObjLearningSequence::storeLSItems ( array  $ls_items)

Update LSItems.

Parameters
LSItem[]$ls_items

Definition at line 494 of file class.ilObjLearningSequence.php.

494 : void
495 {
496 $db = $this->getLSItemsDB();
497 $db->storeItems($ls_items);
498 }

References ilObject\$db, and getLSItemsDB().

+ Here is the call graph for this function:

◆ update()

ilObjLearningSequence::update ( )

Reimplemented from ilContainer.

Definition at line 113 of file class.ilObjLearningSequence.php.

113 : bool
114 {
115 if (!parent::update()) {
116 return false;
117 }
118
119 $this->updateMetaData();
120 $this->raiseEvent(self::E_UPDATE);
121
122 return true;
123 }

References raiseEvent(), and ilObject\updateMetaData().

Referenced by ilObjLearningSequenceSettingsGUI\update().

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

◆ updateSettings()

ilObjLearningSequence::updateSettings ( ilLearningSequenceSettings  $settings)

Definition at line 436 of file class.ilObjLearningSequence.php.

436 : void
437 {
438 $this->getSettingsDB()->store($settings);
439 $this->ls_settings = $settings;
440 }
$settings
Definition: index.php:44

References $settings, and getSettingsDB().

Referenced by cloneSettings(), and ilObjLearningSequenceSettingsGUI\update().

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

Field Documentation

◆ $conditions_db

ilLSPostConditionDB ilObjLearningSequence::$conditions_db = null
protected

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

Referenced by getPostConditionDB().

◆ $ctrl

ilCtrl ilObjLearningSequence::$ctrl
protected

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

◆ $di

ArrayAccess ilObjLearningSequence::$di = null
protected

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

Referenced by getDI(), and getLocalDI().

◆ $dic

ArrayAccess ilObjLearningSequence::$dic
protected

Definition at line 53 of file class.ilObjLearningSequence.php.

Referenced by getCurrentUserLaunchButtons(), and getDIC().

◆ $il_condition_handler

ilConditionHandler ilObjLearningSequence::$il_condition_handler
protected

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

◆ $il_news

Service ilObjLearningSequence::$il_news
protected

Definition at line 55 of file class.ilObjLearningSequence.php.

Referenced by announceLSOOnline().

◆ $items_db

ilLSItemsDB ilObjLearningSequence::$items_db = null
protected

Definition at line 41 of file class.ilObjLearningSequence.php.

Referenced by getLSItemsDB().

◆ $learner_progress_db

ilLearnerProgressDB ilObjLearningSequence::$learner_progress_db = null
protected

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

Referenced by getLearnerProgressDB().

◆ $local_di

ArrayAccess ilObjLearningSequence::$local_di = null
protected

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

Referenced by getLocalDI().

◆ $ls_access

ilObjLearningSequenceAccess ilObjLearningSequence::$ls_access = null
protected

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

Referenced by getLSAccess().

◆ $ls_participants

ilLearningSequenceParticipants ilObjLearningSequence::$ls_participants = null
protected

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

Referenced by getLSParticipants().

◆ $ls_roles

ilLearningSequenceRoles ilObjLearningSequence::$ls_roles = null
protected

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

Referenced by getLSRoles().

◆ $ls_settings

ilLearningSequenceSettings ilObjLearningSequence::$ls_settings = null
protected

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

Referenced by getLSSettings().

◆ $ref_props

ObjectReferenceProperties ilObjLearningSequence::$ref_props = null
protected

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

Referenced by getObjectReferenceProperties().

◆ $repo_ref_props

ReferencePropertiesRepository ilObjLearningSequence::$repo_ref_props
protected

Definition at line 57 of file class.ilObjLearningSequence.php.

◆ $settings_db

ilLearningSequenceSettingsDB ilObjLearningSequence::$settings_db = null
protected

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

Referenced by getSettingsDB().

◆ $state_db

ilLSStateDB ilObjLearningSequence::$state_db = null
protected

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

Referenced by getStateDB().

◆ E_CREATE

const string ilObjLearningSequence::E_CREATE = 'create'

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

◆ E_DELETE

const string ilObjLearningSequence::E_DELETE = 'delete'

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

◆ E_UPDATE

const string ilObjLearningSequence::E_UPDATE = 'update'

Definition at line 38 of file class.ilObjLearningSequence.php.

◆ OBJ_TYPE

const string ilObjLearningSequence::OBJ_TYPE = 'lso'

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