ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjLearningSequence Class Reference

Class ilObjLearningSequence. More...

+ Inheritance diagram for ilObjLearningSequence:
+ Collaboration diagram for ilObjLearningSequence:

Public Member Functions

 __construct (int $id=0, bool $call_by_reference=true)
 
 read ()
 read More...
 
 create ()
 Create. More...
 
 update ()
 Update. More...
 
 delete ()
 delete category and all related data More...
 
 cloneObject ($target_id, $copy_id=0, $omit_tree=false)
 
 getDI ()
 
 getLocalDI ()
 
 getLSActivation ()
 
 updateActivation (ilLearningSequenceActivation $settings)
 
 getLSSettings ()
 
 updateSettings (ilLearningSequenceSettings $settings)
 
 getLSParticipants ()
 
 getMembersObject ()
 
 getLSAccess ()
 
 getLSItems ()
 Get a list of LSItems. More...
 
 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)
 Get a list of LSLearnerItems. More...
 
 getLSRoles ()
 
 getMailToMembersType ()
 Get mail to members type. More...
 
 getShowMembers ()
 
 announceLSOOnline ()
 
 announceLSOOffline ()
 
 setEffectiveOnlineStatus (bool $status)
 
 getLocalLearningSequenceRoles (bool $translate=false)
 
 getDefaultMemberRole ()
 
 getDefaultAdminRole ()
 
 getLearningSequenceMemberData ($a_mem_ids, $active=1)
 
 getDefaultLearningSequenceRoles ($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 If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) @access public More...
 
 readMemberData (array $user_ids, array $columns=null)
 
 getParentObjectInfo (int $ref_id, array $search_types)
 
 getLPCompletionStates ()
 
- Public Member Functions inherited from ilContainer
 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 getObjectTranslation ()
 Get object translation. More...
 
 setObjectTranslation (ilObjectTranslation $obj_trans)
 Get object translation. More...
 
 createContainerDirectory ()
 Create directory for the container. More...
 
 getContainerDirectory ()
 Get the container directory. More...
 
 setHiddenFilesFound ($a_hiddenfilesfound)
 Set Found hidden files (set by getSubItems). More...
 
 getHiddenFilesFound ()
 Get Found hidden files (set by getSubItems). More...
 
 getStyleSheetId ()
 get ID of assigned style sheet object More...
 
 setStyleSheetId ($a_style_id)
 set ID of assigned style sheet object More...
 
 setNewsTimeline ($a_val)
 Set news timeline. More...
 
 getNewsTimeline ()
 Get news timeline. More...
 
 setNewsTimelineAutoEntries ($a_val)
 Set news timeline auto entries. More...
 
 getNewsTimelineAutoEntries ()
 Get news timeline auto entries. More...
 
 setNewsTimelineLandingPage ($a_val)
 Set news timline is landing page. More...
 
 getNewsTimelineLandingPage ()
 Get news timline is landing page. More...
 
 isNewsTimelineEffective ()
 Is news timeline effective? More...
 
 isNewsTimelineLandingPageEffective ()
 Is news timeline landing page effective? More...
 
 setNewsBlockActivated ($a_val)
 Set news block activated. More...
 
 getNewsBlockActivated ()
 Get news block activated. More...
 
 setUseNews ($a_val)
 Set use news. More...
 
 getUseNews ()
 Get use news. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies (container sorting) More...
 
 cloneAllObject ($session_id, $client_id, $new_type, $ref_id, $clone_source, $options, $soap_call=false, $a_submode=1)
 clone all objects according to this container More...
 
 delete ()
 delete category and all related data More...
 
 getViewMode ()
 Get container view mode. More...
 
 getOrderType ()
 Get order type default implementation. More...
 
 setOrderType ($a_value)
 
 isClassificationFilterActive ()
 Is classification filter active? More...
 
 filteredSubtree ()
 Note grp/crs currently allow to filter in their whole subtrees Catetories only their direct childs. More...
 
 getSubItems ( $a_admin_panel_enabled=false, $a_include_side_block=false, $a_get_single=0, \ilContainerUserFilter $container_user_filter=null)
 Get subitems of container. More...
 
 gotItems ()
 Check whether we got any items. More...
 
 addAdditionalSubItemInformation (&$object)
 Add additional information to sub item, e.g. More...
 
 getGroupedObjTypes ()
 Get grouped repository object types. More...
 
 enablePageEditing ()
 Check whether page editing is allowed for container. More...
 
 create ()
 Create. More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!?
