ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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
21 require_once("Services/Init/classes/class.ilInitialisation.php");
23 
24 // special handling for direct navigation request
25 require_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
33 if (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...
53 if ($target_type == "impr") {
54  ilUtil::redirect('ilias.php?baseClass=ilImprintGUI');
55 }
56 
57 // goto is not granted?
58 include_once("Services/Init/classes/class.ilStartUpGUI.php");
59 if (!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  } else {
72  ilUtil::sendFailure($lng->txt('permission_denied'), true);
73  }
75  }
76 }
77 
78 
79 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
80 //
81 // FOR NEW OBJECT TYPES:
82 // PLEASE USE DEFAULT IMPLEMENTATION ONLY
83 //
84 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
85 
86 switch ($target_type) {
87  // exception, must be kept for now
88  case "pg":
90  break;
91 
92  // exception, must be kept for now
93  case "st":
95  break;
96 
97  // exception, must be kept for now
98  case "git":
99  $target_ref_id = $target_arr[2];
100  ilGlossaryTermGUI::_goto($target_id, $target_ref_id);
101  break;
102 
103  // please migrate to default branch implementation
104  case "glo":
106  break;
107 
108  // please migrate to default branch implementation
109  case "lm":
111  break;
112 
113  // please migrate to default branch implementation
114  case "htlm":
116  break;
117 
118  // please migrate to default branch implementation
119  case "frm":
120  require_once("./Modules/Forum/classes/class.ilObjForumGUI.php");
121  $target_thread = $target_arr[2];
122  $target_posting = $target_arr[3];
123  ilObjForumGUI::_goto($target_id, $target_thread, $target_posting);
124  break;
125 
126  // please migrate to default branch implementation
127  case "exc":
129  break;
130 
131  // please migrate to default branch implementation
132  case "tst":
133  require_once("./Modules/Test/classes/class.ilObjTestGUI.php");
135  break;
136 
137  // please migrate to default branch implementation
138  case "qpl":
139  require_once("./Modules/TestQuestionPool/classes/class.ilObjQuestionPoolGUI.php");
141  break;
142 
143  // please migrate to default branch implementation
144  case "spl":
145  require_once("./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPoolGUI.php");
147  break;
148 
149  // please migrate to default branch implementation
150  case "svy":
151  require_once("./Modules/Survey/classes/class.ilObjSurveyGUI.php");
152  if (array_key_exists("accesscode", $_GET)) {
153  ilObjSurveyGUI::_goto($target_id, $_GET["accesscode"]);
154  } else {
156  }
157  break;
158 
159  // please migrate to default branch implementation
160  case "webr":
161  require_once("./Modules/WebResource/classes/class.ilObjLinkResourceGUI.php");
163  break;
164 
165  // please migrate to default branch implementation
166  case "sahs":
167  require_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleGUI.php");
169  break;
170 
171  // please migrate to default branch implementation
172  case "cat":
173  require_once("./Modules/Category/classes/class.ilObjCategoryGUI.php");
175  break;
176 
177  // please migrate to default branch implementation
178  case "crs":
179  require_once("Modules/Course/classes/class.ilObjCourseGUI.php");
181  break;
182 
183  // please migrate to default branch implementation
184  case "grp":
185  require_once("./Modules/Group/classes/class.ilObjGroupGUI.php");
187  break;
188 
189  // please migrate to default branch implementation
190  case 'fold':
191  require_once("./Modules/Folder/classes/class.ilObjFolderGUI.php");
193  break;
194 
195  // please migrate to default branch implementation
196  case "file":
197  require_once("./Modules/File/classes/class.ilObjFileGUI.php");
199  break;
200 
201  // please migrate to default branch implementation
202  case "mcst":
204  break;
205 
206  // please migrate to default branch implementation
207  case 'root':
208  require_once('./Modules/RootFolder/classes/class.ilObjRootFolderGUI.php');
210  break;
211 
212  // please migrate to default branch implementation
213  case 'cert':
214  require_once('./Services/Certificate/classes/class.ilCertificate.php');
215  ilCertificate::_goto($target_id);
216  break;
217 
218  // links to the documentation of the kitchen sink in the administration
219  case 'stys':
220  require_once('./Services/Style/System/classes/class.ilSystemStyleMainGUI.php');
222  break;
223 
224  //
225  // default implementation (should be used by all new object types)
226  //
227  default:
228  if (!$objDefinition->isPlugin($target_type)) {
229  $class_name = "ilObj" . $objDefinition->getClassName($target_type) . "GUI";
230  $location = $objDefinition->getLocation($target_type);
231  if (is_file($location . "/class." . $class_name . ".php")) {
232  include_once($location . "/class." . $class_name . ".php");
233  call_user_func(array($class_name, "_goto"), $rest);
234  }
235  } else {
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"), array($rest, $class_name));
241  }
242  }
243  break;
244 }
static _goto($a_target)
Redirect script to call a test with the question pool reference id.
static _checkGoto($a_target)
$target_arr
Definition: goto.php:47
$rest
Definition: goto.php:46
static _goto($a_target, $a_access_code="")
redirect script
$target_type
Definition: goto.php:48
static _goto($a_target, $a_thread=0, $a_posting=0)
$_GET["client_id"]
$location
Definition: buildRTE.php:44
$orig_target
Definition: goto.php:30
static _goto($a_target)
Redirect script to call a test with the test reference id.
$target_id
Definition: goto.php:49
static _lookupTitle($a_id)
lookup object title
static _goto($a_target, $a_target_ref_id="")
redirect script
static _goto($a_target, $a_add="")
goto target course
if(is_object($ilPluginAdmin)) $r_pos
Definition: goto.php:45
static _goto($a_target)
redirect script
static getStartingPointAsUrl()
Get current starting point setting as URL.
static _goto($a_target)
goto target group
static _goto($a_target)
Redirect script to call a survey question pool reference id.
static _goto($a_target, $a_additional=null)
static _goto($a_target, $a_raw)
redirect script
static _goto($a_target, $a_ref_id="")
redirect script
User Interface Class for Navigation History.
static _goto($a_target)
goto target course
static initILIAS()
ilias initialisation
static _goto($a_target)
redirect script
$lng
static _lookupObjId($a_id)
$ilUser
Definition: imgupload.php:18
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
static _goto($ref_id, $params)
$additional
Definition: goto.php:50
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$nav_hist
Definition: goto.php:26
static _goto($a_target, $a_add="")
goto target group
static _goto($a_target)
redirect script
static _goto($a_target, $a_additional=null)
static _goto($a_target)
goto target group
static redirect($a_script)
const IL_COMP_SERVICE
static _goto($a_target)
redirect script