ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 
 create ()
 
 update ()
 
 delete ()
 
 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 ()
 
 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)
 
 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)
 
 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 public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id public More...
 
 setId ($a_id)
 set object id public More...
 
 setRefId ($a_id)
 set reference id public More...
 
 getRefId ()
 get reference id public More...
 
 getType ()
 get object type public More...
 
 setType ($a_type)
 set object type public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title public More...
 
 getUntranslatedTitle ()
 get untranslated object title public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 setOfflineStatus ($a_status)
 Set offline status. More...
 
 getOfflineStatus ()
 Get offline status. More...
 
 supportsOfflineHandling ()
 Check whether object supports offline handling. More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date public More...
 
 getLastUpdateDate ()
 get last update date public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 

Static Public Member Functions

static 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 More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 

Data Fields

const 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)
 
 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
 $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.

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

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  }
user()
Definition: user.php:4
INTERNAL CLASS: Please do not use in consumer code.
__construct(Container $dic, ilPlugin $plugin)
$DIC
Definition: xapitoken.php:46
+ 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 432 of file class.ilObjLearningSequence.php.

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

433  {
434  global $DIC;
435 
436  $ilAccess = $DIC['ilAccess'];
437  $ilErr = $DIC['ilErr'];
438  $lng = $DIC['lng'];
439  $ilUser = $DIC['ilUser'];
440 
441  if (substr($add, 0, 5) == 'rcode') {
442  if ($ilUser->getId() == ANONYMOUS_USER_ID) {
443  // Redirect to login for anonymous
445  "login.php?target=" . $_GET["target"] . "&cmd=force_login&lang=" .
446  $ilUser->getCurrentLanguage()
447  );
448  }
449 
450  // Redirects to target location after assigning user to learning sequence
452  $target,
454  substr($add, 5)
455  );
456  }
457 
458  if ($add == "mem" && $ilAccess->checkAccess("manage_members", "", $target)) {
459  ilObjectGUI::_gotoRepositoryNode($target, "members");
460  }
461 
462  if ($ilAccess->checkAccess("read", "", $target)) {
464  } else {
465  // to do: force flat view
466  if ($ilAccess->checkAccess("visible", "", $target)) {
467  ilObjectGUI::_gotoRepositoryNode($target, "infoScreenGoto");
468  } else {
469  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
471  sprintf(
472  $lng->txt("msg_no_perm_read_item"),
474  ),
475  true
476  );
478  }
479  }
480  }
481 
482  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
483  }
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static handleCode($a_ref_id, $a_type, $a_code)
Handle target parameter.
$ilErr
Definition: raiseError.php:18
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _lookupObjId($a_id)
$ilUser
Definition: imgupload.php:18
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$DIC
Definition: xapitoken.php:46
static redirect($a_script)
+ Here is the call graph for this function:

◆ announceLSOOffline()

ilObjLearningSequence::announceLSOOffline ( )

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

502  {
503  //NYI
504  }

◆ announceLSOOnline()

ilObjLearningSequence::announceLSOOnline ( )

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

References $context, and ilObject\getRefId().

491  {
492  $ns = $this->il_news;
493  $context = $ns->contextForRefId((int) $this->getRefId());
494  $item = $ns->item($context);
495  $item->setContentIsLangVar(true);
496  $item->setContentTextIsLangVar(true);
497  $item->setTitle("lso_news_online_title");
498  $item->setContent("lso_news_online_txt");
499  $news_id = $ns->data()->save($item);
500  }
$context
Definition: webdav.php:26
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ cloneAutoGeneratedRoles()

ilObjLearningSequence::cloneAutoGeneratedRoles ( ilObjLearningSequence  $new_obj)
protected

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

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

Referenced by cloneObject().