Todo:
role/rbac stuff
Parameters
int$a_parent_refRef-ID of the parent object
More...
 
 update ()
 Update. More...
 
 read ()
 read More...
 
 readContainerSettings ()
 Read container settings. More...
 
 removeTranslations ()
 Remove all translations of container. More...
 
 deleteTranslation ($a_lang)
 Delete translation. More...
 
 addTranslation ($a_title, $a_desc, $a_lang, $a_lang_default)
 Add translation. More...
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor @access 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 @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access 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 @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) @access 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 getInstanceByRefId (int $ref_id)
 
static _goto ($target, $add="")
 Goto target learning sequence. More...
 
- Static Public Member Functions inherited from ilContainer
static _getContainerDirectory ($a_id)
 Get the container directory. More...
 
static _lookupContainerSetting ($a_id, $a_keyword, $a_default_value=null)
 Lookup a container setting. More...
 
static _writeContainerSetting ($a_id, $a_keyword, $a_value)
 
static _getContainerSettings ($a_id)
 
static _deleteContainerSettings ($a_id, $a_keyword=null, $a_keyword_like=false)
 
static _exportContainerSettings (ilXmlWriter $a_xml, $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 ($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@access public More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static _getIcon ( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Data Fields

const OBJ_TYPE = 'lso'
 
const E_CREATE = 'create'
 
const E_UPDATE = 'update'
 
const 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
 
- 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

 raiseEvent (string $event_type)
 
 cloneAutoGeneratedRoles (ilObjLearningSequence $new_obj)
 
 cloneSettings (ilObjLearningSequence $new_obj)
 
 cloneLPSettings (int $obj_id)
 
 cloneActivation (ilObjLearningSequence $new_obj, int $a_copy_id)
 
 getDIC ()
 
 getSettingsDB ()
 
 getActivationDB ()
 
 getLSItemsDB ()
 
 getPostConditionDB ()
 
 getLearnerProgressDB ()
 
- Protected Member Functions inherited from ilContainer
 getInitialSubitems ()
 Get initial subitems. More...
 
 applyContainerUserFilter ($objects, ilContainerUserFilter $container_user_filter=null)
 Apply container user filter on objects. More...
 
 legacyOnlineFilter ($obj_ids, $objects, $val)
 Legacy online filter. More...
 

Protected Attributes

 $items_db
 
 $conditions_db
 
 $learner_progress_db
 
 $ls_participant
 
 $ls_settings
 
 $state_db
 
 $ls_roles
 
 $settings_db
 
 $activation_db
 
 $ls_activation
 
- Protected Attributes inherited from ilContainer
 $news
 
 $db
 
 $log
 
 $access
 
 $error
 
 $rbacsystem
 
 $tree
 
 $user
 
 $obj_definition
 
 $order_type = 0
 
 $hiddenfilesfound = false
 
 $news_timeline = false
 
 $news_timeline_auto_entries = false
 
 $setting
 
 $obj_trans = null
 
 $recommended_content_manager
 
- Protected Attributes inherited from ilObject
 $objDefinition
 
 $db
 
 $log
 
 $error
 
 $tree
 
 $app_event_handler
 
 $rbacadmin
 
 $rbacreview
 

Additional Inherited Members

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

Detailed Description

Class ilObjLearningSequence.

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

Constructor & Destructor Documentation

◆ __construct()

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

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

69 {
70 global $DIC;
71 $this->dic = $DIC;
72
73 $this->type = self::OBJ_TYPE;
74 $this->lng = $DIC['lng'];
75 $this->ctrl = $DIC['ilCtrl'];
76 $this->user = $DIC['ilUser'];
77 $this->tree = $DIC['tree'];
78 $this->log = $DIC["ilLoggerFactory"]->getRootLogger();
79 $this->rbacadmin = $DIC['rbacadmin'];
80 $this->app_event_handler = $DIC['ilAppEventHandler'];
81 $this->il_news = $DIC->news();
82 $this->il_condition_handler = new ilConditionHandler();
83
84 parent::__construct($id, $call_by_reference);
85
86 $this->lng->loadLanguageModule('rbac');
87 }
user()
Definition: user.php:4
INTERNAL CLASS: Please do not use in consumer code.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

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

Goto target learning sequence.

Parameters
int$target
string$add

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

453 {
454 global $DIC;
455
456 $ilAccess = $DIC['ilAccess'];
457 $ilErr = $DIC['ilErr'];
458 $lng = $DIC['lng'];
459 $ilUser = $DIC['ilUser'];
460
461 if (substr($add, 0, 5) == 'rcode') {
462 if ($ilUser->getId() == ANONYMOUS_USER_ID) {
463 // Redirect to login for anonymous
465 "login.php?target=" . $_GET["target"] . "&cmd=force_login&lang=" .
466 $ilUser->getCurrentLanguage()
467 );
468 }
469
470 // Redirects to target location after assigning user to learning sequence
472 $target,
474 substr($add, 5)
475 );
476 }
477
478 if ($add == "mem" && $ilAccess->checkAccess("manage_members", "", $target)) {
479 ilObjectGUI::_gotoRepositoryNode($target, "members");
480 }
481
482 if ($ilAccess->checkAccess("read", "", $target)) {
484 } else {
485 // to do: force flat view
486 if ($ilAccess->checkAccess("visible", "", $target)) {
487 ilObjectGUI::_gotoRepositoryNode($target, "infoScreenGoto");
488 } else {
489 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
491 sprintf(
492 $lng->txt("msg_no_perm_read_item"),
494 ),
495 true
496 );
498 }
499 }
500 }
501
502 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
503 }
$_GET["client_id"]
static handleCode($a_ref_id, $a_type, $a_code)
Handle target parameter.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const ANONYMOUS_USER_ID
Definition: constants.php:25
const ROOT_FOLDER_ID
Definition: constants.php:30
$ilUser
Definition: imgupload.php:18
$ilErr
Definition: raiseError.php:18

