3declare(strict_types=1);
 
   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();
 
   86        $this->lng->loadLanguageModule(
'rbac');
 
  105        $id = parent::create();
 
  111        return (
int) $this->
getId();
 
  116        if (!parent::update()) {
 
  124    public function delete() : 
bool 
  126        if (!parent::delete()) {
 
  142        $this->app_event_handler->raise(
 
  143            'Modules/LearningSequence',
 
  146                'obj_id' => $this->
getId(),
 
  147                'appointments' => 
null 
  154        $new_obj = parent::cloneObject(
$target_id, $copy_id, $omit_tree);
 
  162        $roles = $new_obj->getLSRoles();
 
  164            (
int) $this->
user->getId(),
 
  165            $roles->getDefaultAdminRole()
 
  176        if (!$admin || !$new_admin || !$this->
getRefId() || !$new_obj->
getRefId()) {
 
  177            $this->log->write(__METHOD__ . 
' : Error cloning auto generated role: il_lso_admin');
 
  180        $this->rbacadmin->copyRolePermissions($admin, $this->
getRefId(), $new_obj->
getRefId(), $new_admin, 
true);
 
  181        $this->log->write(__METHOD__ . 
' : Finished copying of role lso_admin.');
 
  186        if (!$member || !$new_member) {
 
  187            $this->log->write(__METHOD__ . 
' : Error cloning auto generated role: il_lso_member');
 
  190        $this->rbacadmin->copyRolePermissions($member, $this->
getRefId(), $new_obj->
getRefId(), $new_member, 
true);
 
  191        $this->log->write(__METHOD__ . 
' : Finished copying of role lso_member.');
 
  201        foreach (
$source->getUploads() as $key => $upload_info) {
 
  202            $target = $target->withUpload($upload_info, $key);
 
  205        foreach (
$source->getDeletions() as $deletion) {
 
  206            $target = $target->withDeletion($deletion);
 
  210            ->withAbstract(
$source->getAbstract())
 
  211            ->withExtro(
$source->getExtro())
 
  212            ->withAbstractImage(
$source->getAbstractImage())
 
  213            ->withExtroImage(
$source->getExtroImage())
 
  222        $lp_settings->cloneSettings($obj_id);
 
  229        if ($cwo->isRootNode($this->getRefId())) {
 
  250        if (is_null($this->di)) {
 
  252            $di->init($this->
getDIC());
 
  260        if (is_null($this->local_di)) {
 
  265                new \
ILIAS\Data\Factory(),
 
  268            $this->local_di = $di;
 
  270        return $this->local_di;
 
  275        if (!$this->settings_db) {
 
  276            $this->settings_db = $this->
getDI()[
'db.settings'];
 
  283        if (!$this->activation_db) {
 
  284            $this->activation_db = $this->
getDI()[
'db.activation'];
 
  291        if (!$this->ls_activation) {
 
  301        $this->ls_activation = $settings;
 
  306        if (!$this->ls_settings) {
 
  316        $this->ls_settings = $settings;
 
  321        if (!$this->items_db) {
 
  322            $this->items_db = $this->
getLocalDI()[
'db.lsitems'];
 
  329        if (!$this->conditions_db) {
 
  330            $this->conditions_db = $this->
getDI()[
"db.postconditions"];
 
  337        if (!$this->ls_participant) {
 
  338            $this->ls_participant = $this->
getLocalDI()[
'participants'];
 
  350        if (is_null($this->ls_access)) {
 
  354        return $this->ls_access;
 
  373        $db->storeItems($ls_items);
 
  383        $rep_utils->deleteObjects($this->
getRefId(), $ref_ids);
 
  385        $db->delete($ref_ids);
 
  393        $condition_types = $this->il_condition_handler->getOperatorsByTriggerType(
$type);
 
  395            $this->
getPostConditionDB()::STD_ALWAYS_OPERATOR => $this->lng->txt(
'condition_always')
 
  397        foreach ($condition_types as $cond_type) {
 
  398            $conditions[$cond_type] = $this->lng->txt(
'condition_' . $cond_type);
 
  405        if (!$this->learner_progress_db) {
 
  406            $this->learner_progress_db = $this->
getLocalDI()[
'db.progress'];
 
  414        if (!$this->state_db) {
 
  415            $this->state_db = $this->
getDI()[
'db.states'];
 
  426        return $db->getLearnerItems($usr_id, $this->
getRefId());
 
  431        if (!$this->ls_roles) {
 
  432            $this->ls_roles = $this->
getLocalDI()[
'roles'];
 
  443        return $this->mail_members;
 
  452    public static function _goto($target, $add = 
"")
 
  456        $ilAccess = 
$DIC[
'ilAccess'];
 
  461        if (substr($add, 0, 5) == 
'rcode') {
 
  465                    "login.php?target=" . 
$_GET[
"target"] . 
"&cmd=force_login&lang=" .
 
  478        if ($add == 
"mem" && $ilAccess->checkAccess(
"manage_members", 
"", $target)) {
 
  482        if ($ilAccess->checkAccess(
"read", 
"", $target)) {
 
  486            if ($ilAccess->checkAccess(
"visible", 
"", $target)) {
 
  492                            $lng->txt(
"msg_no_perm_read_item"),
 
  512        $ns = $this->il_news;
 
  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);
 
  529        $act_db->setEffectiveOnlineStatus((
int) $this->
getRefId(), $status);
 
  537        return $this->
getLSRoles()->getLocalLearningSequenceRoles($translate);
 
  542        return $this->
getLSRoles()->getDefaultMemberRole();
 
  547        return $this->
getLSRoles()->getDefaultAdminRole();
 
  552        return $this->
getLSRoles()->getLearningSequenceMemberData($a_mem_ids, $active);
 
  557        return $this->
getLSRoles()->getDefaultLearningSequenceRoles($a_grp_id);
 
  562        return $this->
getLSRoles()->initDefaultRoles();
 
  567        return $this->getLsRoles()->readMemberData($user_ids, 
$columns);
 
  572        foreach ($this->tree->getPathFull(
$ref_id) as $hop) {
 
  573            if (in_array($hop[
'type'], $search_types)) {
 
An exception for terminatinating execution or to throw for unit testing.
INTERNAL CLASS: Please do not use in consumer code.
static _getInstance($a_copy_id)
Get instance of copy wizard options.
const LP_STATUS_COMPLETED_NUM
Storage for ilLSPostConditions.
Persistence for View-States.
Get LearningProgress and availability of items in sequence.
Persistence for online/activation period.
Activation-Settings for an LSO.
Persistence for Settings (like abstract, extro)
Settings for an LSO (like abstract, extro)
static handleCode($a_ref_id, $a_type, $a_code)
Handle target parameter.
Class ilObjLearningSequenceAccess class.
Class ilObjLearningSequence.
cloneLPSettings(int $obj_id)
getMailToMembersType()
Get mail to members type.
getLearningSequenceMemberData($a_mem_ids, $active=1)
updateSettings(ilLearningSequenceSettings $settings)
cloneObject($target_id, $copy_id=0, $omit_tree=false)
__construct(int $id=0, bool $call_by_reference=true)
deletePostConditionsForSubObjects(array $ref_ids)
Delete post conditions for ref ids.
readMemberData(array $user_ids, array $columns=null)
setEffectiveOnlineStatus(bool $status)
raiseEvent(string $event_type)
getLSItems()
Get a list of LSItems.
cloneSettings(ilObjLearningSequence $new_obj)
cloneAutoGeneratedRoles(ilObjLearningSequence $new_obj)
updateActivation(ilLearningSequenceActivation $settings)
cloneActivation(ilObjLearningSequence $new_obj, int $a_copy_id)
getLSLearnerItems(int $usr_id)
Get a list of LSLearnerItems.
getParentObjectInfo(int $ref_id, array $search_types)
getDefaultLearningSequenceRoles($a_grp_id="")
static _goto($target, $add="")
Goto target learning sequence.
static getInstanceByRefId(int $ref_id)
initDefaultRoles()
init default roles settings Purpose of this function is to create a local role folder and local roles...
getPossiblePostConditionsForType(string $type)
storeLSItems(array $ls_items)
Update LSItems.
getLocalLearningSequenceRoles(bool $translate=false)
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
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
getRefId()
get reference id @access public
cloneMetaData($target_obj)
Copy meta data.
getId()
get object id @access public
static _lookupType($a_id, $a_reference=false)
lookup object type
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.
Repository Utilities (application layer, put GUI related stuff into ilRepUtilGUI)
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ChatMainBarProvider \MainMenu\Provider.