168  : bool
169  {
170  $admin = $this->getDefaultAdminRole();
171  $new_admin = $new_obj->getDefaultAdminRole();
172 
173  if (!$admin || !$new_admin || !$this->getRefId() || !$new_obj->getRefId()) {
174  $this->log->write(__METHOD__ . ' : Error cloning auto generated role: il_lso_admin');
175  }
176 
177  $this->rbacadmin->copyRolePermissions($admin, $this->getRefId(), $new_obj->getRefId(), $new_admin, true);
178  $this->log->write(__METHOD__ . ' : Finished copying of role lso_admin.');
179 
180  $member = $this->getDefaultMemberRole();
181  $new_member = $new_obj->getDefaultMemberRole();
182 
183  if (!$member || !$new_member) {
184  $this->log->write(__METHOD__ . ' : Error cloning auto generated role: il_lso_member');
185  }
186 
187  $this->rbacadmin->copyRolePermissions($member, $this->getRefId(), $new_obj->getRefId(), $new_member, true);
188  $this->log->write(__METHOD__ . ' : Finished copying of role lso_member.');
189 
190  return true;
191  }
getRefId()
get reference id public
+ 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 216 of file class.ilObjLearningSequence.php.

References ilObject\getId().

Referenced by cloneObject().

217  {
218  $lp_settings = new ilLPObjSettings($this->getId());
219  $lp_settings->cloneSettings($obj_id);
220  }
getId()
get object id public
+ 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 150 of file class.ilObjLearningSequence.php.

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

151  {
152  $new_obj = parent::cloneObject($target_id, $copy_id, $omit_tree);
153 
154  $this->cloneAutoGeneratedRoles($new_obj);
155  $this->cloneMetaData($new_obj);
156  $this->cloneSettings($new_obj);
157  $this->cloneLPSettings((int) $new_obj->getId());
158 
159  $roles = $new_obj->getLSRoles();
160  $roles->addLSMember(
161  (int) $this->user->getId(),
162  $roles->getDefaultAdminRole()
163  );
164  return $new_obj;
165  }
cloneAutoGeneratedRoles(ilObjLearningSequence $new_obj)
cloneSettings(ilObjLearningSequence $new_obj)
$target_id
Definition: goto.php:49
user()
Definition: user.php:4
cloneMetaData($target_obj)
Copy meta data.
+ Here is the call graph for this function:

◆ cloneSettings()

ilObjLearningSequence::cloneSettings ( ilObjLearningSequence  $new_obj)
protected

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

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

Referenced by cloneObject().

194  {
195  $source = $this->getLSSettings();
196  $target = $new_obj->getLSSettings();
197 
198  foreach ($source->getUploads() as $key => $upload_info) {
199  $target = $target->withUpload($upload_info, $key);
200  }
201 
202  foreach ($source->getDeletions() as $deletion) {
203  $target = $target->withDeletion($deletion);
204  }
205 
206  $target = $target
207  ->withAbstract($source->getAbstract())
208  ->withExtro($source->getExtro())
209  ->withAbstractImage($source->getAbstractImage())
210  ->withExtroImage($source->getExtroImage())
211  ;
212 
213  $new_obj->updateSettings($target);
214  }
updateSettings(ilLearningSequenceSettings $settings)
$source
Definition: metadata.php:76
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

ilObjLearningSequence::create ( )

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

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

101  : int
102  {
103  $id = parent::create();
104  if (!$id) {
105  return 0;
106  }
107  $this->raiseEvent(self::E_CREATE);
108 
109  return (int) $this->getId();
110  }
getId()
get object id public
+ Here is the call graph for this function:

◆ delete()

ilObjLearningSequence::delete ( )

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

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

122  : bool
123  {
124  if (!parent::delete()) {
125  return false;
126  }
127 
129  $this->getSettingsDB()->delete((int) $this->getId());
130  $this->getStateDB()->deleteFor((int) $this->getRefId());
131  $this->getActivationDB()->deleteForRefId((int) $this->getRefId());
132 
133  $this->raiseEvent(self::E_DELETE);
134 
135  return true;
136  }
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.
getId()
get object id public
getRefId()
get reference id public
+ 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 360 of file class.ilObjLearningSequence.php.

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