References $_GET, $DIC, $ilErr, $ilUser, ilObject\$lng, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ANONYMOUS_USER_ID, ilMembershipRegistrationCodeUtils\handleCode(), ilUtil\redirect(), ROOT_FOLDER_ID, and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ announceLSOOffline()

ilObjLearningSequence::announceLSOOffline ( )

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

522 {
523 //NYI
524 }

◆ announceLSOOnline()

ilObjLearningSequence::announceLSOOnline ( )

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

511 {
512 $ns = $this->il_news;
513 $context = $ns->contextForRefId((int) $this->getRefId());
514 $item = $ns->item($context);
515 $item->setContentIsLangVar(true);
516 $item->setContentTextIsLangVar(true);
517 $item->setTitle("lso_news_online_title");
518 $item->setContent("lso_news_online_txt");
519 $news_id = $ns->data()->save($item);
520 }
getRefId()
get reference id @access public
$context
Definition: webdav.php:26

References $context, and ilObject\getRefId().

+ Here is the call graph for this function:

◆ cloneActivation()

ilObjLearningSequence::cloneActivation ( ilObjLearningSequence  $new_obj,
int  $a_copy_id 
)
protected

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

225 : void
226 {
227 // #14596
228 $cwo = ilCopyWizardOptions::_getInstance($a_copy_id);
229 if ($cwo->isRootNode($this->getRefId())) {
230 $activation = $new_obj->getLSActivation()->withIsOnline(false);
231 } else {
232 $activation = $new_obj->getLSActivation()
233 ->withIsOnline($this->getLSActivation()->getIsOnline())
234 ->withActivationStart($this->getLSActivation()->getActivationStart())
235 ->withActivationEnd($this->getLSActivation()->getActivationEnd());
236 }
237
238 $new_obj->getActivationDB()->store(
239 $activation
240 );
241 }
static _getInstance($a_copy_id)
Get instance of copy wizard options.

References ilCopyWizardOptions\_getInstance(), getActivationDB(), and getLSActivation().

Referenced by cloneObject().

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

◆ cloneAutoGeneratedRoles()

ilObjLearningSequence::cloneAutoGeneratedRoles ( ilObjLearningSequence  $new_obj)
protected

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

