• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

survey/questionpool.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00021         +-----------------------------------------------------------------------------+
00022 */
00023 
00024 
00033 define("ILIAS_MODULE", "survey");
00034 chdir("..");
00035 require_once "./include/inc.header.php";
00036 require_once "./survey/classes/class.ilObjSurveyQuestionPoolGUI.php";
00037 
00038 // for security
00039 //unset($id);
00040 
00041 //determine call mode for object classes
00042 //TODO: don't use same var $id for both
00043 //if (isset($_GET["obj_id"]))
00044 //{
00045 //      $call_by_reference = false;
00046 //      $id = $_GET["obj_id"];
00047 //}
00048 //else
00049 //{
00050 //      $call_by_reference = true;
00051 //      $id = $_GET["ref_id"];
00052 //}
00053 
00054 // exit if no valid ID was given
00055 //if (!isset($_GET["ref_id"]))
00056 //{
00057 //      $ilias->raiseError("No valid ID given! Action aborted", $this->ilias->error_obj->MESSAGE);
00058 //}
00059 
00060 //if (!isset($_GET["type"]))
00061 //{
00062 //      if ($call_by_reference)
00063 //      {
00064 //              $obj = $ilias->obj_factory->getInstanceByRefId($_GET["ref_id"]);
00065 //      }
00066 //      else
00067 //      {
00068 //              $obj = $ilias->obj_factory->getInstanceByObjId($_GET["obj_id"]);
00069 //      }
00070 
00071 //      $_GET["type"] = $obj->getType();
00072 //}
00073 
00074 // determine command
00075 //if (($cmd = $_GET["cmd"]) == "gateway")
00076 //{
00077         // surpress warning if POST is not set
00078 //      @$cmd = key($_POST["cmd"]);
00079 
00080 //}
00081 
00082 //if (empty($cmd)) // if no cmd is given default to first property
00083 //{
00084 //      $cmd = $_GET["cmd"] = $objDefinition->getFirstProperty($_GET["type"]);
00085 //}
00086 
00087 //if ($_GET["cmd"] == "post")
00088 //{
00089 //      $cmd = key($_POST["cmd"]);
00090 //      unset($_GET["cmd"]);
00091 //}
00092 
00093 // determine object type
00094 //if ($_POST["new_type"] && (($cmd == "create") || ($cmd == "import")))
00095 //{
00096 //      $obj_type = $_POST["new_type"];
00097 //}
00098 //elseif ($_GET["new_type"])
00099 //{
00100 //      $obj_type = $_GET["new_type"];
00101 //}
00102 //else
00103 //{
00104 //      $obj_type = $_GET["type"];
00105 //}
00106 
00107 // call gui object method
00108 //$method = $cmd."Object";
00109 //$class_name = $objDefinition->getClassName($obj_type);
00110 //$module = $objDefinition->getModule($obj_type);
00111 //$module_dir = ($module == "")
00112 //      ? ""
00113 //      : $module."/";
00114 
00115 //$class_constr = "ilObj".$class_name."GUI";
00116 //require_once("./".$module_dir."classes/class.ilObj".$class_name."GUI.php");
00117 //echo $class_constr.":".$method;
00118 // for security
00119 unset($id);
00120 
00121 //determine call mode for object classes
00122 //TODO: don't use same var $id for both
00123 if ($_GET["obj_id"] > 0)
00124 {
00125         $call_by_reference = false;
00126         $id = $_GET["obj_id"];
00127 }
00128 else
00129 {
00130         $call_by_reference = true;
00131         $id = $_GET["ref_id"];
00132 }
00133 
00134 // exit if no valid ID was given
00135 if (!isset($_GET["ref_id"]))
00136 {
00137         $ilias->raiseError("No valid ID given! Action aborted", $this->ilias->error_obj->MESSAGE);
00138 }
00139 
00140 //if ((strcmp($_GET["cmd"], "questions") == 0) and (($_POST["cmd"]["create"]) or ($_POST["id"]) or ($_GET["edit"]))) {
00141 //{
00142 //      $prepare_output = false;
00143 //} else {
00144 //      $prepare_output = true;
00145 //}
00146 //$obj = new $class_constr($data, $id, $call_by_reference, $prepare_output);
00147 //$obj->$method();
00148 //$tpl->show();
00149 
00150 $ilCtrl->setTargetScript("questionpool.php");
00151 $ilCtrl->getCallStructure("ilobjsurveyquestionpoolgui");
00152 $qp_gui =& new ilObjSurveyQuestionPoolGUI("", $_GET["ref_id"], true, true);
00153 $ilCtrl->forwardCommand($qp_gui);
00154 
00155 $tpl->show();
00156 ?>
00157 
00158 

Generated on Fri Dec 13 2013 09:06:33 for ILIAS Release_3_4_x_branch .rev 46804 by  doxygen 1.7.1