361  {
362  $rep_utils = new ilRepUtil();
363  $rep_utils->deleteObjects($this->getRefId(), $ref_ids);
364  $db = $this->getPostConditionDB();
365  $db->delete($ref_ids);
366  }
Repository Utilities (application layer, put GUI related stuff into ilRepUtilGUI) ...
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ getActivationDB()

ilObjLearningSequence::getActivationDB ( )
protected

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

References $activation_db, and getDI().

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

262  {
263  if (!$this->activation_db) {
264  $this->activation_db = $this->getDI()['db.activation'];
265  }
266  return $this->activation_db;
267  }
Persistence for online/activation period.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDefaultAdminRole()

ilObjLearningSequence::getDefaultAdminRole ( )

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

References getLSRoles().

Referenced by cloneAutoGeneratedRoles().

526  {
527  return $this->getLSRoles()->getDefaultAdminRole();
528  }
+ 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 535 of file class.ilObjLearningSequence.php.

References getLSRoles().

536  {
537  return $this->getLSRoles()->getDefaultLearningSequenceRoles($a_grp_id);
538  }
+ Here is the call graph for this function:

◆ getDefaultMemberRole()

ilObjLearningSequence::getDefaultMemberRole ( )

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

References getLSRoles().

Referenced by cloneAutoGeneratedRoles().