171 : bool
172 {
173 $admin = $this->getDefaultAdminRole();
174 $new_admin = $new_obj->getDefaultAdminRole();
175
176 if (!$admin || !$new_admin || !$this->getRefId() || !$new_obj->getRefId()) {
177 $this->log->write(__METHOD__ . ' : Error cloning auto generated role: il_lso_admin');
178 }
179
180 $this->rbacadmin->copyRolePermissions($admin, $this->getRefId(), $new_obj->getRefId(), $new_admin, true);
181 $this->log->write(__METHOD__ . ' : Finished copying of role lso_admin.');
182
183 $member = $this->getDefaultMemberRole();
184 $new_member = $new_obj->getDefaultMemberRole();
185
186 if (!$member || !$new_member) {
187 $this->log->write(__METHOD__ . ' : Error cloning auto generated role: il_lso_member');
188 }
189
190 $this->rbacadmin->copyRolePermissions($member, $this->getRefId(), $new_obj->getRefId(), $new_member, true);
191 $this->log->write(__METHOD__ . ' : Finished copying of role lso_member.');
192
193 return true;
194 }

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

Referenced by cloneObject().

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

◆ cloneLPSettings()

ilObjLearningSequence::cloneLPSettings ( int  $obj_id)
protected

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

220 {
221 $lp_settings = new ilLPObjSettings($this->getId());
222 $lp_settings->cloneSettings($obj_id);
223 }
getId()
get object id @access public

References ilObject\getId().

Referenced by cloneObject().

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

◆ cloneObject()

ilObjLearningSequence::cloneObject (   $target_id,
  $copy_id = 0,
  $omit_tree = false 
)

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

153 {
154 $new_obj = parent::cloneObject($target_id, $copy_id, $omit_tree);
155
156 $this->cloneAutoGeneratedRoles($new_obj);
157 $this->cloneMetaData($new_obj);
158 $this->cloneSettings($new_obj);
159 $this->cloneLPSettings((int) $new_obj->getId());
160 $this->cloneActivation($new_obj, (int) $copy_id);
161
162 $roles = $new_obj->getLSRoles();
163 $roles->addLSMember(
164 (int) $this->user->getId(),
165 $roles->getDefaultAdminRole()
166 );
167 return $new_obj;
168 }
cloneSettings(ilObjLearningSequence $new_obj)
cloneAutoGeneratedRoles(ilObjLearningSequence $new_obj)
cloneActivation(ilObjLearningSequence $new_obj, int $a_copy_id)
cloneMetaData($target_obj)
Copy meta data.
$target_id
Definition: goto.php:51

References $target_id, cloneActivation(), cloneAutoGeneratedRoles(), cloneLPSettings(), ilObject\cloneMetaData(), cloneSettings(), and user().

+ Here is the call graph for this function:

◆ cloneSettings()

ilObjLearningSequence::cloneSettings ( ilObjLearningSequence  $new_obj)
protected

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

197 {
198 $source = $this->getLSSettings();
199 $target = $new_obj->getLSSettings();
200
201 foreach ($source->getUploads() as $key => $upload_info) {
202 $target = $target->withUpload($upload_info, $key);
203 }
204
205 foreach ($source->getDeletions() as $deletion) {
206 $target = $target->withDeletion($deletion);
207 }
208
209 $target = $target
210 ->withAbstract($source->getAbstract())
211 ->withExtro($source->getExtro())
212 ->withAbstractImage($source->getAbstractImage())
213 ->withExtroImage($source->getExtroImage())
214 ;
215
216 $new_obj->updateSettings($target);
217 }
updateSettings(ilLearningSequenceSettings $settings)
$source
Definition: metadata.php:76

References $source, getLSSettings(), and updateSettings().

Referenced by cloneObject().

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

◆ create()

ilObjLearningSequence::create ( )

Create.

Reimplemented from ilContainer.

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

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

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

+ Here is the call graph for this function:

◆ delete()

ilObjLearningSequence::delete ( )

delete category and all related data

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

Reimplemented from ilContainer.

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

124 : bool
125 {
126 if (!parent::delete()) {
127 return false;
128 }
129
131 $this->getSettingsDB()->delete((int) $this->getId());
132 $this->getStateDB()->deleteFor((int) $this->getRefId());
133 $this->getActivationDB()->deleteForRefId((int) $this->getRefId());
134
135 $this->raiseEvent(self::E_DELETE);
136
137 return true;
138 }
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.

References ilParticipants\_deleteAllEntries(), getActivationDB(), 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[]

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

381 {
382 $rep_utils = new ilRepUtil();
383 $rep_utils->deleteObjects($this->getRefId(), $ref_ids);
384 $db = $this->getPostConditionDB();
385 $db->delete($ref_ids);
386 }
Repository Utilities (application layer, put GUI related stuff into ilRepUtilGUI)

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

