ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 {
35  // get user interface plugins
36  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
37 
38  // search
39  foreach ($pl_names as $pl)
40  {
41  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
42  $gui_class = $ui_plugin->getUIClassInstance();
43  $gui_class->gotoHook();
44  }
45 }
46 
47 $r_pos = strpos($_GET["target"], "_");
48 $rest = substr($_GET["target"], $r_pos+1);
49 $target_arr = explode("_", $_GET["target"]);
52 $additional = $target_arr[2]; // optional for pages
53 
54 // imprint has no ref id...
55 if($target_type == "impr")
56 {
57  ilUtil::redirect('ilias.php?baseClass=ilImprintGUI');
58 }
59 
60 // goto is not granted?
61 include_once("Services/Init/classes/class.ilStartUpGUI.php");
62 if(!ilStartUpGUI::_checkGoto($_GET["target"]))
63 {
64  // if anonymous: go to login page
65  if($ilUser->getId() == ANONYMOUS_USER_ID)
66  {
67  ilUtil::redirect("login.php?target=".$orig_target."&cmd=force_login&lang=".$ilUser->getCurrentLanguage());
68  }
69  else
70  {
71  // message if target given but not accessible
72  $tarr = explode("_", $_GET["target"]);
73  if ($tarr[0] != "pg" && $tarr[0] != "st" && $tarr[1] > 0)
74  {
75  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
77  }
78 
79  ilUtil::redirect('ilias.php?baseClass=ilPersonalDesktopGUI');
80  }
81 }
82 
83 
84 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
85 //
86 // FOR NEW OBJECT TYPES:
87 // PLEASE USE DEFAULT IMPLEMENTATION ONLY
88 //
89 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
90 
91 switch($target_type)
92 {
93  // exception, must be kept for now
94  case "pg":
95  require_once("./Modules/LearningModule/classes/class.ilLMPageObjectGUI.php");
97  break;
98 
99  // exception, must be kept for now
100  case "st":
101  require_once("./Modules/LearningModule/classes/class.ilStructureObjectGUI.php");
103  break;
104 
105  // exception, must be kept for now
106  case "git":
107  require_once("./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
108  $target_ref_id = $target_arr[2];
109  ilGlossaryTermGUI::_goto($target_id, $target_ref_id);
110  break;
111 
112  // please migrate to default branch implementation
113  case "glo":
114  require_once("./Modules/Glossary/classes/class.ilObjGlossaryGUI.php");
116  break;
117 
118  // please migrate to default branch implementation
119  case "lm":
120  require_once("./Modules/LearningModule/classes/class.ilObjContentObjectGUI.php");
122  break;
123 
124  // please migrate to default branch implementation
125  case "htlm":
126  require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMGUI.php");
128  break;
129 
130  // please migrate to default branch implementation
131  case "frm":
132  require_once("./Modules/Forum/classes/class.ilObjForumGUI.php");
133  $target_thread = $target_arr[2];
134  $target_posting = $target_arr[3];
135  ilObjForumGUI::_goto($target_id, $target_thread, $target_posting);
136  break;
137 
138  // please migrate to default branch implementation
139  case "exc":
140  require_once("./Modules/Exercise/classes/class.ilObjExerciseGUI.php");
142  break;
143 
144  // please migrate to default branch implementation
145  case "tst":
146  require_once("./Modules/Test/classes/class.ilObjTestGUI.php");
148  break;
149 
150  // please migrate to default branch implementation
151  case "qpl":
152  require_once("./Modules/TestQuestionPool/classes/class.ilObjQuestionPoolGUI.php");
154  break;
155 
156  // please migrate to default branch implementation
157  case "spl":
158  require_once("./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPoolGUI.php");
160  break;
161 
162  // please migrate to default branch implementation
163  case "svy":
164  require_once("./Modules/Survey/classes/class.ilObjSurveyGUI.php");
165  if (array_key_exists("accesscode", $_GET))
166  {
167  ilObjSurveyGUI::_goto($target_id, $_GET["accesscode"]);
168  }
169  else
170  {
172  }
173  break;
174 
175  // please migrate to default branch implementation
176  case "webr":
177  require_once("./Modules/WebResource/classes/class.ilObjLinkResourceGUI.php");
179  break;
180 
181  // please migrate to default branch implementation
182  case "sahs":
183  require_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleGUI.php");
185  break;
186 
187  // please migrate to default branch implementation
188  case "cat":
189  require_once("./Modules/Category/classes/class.ilObjCategoryGUI.php");
191  break;
192 
193  // please migrate to default branch implementation
194  case "crs":
195  require_once("Modules/Course/classes/class.ilObjCourseGUI.php");
197  break;
198 
199  // please migrate to default branch implementation
200  case "grp":
201  require_once("./Modules/Group/classes/class.ilObjGroupGUI.php");
203  break;
204 
205  // please migrate to default branch implementation
206  case 'fold':
207  require_once("./Modules/Folder/classes/class.ilObjFolderGUI.php");
209  break;
210 
211  // please migrate to default branch implementation
212  case "file":
213  require_once("./Modules/File/classes/class.ilObjFileGUI.php");
215  break;
216 
217  // please migrate to default branch implementation
218  case "mcst":
219  require_once("./Modules/MediaCast/classes/class.ilObjMediaCastGUI.php");
221  break;
222 
223  // please migrate to default branch implementation
224  case 'root':
225  require_once('./Modules/RootFolder/classes/class.ilObjRootFolderGUI.php');
227  break;
228 
229  // please migrate to default branch implementation
230  case 'cert':
231  require_once('./Services/Certificate/classes/class.ilCertificate.php');
232  ilCertificate::_goto($target_id);
233  break;
234 
235  //
236  // default implementation (should be used by all new object types)
237  //
238  default:
239  if (!$objDefinition->isPlugin($target_type))
240  {
241  $class_name = "ilObj".$objDefinition->getClassName($target_type)."GUI";
242  $location = $objDefinition->getLocation($target_type);
243  if (is_file($location."/class.".$class_name.".php"))
244  {
245  include_once($location."/class.".$class_name.".php");
246  call_user_func(array($class_name, "_goto"), $rest);
247  }
248  }
249  else
250  {
251  $class_name = "ilObj".$objDefinition->getClassName($target_type)."GUI";
252  $location = $objDefinition->getLocation($target_type);
253  if (is_file($location."/class.".$class_name.".php"))
254  {
255  include_once($location."/class.".$class_name.".php");
256  call_user_func(array($class_name, "_goto"), array($rest, $class_name));
257  }
258  }
259  break;
260 }
261 ?>
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:49
$rest
Definition: goto.php:48
static _goto($a_target, $a_access_code="")
redirect script
$target_type
Definition: goto.php:50
$_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:51
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:47
static _goto($a_target)
redirect script
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
static _lookupObjId($a_id)
$ilUser
Definition: imgupload.php:18
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
$additional
Definition: goto.php:52
Create styles array
The data for the language used.
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
global $lng
Definition: privfeed.php:17
static _goto($a_target, $a_additional=null)
static _goto($a_target)
goto target group
static redirect($a_script)
http redirect to other script
const IL_COMP_SERVICE
static _goto($a_target)
redirect script