520  : int
521  {
522  return $this->getLSRoles()->getDefaultMemberRole();
523  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDI()

ilObjLearningSequence::getDI ( )

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

References getDIC().

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

228  : \ArrayAccess
229  {
230  if (is_null($this->di)) {
231  $di = new ilLSDI();
232  $di->init($this->getDIC());
233  $this->di = $di;
234  }
235  return $this->di;
236  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDIC()

ilObjLearningSequence::getDIC ( )
protected

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

References $dic.

Referenced by getDI(), and getLocalDI().

223  : \ArrayAccess
224  {
225  return $this->dic;
226  }
$dic
Definition: result.php:13
+ Here is the caller graph for this function:

◆ getInstanceByRefId()

static ilObjLearningSequence::getInstanceByRefId ( int  $ref_id)
static

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

References ilObjectFactory\getInstanceByRefId().

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

88  {
90  }
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLearnerProgressDB()

ilObjLearningSequence::getLearnerProgressDB ( )
protected

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

References $learner_progress_db, and getLocalDI().

Referenced by getLSLearnerItems().

384  {
385  if (!$this->learner_progress_db) {
386  $this->learner_progress_db = $this->getLocalDI()['db.progress'];
387  }
389  }
Get LearningProgress and availability of items in sequence.
+ 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 530 of file class.ilObjLearningSequence.php.

References getLSRoles().

531  {
532  return $this->getLSRoles()->getLearningSequenceMemberData($a_mem_ids, $active);
533  }
+ Here is the call graph for this function:

◆ getLocalDI()

ilObjLearningSequence::getLocalDI ( )

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

References getDI(), and getDIC().

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

238  : \ArrayAccess
239  {
240  if (is_null($this->local_di)) {
241  $di = new ilLSLocalDI();
242  $di->init(
243  $this->getDIC(),
244  $this->getDI(),
245  new \ILIAS\Data\Factory(),
246  $this
247  );
248  $this->local_di = $di;
249  }
250  return $this->local_di;
251  }
Class ChatMainBarProvider .
+ 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 515 of file class.ilObjLearningSequence.php.

References getLSRoles().

515  : array
516  {
517  return $this->getLSRoles()->getLocalLearningSequenceRoles($translate);
518  }
+ Here is the call graph for this function:

◆ getLPCompletionStates()

ilObjLearningSequence::getLPCompletionStates ( )

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

References ilLPStatus\LP_STATUS_COMPLETED_NUM.

560  : array
561  {
562  return [
564  ];
565  }
const LP_STATUS_COMPLETED_NUM

◆ getLSAccess()

ilObjLearningSequence::getLSAccess ( )

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

329  {
330  if (is_null($this->ls_access)) {
331  $this->ls_access = new ilObjLearningSequenceAccess();
332  }
333 
334  return $this->ls_access;
335  }
Class ilObjLearningSequenceAccess class.

◆ getLSActivation()

ilObjLearningSequence::getLSActivation ( )

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

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

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

270  {
271  if (!$this->ls_activation) {
272  $this->ls_activation = $this->getActivationDB()->getActivationForRefId((int) $this->getRefId());
273  }
274 
275  return $this->ls_activation;
276  }
getRefId()
get reference id public
+ 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 340 of file class.ilObjLearningSequence.php.

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

340  : array
341  {
342  $db = $this->getLSItemsDB();
343  return $db->getLSItems((int) $this->getRefId());
344  }
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ getLSItemsDB()

ilObjLearningSequence::getLSItemsDB ( )
protected

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

References $items_db, and getLocalDI().

Referenced by getLSItems(), and storeLSItems().

299  : ilLSItemsDB
300  {
301  if (!$this->items_db) {
302  $this->items_db = $this->getLocalDI()['db.lsitems'];
303  }
304  return $this->items_db;
305  }
Class ilLSItemsDB.
Definition: ilLSItemsDB.php:11
+ 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 403 of file class.ilObjLearningSequence.php.

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

Referenced by ilDashboardLearningSequenceGUI\isRelevantLso().

403  : array
404  {
405  $db = $this->getLearnerProgressDB();
406  return $db->getLearnerItems($usr_id, $this->getRefId());
407  }
getRefId()
get reference id public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLSParticipants()

ilObjLearningSequence::getLSParticipants ( )

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

References $ls_participant, and getLocalDI().

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

316  {
317  if (!$this->ls_participant) {
318  $this->ls_participant = $this->getLocalDI()['participants'];
319  }
320 
321  return $this->ls_participant;
322  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLSRoles()

ilObjLearningSequence::getLSRoles ( )

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

References $ls_roles, and getLocalDI().

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

410  {
411  if (!$this->ls_roles) {
412  $this->ls_roles = $this->getLocalDI()['roles'];
413  }
414  return $this->ls_roles;
415  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLSSettings()

ilObjLearningSequence::getLSSettings ( )

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

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

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

285  {
286  if (!$this->ls_settings) {
287  $this->ls_settings = $this->getSettingsDB()->getSettingsFor((int) $this->getId());
288  }
289 
290  return $this->ls_settings;
291  }
Settings for an LSO (like abstract, extro)
getId()
get object id public
+ 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 421 of file class.ilObjLearningSequence.php.

422  {
423  return $this->mail_members;
424  }

◆ getMembersObject()

ilObjLearningSequence::getMembersObject ( )

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

References getLSParticipants().

324  {
325  return $this->getLSParticipants();
326  }
+ Here is the call graph for this function:

◆ getParentObjectInfo()

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

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

551  {
552  foreach ($this->tree->getPathFull($ref_id) as $hop) {
553  if (in_array($hop['type'], $search_types)) {
554  return $hop;
555  }
556  }
557  return null;
558  }

◆ getPossiblePostConditionsForType()

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

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

References getPostConditionDB().

371  : array
372  {
373  $condition_types = $this->il_condition_handler->getOperatorsByTriggerType($type);
374  $conditions = [
375  $this->getPostConditionDB()::STD_ALWAYS_OPERATOR => $this->lng->txt('condition_always')
376  ];
377  foreach ($condition_types as $cond_type) {
378  $conditions[$cond_type] = $this->lng->txt($cond_type);
379  }
380  return $conditions;
381  }
+ Here is the call graph for this function:

◆ getPostConditionDB()

ilObjLearningSequence::getPostConditionDB ( )
protected

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

References $conditions_db, and getDI().

Referenced by deletePostConditionsForSubObjects(), and getPossiblePostConditionsForType().

308  {
309  if (!$this->conditions_db) {
310  $this->conditions_db = $this->getDI()["db.postconditions"];
311  }
312  return $this->conditions_db;
313  }
Storage for ilLSPostConditions.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSettingsDB()

ilObjLearningSequence::getSettingsDB ( )
protected

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

References $settings_db, and getDI().

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

254  {
255  if (!$this->settings_db) {
256  $this->settings_db = $this->getDI()['db.settings'];
257  }
258  return $this->settings_db;
259  }
Persistence for Settings (like abstract, extro)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getShowMembers()

ilObjLearningSequence::getShowMembers ( )

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

References getLSSettings().

486  {
487  return $this->getLSSettings()->getMembersGallery();
488  }
+ Here is the call graph for this function:

◆ getStateDB()

ilObjLearningSequence::getStateDB ( )

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

References $state_db, and getDI().

Referenced by delete().

392  : ilLSStateDB
393  {
394  if (!$this->state_db) {
395  $this->state_db = $this->getDI()['db.states'];
396  }
397  return $this->state_db;
398  }
Persistence for View-States.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initDefaultRoles()

ilObjLearningSequence::initDefaultRoles ( )

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

References getLSRoles().

541  {
542  return $this->getLSRoles()->initDefaultRoles();
543  }
+ Here is the call graph for this function:

◆ raiseEvent()

ilObjLearningSequence::raiseEvent ( string  $event_type)
protected

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

References ilObject\getId().

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

139  {
140  $this->app_event_handler->raise(
141  'Modules/LearningSequence',
142  $event_type,
143  array(
144  'obj_id' => $this->getId(),
145  'appointments' => null
146  )
147  );
148  }
getId()
get object id public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read()

ilObjLearningSequence::read ( )

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

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

93  {
94  $this->getLSSettings();
95  if ($this->getRefId()) {
96  $this->getLSActivation();
97  }
98  parent::read();
99  }
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ readMemberData()

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

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

References $columns.

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

◆ setEffectiveOnlineStatus()

ilObjLearningSequence::setEffectiveOnlineStatus ( bool  $status)

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

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

507  {
508  $act_db = $this->getActivationDB();
509  $act_db->setEffectiveOnlineStatus((int) $this->getRefId(), $status);
510  }
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ storeLSItems()

ilObjLearningSequence::storeLSItems ( array  $ls_items)

Update LSItems.

Parameters
LSItem[]

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

References ilContainer\$db, and getLSItemsDB().

351  {
352  $db = $this->getLSItemsDB();
353  $db->storeItems($ls_items);
354  }
+ Here is the call graph for this function:

◆ update()

ilObjLearningSequence::update ( )

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

References raiseEvent().

112  : bool
113  {
114  if (!parent::update()) {
115  return false;
116  }
117  $this->raiseEvent(self::E_UPDATE);
118 
119  return true;
120  }
+ Here is the call graph for this function:

◆ updateActivation()

ilObjLearningSequence::updateActivation ( ilLearningSequenceActivation  $settings)

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

References getActivationDB().

279  {
280  $this->getActivationDB()->store($settings);
281  $this->ls_activation = $settings;
282  }
+ Here is the call graph for this function:

◆ updateSettings()

ilObjLearningSequence::updateSettings ( ilLearningSequenceSettings  $settings)

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

References getSettingsDB().

Referenced by cloneSettings().

294  {
295  $this->getSettingsDB()->store($settings);
296  $this->ls_settings = $settings;
297  }
+ 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

const ilObjLearningSequence::OBJ_TYPE = 'lso'

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