92        $this->requested_obj_id = (int) $request_obj_id;
 
  141        $this->chapter_has_no_active_page = 
false;
 
  142        $this->deactivated_page = 
false;
 
  151            $obj_id = $this->lm_tree->getRootId();
 
  153            if ($this->cmd == 
"resume") {
 
  157                    if ($last_accessed_page &&
 
  158                        $last_accessed_page != $this->lm_tree->getLastActivePage()) {
 
  159                        $obj_id = $last_accessed_page;
 
  167                $this->lm->getType(),
 
  168                $this->lm_set->get(
"time_scheduled_page_activation")
 
  173                $this->deactivated_page = 
true;
 
  178        if (!$this->lm_tree->isInTree($obj_id)) {
 
  179            $this->current_page_id = $obj_id;
 
  183        $curr_node = $this->lm_tree->getNodeData($obj_id);
 
  187            $this->lm->getType(),
 
  188            $this->lm_set->get(
"time_scheduled_page_activation")
 
  191        if ($curr_node[
"type"] == 
"pg" &&
 
  193            $page_id = $curr_node[
"obj_id"];
 
  198            while ($succ_node && !$active) {
 
  199                $succ_node = $this->lm_tree->fetchSuccessorNode($page_id, 
"pg");
 
  200                $page_id = $succ_node[
"obj_id"];
 
  203                    $this->lm->getType(),
 
  204                    $this->lm_set->get(
"time_scheduled_page_activation")
 
  208            if ($succ_node[
"type"] != 
"pg") {
 
  209                $this->chapter_has_no_active_page = 
true;
 
  210                $this->current_page_id = 0;
 
  216                $this->lm->getPublicAccessMode() == 
'selected') {
 
  219                while ($public === 
false && $page_id > 0) {
 
  220                    $succ_node = $this->lm_tree->fetchSuccessorNode($page_id, 
'pg');
 
  221                    $page_id = $succ_node[
'obj_id'];
 
  227            if ($this->lm_tree->isInTree($page_id)) {
 
  228                $path = $this->lm_tree->getPathId($page_id);
 
  230                    $this->chapter_has_no_active_page = 
true;
 
  235        $this->current_page_id = $page_id;
 
  246        if (empty($page_id)) {
 
  253        if (!$this->lm_tree->isInTree($page_id)) {
 
  265        $user_id = $this->
user->getId();
 
  271        if ($this->chapter_has_no_active_page &&
 
  275            if ($this->deactivated_page) {
 
  282            $succ_node = $this->lm_tree->fetchSuccessorNode($c_id, 
"pg");
 
  283            $c_id = $succ_node[
"obj_id"];
 
  287                $this->lm->getType(),
 
  288                $this->lm_set->get(
"time_scheduled_page_activation")
 
  291            if ($succ_node[
"obj_id"] > 0 &&
 
  293                ($this->lm->getPublicAccessMode() == 
"selected" &&
 
  297                if ($succ_node[
"obj_id"] > 0 && !$active) {
 
  300                    if ($act_data[
"show_activation_info"] &&
 
  311        if (is_array($succ_node)) {
 
  312            return (
int) $succ_node[
"obj_id"];
 
  325        $user_id = $this->
user->getId();
 
  329        if ($this->deactivated_page) {
 
  335            $pre_node = $this->lm_tree->fetchPredecessorNode($c_id, 
"pg");
 
  336            $c_id = $pre_node[
"obj_id"];
 
  339                $this->lm->getType(),
 
  340                $this->lm_set->get(
"time_scheduled_page_activation")
 
  342            if ($pre_node[
"obj_id"] > 0 &&
 
  344                ($this->lm->getPublicAccessMode() == 
"selected" &&
 
  348                if ($pre_node[
"obj_id"] > 0 && !$active) {
 
  351                    if ($act_data[
"show_activation_info"] &&
 
  362        if (is_array($pre_node)) {
 
  363            return (
int) $pre_node[
"obj_id"];
 
An exception for terminatinating execution or to throw for unit testing.
Checks current navigation request status.
__construct(ilObjUser $user, int $request_obj_id, ilLMTree $lm_tree, ilObjLearningModule $lm, ilSetting $lm_set, $requested_back_page, string $cmd, int $focus_id)
Constructor.
getCurrentPage()
Has current chapter no avtive page?
isDeactivatedPage()
Has current chapter no avtive page?
isChapterWithoutActivePage()
Has current chapter no avtive page?
$chapter_has_no_active_page
determineStatus()
Determine status.
getPredecessorPageId()
Get predecessor page id.
getBackPageId()
Get back link page id.
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
static _isPagePublic($a_node_id, $a_check_public_mode=false)
static _getLastAccessedPage($a_ref_id, $a_user_id="")
get last accessed page
Class ilObjLearningModule.
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
static _lookupActivationData($a_id, $a_parent_type, $a_lang="-")
Lookup activation data.
static now()
Return current timestamp in Y-m-d H:i:s format.