ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
goto.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
16//var_dump ($_SESSION);
17//var_dump ($_COOKIE);
18
19// this should bring us all session data of the desired
20// client
21require_once("Services/Init/classes/class.ilInitialisation.php");
23
24// special handling for direct navigation request
25require_once "./Services/Navigation/classes/class.ilNavigationHistoryGUI.php";
27$nav_hist->handleNavigationRequest();
28
29// store original parameter before plugin slot may influence it
30$orig_target = $_GET['target'];
31
32// user interface plugin slot hook
33if (is_object($ilPluginAdmin)) {
34 // get user interface plugins
35 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
36
37 // search
38 foreach ($pl_names as $pl) {
39 $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
40 $gui_class = $ui_plugin->getUIClassInstance();
41 $gui_class->gotoHook();
42 }
43}
44
45$r_pos = strpos($_GET["target"], "_");
46$rest = substr($_GET["target"], $r_pos+1);
47$target_arr = explode("_", $_GET["target"]);
50$additional = $target_arr[2]; // optional for pages
51
52// imprint has no ref id...
53if ($target_type == "impr") {
54 ilUtil::redirect('ilias.php?baseClass=ilImprintGUI');
55}
56
57// goto is not granted?
58include_once("Services/Init/classes/class.ilStartUpGUI.php");
59if (!ilStartUpGUI::_checkGoto($_GET["target"])) {
60 // if anonymous: go to login page
61 if (!$ilUser->getId() || $ilUser->isAnonymous()) {
62 ilUtil::redirect("login.php?target=" . $orig_target . "&cmd=force_login&lang=" . $ilUser->getCurrentLanguage());
63 } else {
64 // message if target given but not accessible
65 $tarr = explode("_", $_GET["target"]);
66 if ($tarr[0] != "pg" && $tarr[0] != "st" && $tarr[1] > 0) {
67 ilUtil::sendFailure(sprintf(
68 $lng->txt("msg_no_perm_read_item"),
70 ), true);
71 }
72
73 ilUtil::redirect('ilias.php?baseClass=ilPersonalDesktopGUI');
74 }
75}
76
77
78// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
79//
80// FOR NEW OBJECT TYPES:
81// PLEASE USE DEFAULT IMPLEMENTATION ONLY
82//
83// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
84
85switch ($target_type) {
86 // exception, must be kept for now
87 case "pg":
88 require_once("./Modules/LearningModule/classes/class.ilLMPageObjectGUI.php");
90 break;
91
92 // exception, must be kept for now
93 case "st":
94 require_once("./Modules/LearningModule/classes/class.ilStructureObjectGUI.php");
96 break;
97
98 // exception, must be kept for now
99 case "git":
100 require_once("./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
101 $target_ref_id = $target_arr[2];
102 ilGlossaryTermGUI::_goto($target_id, $target_ref_id);
103 break;
104
105 // please migrate to default branch implementation
106 case "glo":
107 require_once("./Modules/Glossary/classes/class.ilObjGlossaryGUI.php");
109 break;
110
111 // please migrate to default branch implementation
112 case "lm":
113 require_once("./Modules/LearningModule/classes/class.ilObjContentObjectGUI.php");
115 break;
116
117 // please migrate to default branch implementation
118 case "htlm":
119 require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMGUI.php");
121 break;
122
123 // please migrate to default branch implementation
124 case "frm":
125 require_once("./Modules/Forum/classes/class.ilObjForumGUI.php");
126 $target_thread = $target_arr[2];
127 $target_posting = $target_arr[3];
128 ilObjForumGUI::_goto($target_id, $target_thread, $target_posting);
129 break;
130
131 // please migrate to default branch implementation
132 case "exc":
133 require_once("./Modules/Exercise/classes/class.ilObjExerciseGUI.php");
135 break;
136
137 // please migrate to default branch implementation
138 case "tst":
139 require_once("./Modules/Test/classes/class.ilObjTestGUI.php");
141 break;
142
143 // please migrate to default branch implementation
144 case "qpl":
145 require_once("./Modules/TestQuestionPool/classes/class.ilObjQuestionPoolGUI.php");
147 break;
148
149 // please migrate to default branch implementation
150 case "spl":
151 require_once("./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPoolGUI.php");
153 break;
154
155 // please migrate to default branch implementation
156 case "svy":
157 require_once("./Modules/Survey/classes/class.ilObjSurveyGUI.php");
158 if (array_key_exists("accesscode", $_GET)) {
159 ilObjSurveyGUI::_goto($target_id, $_GET["accesscode"]);
160 } else {
162 }
163 break;
164
165 // please migrate to default branch implementation
166 case "webr":
167 require_once("./Modules/WebResource/classes/class.ilObjLinkResourceGUI.php");
169 break;
170
171 // please migrate to default branch implementation
172 case "sahs":
173 require_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleGUI.php");
175 break;
176
177 // please migrate to default branch implementation
178 case "cat":
179 require_once("./Modules/Category/classes/class.ilObjCategoryGUI.php");
181 break;
182
183 // please migrate to default branch implementation
184 case "crs":
185 require_once("Modules/Course/classes/class.ilObjCourseGUI.php");
187 break;
188
189 // please migrate to default branch implementation
190 case "grp":
191 require_once("./Modules/Group/classes/class.ilObjGroupGUI.php");
193 break;
194
195 // please migrate to default branch implementation
196 case 'fold':
197 require_once("./Modules/Folder/classes/class.ilObjFolderGUI.php");
199 break;
200
201 // please migrate to default branch implementation
202 case "file":
203 require_once("./Modules/File/classes/class.ilObjFileGUI.php");
205 break;
206
207 // please migrate to default branch implementation
208 case "mcst":
209 require_once("./Modules/MediaCast/classes/class.ilObjMediaCastGUI.php");
211 break;
212
213 // please migrate to default branch implementation
214 case 'root':
215 require_once('./Modules/RootFolder/classes/class.ilObjRootFolderGUI.php');
217 break;
218
219 // please migrate to default branch implementation
220 case 'cert':
221 require_once('./Services/Certificate/classes/class.ilCertificate.php');
222 ilCertificate::_goto($target_id);
223 break;
224
225 // links to the documentation of the kitchen sink in the administration
226 case 'stys':
227 require_once('./Services/Style/System/classes/class.ilSystemStyleMainGUI.php');
229 break;
230
231 //
232 // default implementation (should be used by all new object types)
233 //
234 default:
235 if (!$objDefinition->isPlugin($target_type)) {
236 $class_name = "ilObj" . $objDefinition->getClassName($target_type) . "GUI";
237 $location = $objDefinition->getLocation($target_type);
238 if (is_file($location . "/class." . $class_name . ".php")) {
239 include_once($location . "/class." . $class_name . ".php");
240 call_user_func(array($class_name, "_goto"), $rest);
241 }
242 } else {
243 $class_name = "ilObj" . $objDefinition->getClassName($target_type) . "GUI";
244 $location = $objDefinition->getLocation($target_type);
245 if (is_file($location . "/class." . $class_name . ".php")) {
246 include_once($location . "/class." . $class_name . ".php");
247 call_user_func(array($class_name, "_goto"), array($rest, $class_name));
248 }
249 }
250 break;
251}
$location
Definition: buildRTE.php:44
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
const IL_COMP_SERVICE
static _goto($a_target, $a_ref_id="")
redirect script
static initILIAS()
ilias initialisation
static _goto($a_target)
redirect script
User Interface Class for Navigation History.
static _goto($a_target)
redirect script
static _goto($a_target, $a_add="")
goto target course
static _goto($a_target, $a_raw)
redirect script
static _goto($a_target)
redirect script
static _goto($a_target, $a_additional=null)
static _goto($a_target)
goto target group
static _goto($a_target, $a_thread=0, $a_posting=0)
static _goto($a_target)
redirect script
static _goto($a_target, $a_add="")
goto target group
static _goto($a_target, $a_additional=null)
static _goto($a_target)
Redirect script to call a test with the question pool reference id.
static _goto($a_target)
goto target group
static _goto($a_target)
goto target course
static _goto($a_target, $a_access_code="")
redirect script
static _goto($a_target)
Redirect script to call a survey question pool reference id.
static _goto($a_target)
Redirect script to call a test with the test reference id.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
static _checkGoto($a_target)
static _goto($a_target, $a_target_ref_id="")
redirect script
static _goto($ref_id, $params)
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$orig_target
Definition: goto.php:30
$nav_hist
Definition: goto.php:26
$target_id
Definition: goto.php:49
$target_arr
Definition: goto.php:47
$additional
Definition: goto.php:50
if(is_object($ilPluginAdmin)) $r_pos
Definition: goto.php:45
$rest
Definition: goto.php:46
$target_type
Definition: goto.php:48
$lng
$ilUser
Definition: imgupload.php:18