86 $this->requested_obj_id = (int) $request_obj_id;
134 $this->chapter_has_no_active_page =
false;
135 $this->deactivated_page =
false;
138 if ($this->requested_obj_id == 0) {
140 $obj_id = $this->lm_tree->getRootId();
142 if ($this->cmd ==
"resume") {
143 if (
$user->getId() != ANONYMOUS_USER_ID && ((int) $this->focus_id == 0)) {
146 if ($last_accessed_page &&
147 $last_accessed_page != $this->lm_tree->getLastActivePage()) {
148 $obj_id = $last_accessed_page;
157 $this->lm->getType(),
158 $this->lm_set->get(
"time_scheduled_page_activation")
163 $this->deactivated_page =
true;
168 if (!$this->lm_tree->isInTree($obj_id)) {
169 $this->current_page_id = $obj_id;
173 $curr_node = $this->lm_tree->getNodeData($obj_id);
177 $this->lm->getType(),
178 $this->lm_set->get(
"time_scheduled_page_activation")
181 if ($curr_node[
"type"] ==
"pg" &&
183 $page_id = $curr_node[
"obj_id"];
188 while ($succ_node && !$active) {
189 $succ_node = $this->lm_tree->fetchSuccessorNode($page_id,
"pg");
190 $page_id = $succ_node[
"obj_id"];
193 $this->lm->getType(),
194 $this->lm_set->get(
"time_scheduled_page_activation")
198 if ($succ_node[
"type"] !=
"pg") {
199 $this->chapter_has_no_active_page =
true;
200 $this->current_page_id = 0;
205 if (
$user->getId() == ANONYMOUS_USER_ID &&
206 $this->lm->getPublicAccessMode() ==
'selected') {
209 while ($public ===
false && $page_id > 0) {
210 $succ_node = $this->lm_tree->fetchSuccessorNode($page_id,
'pg');
211 $page_id = $succ_node[
'obj_id'];
217 if ($this->lm_tree->isInTree($page_id)) {
218 $path = $this->lm_tree->getPathId($page_id);
219 if (!in_array($this->requested_obj_id, $path)) {
220 $this->chapter_has_no_active_page =
true;
225 $this->current_page_id = $page_id;
Class ilObjLearningModule.
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
__construct(ilObjUser $user, int $request_obj_id, ilLMTree $lm_tree, ilObjLearningModule $lm, ilSetting $lm_set, string $cmd, int $focus_id)
Constructor.
$chapter_has_no_active_page
getCurrentPage()
Has current chapter no avtive page?
determineStatus()
Determine status.
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
Checks current navigation request status.
isChapterWithoutActivePage()
Has current chapter no avtive page?
static _isPagePublic($a_node_id, $a_check_public_mode=false)
static _getLastAccessedPage($a_ref_id, $a_user_id="")
get last accessed page
isDeactivatedPage()
Has current chapter no avtive page?