+ Here is the call graph for this function:

◆ getActivationDB()

ilObjLearningSequence::getActivationDB ( )
protected

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

282 {
283 if (!$this->activation_db) {
284 $this->activation_db = $this->getDI()['db.activation'];
285 }
287 }
Persistence for online/activation period.

References $activation_db, and getDI().

Referenced by cloneActivation(), delete(), getLSActivation(), setEffectiveOnlineStatus(), and updateActivation().

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

◆ getDefaultAdminRole()

ilObjLearningSequence::getDefaultAdminRole ( )

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

546 {
547 return $this->getLSRoles()->getDefaultAdminRole();
548 }

References getLSRoles().

Referenced by cloneAutoGeneratedRoles().

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

◆ getDefaultLearningSequenceRoles()

ilObjLearningSequence::getDefaultLearningSequenceRoles (   $a_grp_id = "")

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

556 {
557 return $this->getLSRoles()->getDefaultLearningSequenceRoles($a_grp_id);
558 }

References getLSRoles().

+ Here is the call graph for this function:

◆ getDefaultMemberRole()

ilObjLearningSequence::getDefaultMemberRole ( )

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

540 : int
541 {
542 return $this->getLSRoles()->getDefaultMemberRole();
543 }

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 248 of file class.ilObjLearningSequence.php.

249 {
250 if (is_null($this->di)) {
251 $di = new ilLSDI();
252 $di->init($this->getDIC());
253 $this->di = $di;
254 }
255 return $this->di;
256 }

References getDIC().

Referenced by getActivationDB(), getLocalDI(), getPostConditionDB(), getSettingsDB(), and getStateDB().

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

◆ getDIC()

ilObjLearningSequence::getDIC ( )
protected

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

244 {
245 return $this->dic;
246 }
$dic
Definition: result.php:13

References $dic.

Referenced by getDI(), and getLocalDI().

+ Here is the caller graph for this function:

◆ getInstanceByRefId()

static ilObjLearningSequence::getInstanceByRefId ( int  $ref_id)
static

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

90 {
92 }
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id

References ilObject\$ref_id, and ilObjectFactory\getInstanceByRefId().

Referenced by ilDashboardLearningSequenceGUI\getHTML(), and ilObjLearningSequenceGUI\getObject().

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

◆ getLearnerProgressDB()

ilObjLearningSequence::getLearnerProgressDB ( )
protected

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

404 {
405 if (!$this->learner_progress_db) {
406 $this->learner_progress_db = $this->getLocalDI()['db.progress'];
407 }
409 }
Get LearningProgress and availability of items in sequence.

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:

◆ getLearningSequenceMemberData()

ilObjLearningSequence::getLearningSequenceMemberData (   $a_mem_ids,
  $active = 1 
)

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

551 {
552 return $this->getLSRoles()->getLearningSequenceMemberData($a_mem_ids, $active);
553 }

References getLSRoles().

+ Here is the call graph for this function:

◆ getLocalDI()

ilObjLearningSequence::getLocalDI ( )

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

259 {
260 if (is_null($this->local_di)) {
261 $di = new ilLSLocalDI();
262 $di->init(
263 $this->getDIC(),
264 $this->getDI(),
265 new \ILIAS\Data\Factory(),
266 $this
267 );
268 $this->local_di = $di;
269 }
270 return $this->local_di;
271 }
Class ChatMainBarProvider \MainMenu\Provider.

References getDI(), and getDIC().

Referenced by 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)

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

535 : array
536 {
537 return $this->getLSRoles()->getLocalLearningSequenceRoles($translate);
538 }

References getLSRoles().

+ Here is the call graph for this function:

◆ getLPCompletionStates()

ilObjLearningSequence::getLPCompletionStates ( )

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

580 : array
581 {
582 return [
584 ];
585 }
const LP_STATUS_COMPLETED_NUM

References ilLPStatus\LP_STATUS_COMPLETED_NUM.

◆ getLSAccess()

ilObjLearningSequence::getLSAccess ( )

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

349 {
350 if (is_null($this->ls_access)) {
351 $this->ls_access = new ilObjLearningSequenceAccess();
352 }
353
354 return $this->ls_access;
355 }
Class ilObjLearningSequenceAccess class.

◆ getLSActivation()

ilObjLearningSequence::getLSActivation ( )

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

290 {
291 if (!$this->ls_activation) {
292 $this->ls_activation = $this->getActivationDB()->getActivationForRefId((int) $this->getRefId());
293 }
294
296 }

References $ls_activation, getActivationDB(), and ilObject\getRefId().

Referenced by ilObjLearningSequenceSettingsGUI\__construct(), cloneActivation(), and read().

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

◆ getLSItems()

ilObjLearningSequence::getLSItems ( )

Get a list of LSItems.

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

360 : array
361 {
362 $db = $this->getLSItemsDB();
363 return $db->getLSItems((int) $this->getRefId());
364 }

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

+ Here is the call graph for this function:

◆ getLSItemsDB()

ilObjLearningSequence::getLSItemsDB ( )
protected

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

320 {
321 if (!$this->items_db) {
322 $this->items_db = $this->getLocalDI()['db.lsitems'];
323 }
324 return $this->items_db;
325 }
Class ilLSItemsDB.
Definition: ilLSItemsDB.php:12

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)

Get a list of LSLearnerItems.

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

423 : array
424 {
425 $db = $this->getLearnerProgressDB();
426 return $db->getLearnerItems($usr_id, $this->getRefId());
427 }

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

Referenced by ilDashboardLearningSequenceGUI\isRelevantLso().

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

◆ getLSParticipants()

ilObjLearningSequence::getLSParticipants ( )

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

336 {
337 if (!$this->ls_participant) {
338 $this->ls_participant = $this->getLocalDI()['participants'];
339 }
340
342 }

References $ls_participant, 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 429 of file class.ilObjLearningSequence.php.

430 {
431 if (!$this->ls_roles) {
432 $this->ls_roles = $this->getLocalDI()['roles'];
433 }
434 return $this->ls_roles;
435 }

References $ls_roles, and getLocalDI().

Referenced by getDefaultAdminRole(), getDefaultLearningSequenceRoles(), getDefaultMemberRole(), getLearningSequenceMemberData(), 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 304 of file class.ilObjLearningSequence.php.

305 {
306 if (!$this->ls_settings) {
307 $this->ls_settings = $this->getSettingsDB()->getSettingsFor((int) $this->getId());
308 }
309
310 return $this->ls_settings;
311 }
Settings for an LSO (like abstract, extro)

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

Referenced by ilLearningSequenceXMLWriter\__construct(), ilObjLearningSequenceSettingsGUI\__construct(), cloneSettings(), getShowMembers(), and read().

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

◆ getMailToMembersType()

ilObjLearningSequence::getMailToMembersType ( )

Get mail to members type.

Returns
int

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

442 {
443 return $this->mail_members;
444 }

◆ getMembersObject()

ilObjLearningSequence::getMembersObject ( )

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

344 {
345 return $this->getLSParticipants();
346 }

References getLSParticipants().

+ Here is the call graph for this function:

◆ getParentObjectInfo()

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

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

571 {
572 foreach ($this->tree->getPathFull($ref_id) as $hop) {
573 if (in_array($hop['type'], $search_types)) {
574 return $hop;
575 }
576 }
577 return null;
578 }

References ilObject\$ref_id.

◆ getPossiblePostConditionsForType()

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

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

391 : array
392 {
393 $condition_types = $this->il_condition_handler->getOperatorsByTriggerType($type);
394 $conditions = [
395 $this->getPostConditionDB()::STD_ALWAYS_OPERATOR => $this->lng->txt('condition_always')
396 ];
397 foreach ($condition_types as $cond_type) {
398 $conditions[$cond_type] = $this->lng->txt('condition_' . $cond_type);
399 }
400 return $conditions;
401 }

References ilObject\$type, and getPostConditionDB().

+ Here is the call graph for this function:

◆ getPostConditionDB()

ilObjLearningSequence::getPostConditionDB ( )
protected

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

328 {
329 if (!$this->conditions_db) {
330 $this->conditions_db = $this->getDI()["db.postconditions"];
331 }
333 }
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 273 of file class.ilObjLearningSequence.php.

274 {
275 if (!$this->settings_db) {
276 $this->settings_db = $this->getDI()['db.settings'];
277 }
278 return $this->settings_db;
279 }
Persistence for Settings (like abstract, extro)

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 505 of file class.ilObjLearningSequence.php.

506 {
507 return $this->getLSSettings()->getMembersGallery();
508 }

References getLSSettings().

+ Here is the call graph for this function:

◆ getStateDB()

ilObjLearningSequence::getStateDB ( )

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

413 {
414 if (!$this->state_db) {
415 $this->state_db = $this->getDI()['db.states'];
416 }
417 return $this->state_db;
418 }
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:

◆ 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 setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) @access public

Returns
array empty array

Reimplemented from ilObject.

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

561 {
562 return $this->getLSRoles()->initDefaultRoles();
563 }

References getLSRoles().

+ Here is the call graph for this function:

◆ raiseEvent()

ilObjLearningSequence::raiseEvent ( string  $event_type)
protected

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

141 {
142 $this->app_event_handler->raise(
143 'Modules/LearningSequence',
144 $event_type,
145 array(
146 'obj_id' => $this->getId(),
147 'appointments' => null
148 )
149 );
150 }

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 ( )

read

@access public

Parameters

return

Reimplemented from ilContainer.

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

95 {
96 $this->getLSSettings();
97 if ($this->getRefId()) {
98 $this->getLSActivation();
99 }
100 parent::read();
101 }

References getLSActivation(), getLSSettings(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ readMemberData()

ilObjLearningSequence::readMemberData ( array  $user_ids,
array  $columns = null 
)

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

566 {
567 return $this->getLsRoles()->readMemberData($user_ids, $columns);
568 }
if(! $in) $columns
Definition: Utf8Test.php:45

References $columns.

◆ setEffectiveOnlineStatus()

ilObjLearningSequence::setEffectiveOnlineStatus ( bool  $status)

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

527 {
528 $act_db = $this->getActivationDB();
529 $act_db->setEffectiveOnlineStatus((int) $this->getRefId(), $status);
530 }

References getActivationDB(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ storeLSItems()

ilObjLearningSequence::storeLSItems ( array  $ls_items)

Update LSItems.

Parameters
LSItem[]

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

371 {
372 $db = $this->getLSItemsDB();
373 $db->storeItems($ls_items);
374 }

References ilContainer\$db, and getLSItemsDB().

+ Here is the call graph for this function:

◆ update()

ilObjLearningSequence::update ( )

Update.

Reimplemented from ilContainer.

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

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

References raiseEvent().

+ Here is the call graph for this function:

◆ updateActivation()

ilObjLearningSequence::updateActivation ( ilLearningSequenceActivation  $settings)

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

299 {
300 $this->getActivationDB()->store($settings);
301 $this->ls_activation = $settings;
302 }

References getActivationDB().

+ Here is the call graph for this function:

◆ updateSettings()

ilObjLearningSequence::updateSettings ( ilLearningSequenceSettings  $settings)

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

314 {
315 $this->getSettingsDB()->store($settings);
316 $this->ls_settings = $settings;
317 }

References getSettingsDB().

Referenced by cloneSettings().

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

Field Documentation

◆ $activation_db

ilObjLearningSequence::$activation_db
protected

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

Referenced by getActivationDB().

◆ $conditions_db

ilObjLearningSequence::$conditions_db
protected

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

Referenced by getPostConditionDB().

◆ $items_db

ilObjLearningSequence::$items_db
protected

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

Referenced by getLSItemsDB().

◆ $learner_progress_db

ilObjLearningSequence::$learner_progress_db
protected

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

Referenced by getLearnerProgressDB().

◆ $ls_activation

ilObjLearningSequence::$ls_activation
protected

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

Referenced by getLSActivation().

◆ $ls_participant

ilObjLearningSequence::$ls_participant
protected

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

Referenced by getLSParticipants().

◆ $ls_roles

ilObjLearningSequence::$ls_roles
protected

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

Referenced by getLSRoles().

◆ $ls_settings

ilObjLearningSequence::$ls_settings
protected

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

Referenced by getLSSettings().

◆ $settings_db

ilObjLearningSequence::$settings_db
protected

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

Referenced by getSettingsDB().

◆ $state_db

ilObjLearningSequence::$state_db
protected

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

Referenced by getStateDB().

◆ E_CREATE

const ilObjLearningSequence::E_CREATE = 'create'

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

◆ E_DELETE

const ilObjLearningSequence::E_DELETE = 'delete'

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

◆ E_UPDATE

const ilObjLearningSequence::E_UPDATE = 'update'

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

◆ OBJ_TYPE


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