3require_once(
'class.ilCachedCtrl.php');
 
   98        $this->stored_trees = array(
"ilrepositorygui", 
"ildashboardgui",
 
   99            "illmpresentationgui", 
"illmeditorgui",
 
  100            "iladministrationgui");
 
  110        $this->save_parameter = array();
 
  111        $this->parameter = array();                     
 
  112        $this->
return = array();                        
 
  113        $this->tab = array();
 
  114        $this->current_node = 0;
 
  115        $this->call_node = array();
 
  116        $this->root_class = 
"";
 
  132        $baseClass = strtolower(
$_GET[
"baseClass"]);
 
  135        $mc_rec = $module_class->lookupModuleClass($baseClass);
 
  137        $module = $mc_rec[
"module"];
 
  138        $class = $mc_rec[
"class"];
 
  139        $class_dir = $mc_rec[
"dir"];
 
  142            $m_set = 
$ilDB->query(
"SELECT * FROM il_component WHERE name = " .
 
  143                $ilDB->quote($module, 
"text"));
 
  144            $m_rec = 
$ilDB->fetchAssoc($m_set);
 
  146            $mc_rec = $module_class->lookupServiceClass($baseClass);
 
  149            $class = $mc_rec[
"class"];
 
  150            $class_dir = $mc_rec[
"dir"];
 
  153                include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
 
  154                throw new ilCtrlException(
"Could not find entry in modules.xml or services.xml for " .
 
  155                    $baseClass . 
" <br/>" . str_replace(
"&", 
"<br />&", htmlentities(
$_SERVER[
"REQUEST_URI"])));
 
  163        $base_class_gui = 
new $class();
 
  175        throw new Exception(
"ilCtrl::getModuleDir is deprecated.");
 
  190        $class = strtolower(get_class($a_gui_object));
 
  192        $nr = $nr[
"node_id"];
 
  194            $current_node = $this->current_node;
 
  196            $this->current_node = $nr;
 
  200            $this->call_hist[] = array(
"class" => get_class($a_gui_object),
 
  201                    "mode" => 
"execComm", 
"cmd" => $this->
getCmd());
 
  203            $html = $a_gui_object->executeCommand();
 
  206            $this->current_node = $current_node;
 
  211        include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
 
  224    public function getHTML($a_gui_object, array $a_parameters = 
null)
 
  226        $class = strtolower(get_class($a_gui_object));
 
  229        $nr = $nr[
"node_id"];
 
  231            $current_node = $this->current_node;
 
  234            $this->current_node = $nr;
 
  238            $this->call_hist[] = array(
"class" => get_class($a_gui_object),
 
  239                    "mode" => 
"getHtml", 
"cmd" => $this->
getCmd());
 
  242            if ($a_parameters != 
null) {
 
  243                $html = $a_gui_object->getHTML($a_parameters);
 
  245                $html = $a_gui_object->getHTML();
 
  249            $this->current_node = $current_node;
 
  255        include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
 
  268    public function setContext($a_obj_id, $a_obj_type, $a_sub_obj_id = 0, $a_sub_obj_type = 
"")
 
  270        $this->context_obj_id = $a_obj_id;
 
  271        $this->context_obj_type = $a_obj_type;
 
  272        $this->context_sub_obj_id = $a_sub_obj_id;
 
  273        $this->context_sub_obj_type = $a_sub_obj_type;
 
  283        return $this->context_obj_id;
 
  293        return $this->context_obj_type;
 
  303        return $this->context_sub_obj_id;
 
  313        return $this->context_sub_obj_type;
 
  338        $class = strtolower($a_class);
 
  341        if ($a_par_node === 0 || $a_par_node == 
"") {
 
  343                "base_class" => $class);
 
  352            return array(
"node_id" => $a_par_node,
 
  359            in_array($a_class, $this->calls[$this->
getClassForCid($node_cid)])) {
 
  360            return array(
"node_id" => $a_par_node . 
":" . $this->
getCidForClass($class),
 
  366        if ($par_cid != 
"") {
 
  368                in_array($a_class, $this->calls[$this->
getClassForCid($par_cid)])) {
 
  369                return array(
"node_id" =>
 
  377        while ($temp_node != 
"") {
 
  380                return array(
"node_id" => $temp_node,
 
  388        if ($a_class != 
"") {
 
  390            $mc_rec = $module_class->lookupModuleClass($class);
 
  391            $n_class = $mc_rec[
'lower_class'];
 
  393            if ($n_class == 
"") {
 
  394                $mc_rec = $module_class->lookupServiceClass($class);
 
  395                $n_class = $mc_rec[
'lower_class'];
 
  398            if ($n_class != 
"") {
 
  401                    "base_class" => $class);
 
  413        error_log(
"ERROR: Can't find target class $a_class for node $a_par_node " .
 
  416        include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
 
  417        throw new ilCtrlException(
"ERROR: Can't find target class $a_class for node $a_par_node " .
 
  429        if (!is_array($a_class)) {
 
  430            $a_class = array($a_class);
 
  433        $nr = $this->current_node;
 
  434        foreach ($a_class as $class) {
 
  435            $class = strtolower($class);
 
  442            $nr = $nr[
"node_id"];
 
  457        return $_GET[
"cmdNode"];
 
  468    public function addTab($a_lang_var, $a_link, $a_cmd, $a_class)
 
  470        $a_class = strtolower($a_class);
 
  472        $this->tab[] = array(
"lang_var" => $a_lang_var,
 
  473            "link" => $a_link, 
"cmd" => $a_cmd, 
"class" => $a_class);
 
  527        $a_class = strtolower($a_class);
 
  532        $this->call_node[$a_nr] = array(
"class" => $a_class, 
"parent" => $a_parent);
 
  534        $call_set = 
$ilDB->query(
"SELECT * FROM ctrl_calls WHERE parent = " .
 
  535            $ilDB->quote(strtolower($a_class), 
"text") .
 
  536            " ORDER BY child", array(
"text"));
 
  538        while ($call_rec = 
$ilDB->fetchAssoc($call_set)) {
 
  540            $forw[] = $call_rec[
"child"];
 
  544        $this->root_class = $a_class;
 
  569        if (is_object($a_obj)) {
 
  582        if (is_array($a_parameter)) {
 
  584                $this->save_parameter[strtolower($a_class)][] = 
$parameter;
 
  587            $this->save_parameter[strtolower($a_class)][] = $a_parameter;
 
  616        $this->parameter[strtolower(get_class($a_obj))][$a_parameter] = $a_value;
 
  629        $this->parameter[strtolower($a_class)][$a_parameter] = $a_value;
 
  641        unset($this->parameter[strtolower($a_class)][$a_parameter]);
 
  663        $this->parameter[strtolower($a_class)] = array();
 
  670        $objDefinition = 
$DIC[
"objDefinition"];
 
  673        if (
$_GET[
"gotolp"] &&
 
  675            $ref_id = 
$_GET[
"ref_id"];
 
  677                $ref_id = $_REQUEST[
"ref_id"];
 
  680            $gui_class = get_class($a_gui_obj);
 
  682            if ($gui_class == 
"ilSAHSEditGUI") {
 
  684                include_once 
"./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
 
  688                        $class = 
"ilObjSCORM2004LearningModuleGUI";
 
  692                        $class = 
"ilObjSCORMLearningModuleGUI";
 
  696                        $class = 
"ilObjAICCLearningModuleGUI";
 
  700                        $class = 
"ilObjHACPLearningModuleGUI";
 
  703                if (
$GLOBALS[
"ilAccess"]->checkAccess(
"edit_learning_progress", 
"", $ref_id)) {
 
  704                    $this->
redirectByClass(array($gui_class, $class, 
"illearningprogressgui", 
"illplistofsettingsgui"), 
"");
 
  708            elseif ($gui_class == 
"ilLMPresentationGUI") {
 
  710                $this->
redirectByClass(array(
"ilLMEditorGUI", 
"ilObjLearningModuleGUI"), 
"");
 
  713            include_once 
"Services/Object/classes/class.ilObjectLP.php";
 
  715            $class = 
"ilObj" . $objDefinition->getClassName(
$type) . 
"GUI";
 
  717            if ($gui_class == $class &&
 
  719                $GLOBALS[
"ilAccess"]->checkAccess(
"edit_learning_progress", 
"", $ref_id)) {
 
  724                    $a_cmd_node = $obj_node[
"node_id"];
 
  729                $_GET[
"cmdNode"] = $lp_settings_node[
"node_id"];
 
  730                $_GET[
"cmdClass"] = 
"ilLPListOfSettingsGUI";
 
  732                return "illearningprogressgui";
 
  748        if ($cmdNode == 
"") {
 
  753            if ($this->current_node == $cmdNode) {
 
  758                $path = $this->
getPathNew($this->current_node, $cmdNode);
 
  773        $a_class_name = strtolower($a_class_name);
 
  776        $class_rec = $cached_ctrl->lookupClassFile($a_class_name);
 
  778        if ($class_rec[
"plugin_path"] != 
"") {
 
  779            return $class_rec[
"plugin_path"] . 
"/" . $class_rec[
"filename"];
 
  781            return $class_rec[
"filename"];
 
  795        $path = pathinfo($a_class_path);
 
  796        $file = $path[
"basename"];
 
  797        $class = substr($file, 6, strlen($file) - 10);
 
  810        if ($a_source_node == 
"1") {
 
  813        if (substr($a_target_node, 0, strlen($a_source_node)) != $a_source_node) {
 
  814            $failure = 
"ERROR: Path not found. Source:" . $a_source_node .
 
  815                ", Target:" . $a_target_node;
 
  817                include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
 
  821            $this->
redirectToURL(
'./ilias.php?baseClass=ilRepositoryGUI');
 
  823        $temp_node = $a_source_node;
 
  826        if ($a_source_node != 
"") {
 
  827            $path = array($a_source_node);
 
  830        $diffstart = ($a_source_node == 
"")
 
  832            : strlen($a_source_node) + 1;
 
  833        $diff = substr($a_target_node, $diffstart);
 
  834        $diff_arr = explode(
":", $diff);
 
  835        foreach ($diff_arr as $cid) {
 
  836            if ($temp_node != 
"") {
 
  840            $path[] = $temp_node;
 
  852        $this->target_script = $a_target_script;
 
  877        $_GET[
"baseClass"] = $a_base_class;
 
  879        $_GET[
"cmdClass"] = 
"";
 
  880        $_GET[
"cmdNode"] = 
"";
 
  891    public function getCmd($a_default_cmd = 
"", $a_safe_commands = 
"")
 
  894        if (isset(
$_GET[
"cmd"])) {
 
  897        if ($cmd == 
"post") {
 
  901            $cmd = @key(
$_POST[
"cmd"]);
 
  904            if ($this->verified_cmd != 
"") {
 
  905                return $this->verified_cmd;
 
  908                    (!is_array($a_safe_commands) || !in_array($cmd, $a_safe_commands))) {
 
  909                    return $a_default_cmd;
 
  913            $this->verified_cmd = $cmd;
 
  914            if ($cmd == 
"" && isset(
$_POST[
"table_top_cmd"])) {         
 
  915                $cmd = @key(
$_POST[
"table_top_cmd"]);
 
  916                $this->verified_cmd = $cmd;
 
  919            if ($cmd == 
"" && isset(
$_POST[
"select_cmd2"])) {           
 
  920                if (isset(
$_POST[
"select_cmd_all2"])) {
 
  923                    $_POST[
"select_cmd_all"] = 
$_POST[
"select_cmd_all2"] = 
null;
 
  925                $cmd = 
$_POST[
"selected_cmd2"];
 
  926                $this->verified_cmd = $cmd;
 
  928            if ($cmd == 
"" && isset(
$_POST[
"select_cmd"])) {            
 
  929                if (isset(
$_POST[
"select_cmd_all"])) {
 
  932                    $_POST[
"select_cmd_all"] = 
$_POST[
"select_cmd_all2"] = 
null;
 
  934                $cmd = 
$_POST[
"selected_cmd"];
 
  935                $this->verified_cmd = $cmd;
 
  938                $cmd = 
$_GET[
"fallbackCmd"];
 
  939                $this->verified_cmd = $cmd;
 
  943            $cmd = $a_default_cmd;
 
  960        $_GET[
"cmd"] = $a_cmd;
 
  975        $a_cmd_class = strtolower($a_cmd_class);
 
  977        $nr = $nr[
"node_id"];
 
  978        $_GET[
"cmdClass"] = $a_cmd_class;
 
  979        $_GET[
"cmdNode"] = $nr;
 
  989        return strtolower(
$_GET[
"cmdClass"]);
 
 1004        $a_fallback_cmd = 
"",
 
 1010            strtolower(get_class($a_gui_obj)),
 
 1031        $a_fallback_cmd = 
"",
 
 1036        if (!is_array($a_class)) {
 
 1037            $a_class = strtolower($a_class);
 
 1047        if ($a_fallback_cmd != 
"") {
 
 1055        if ($a_anchor != 
"") {
 
 1056            $script = $script . 
"#" . $a_anchor;
 
 1090        if ($this->rtoken != 
"") {
 
 1094                $ilUser->getId() != ANONYMOUS_USER_ID) {
 
 1095                $res = 
$ilDB->query(
"SELECT token FROM il_request_token WHERE user_id = " .
 
 1097                    " AND session_id = " . 
$ilDB->quote(session_id(), 
"text"));
 
 1099                if ($rec[
"token"] != 
"") {
 
 1100                    $this->rtoken = $rec[
"token"];
 
 1101                    return $rec[
"token"];
 
 1104                $random = new \ilRandom();
 
 1105                $this->rtoken = md5(uniqid($random->int(), 
true));
 
 1108                if ($random->int(1, 200) == 2) {
 
 1112                    $dq = 
"DELETE FROM il_request_token WHERE " .
 
 1114                    $ilDB->manipulate($dq);
 
 1121                $ilDB->manipulate(
"INSERT INTO il_request_token (user_id, token, stamp, session_id) VALUES " .
 
 1124                    $ilDB->quote($this->rtoken, 
"text") . 
"," .
 
 1125                    $ilDB->now() . 
"," .
 
 1126                    $ilDB->quote(session_id(), 
"text") . 
")");
 
 1148            $ilUser->getId() != ANONYMOUS_USER_ID) {
 
 1149            if (
$_GET[
"rtoken"] == 
"") {
 
 1153            $set = 
$ilDB->query(
"SELECT * FROM il_request_token WHERE " .
 
 1154                " user_id = " . 
$ilDB->quote(
$ilUser->getId(), 
"integer") . 
" AND " .
 
 1155                " token = " . 
$ilDB->quote(
$_GET[self::IL_RTOKEN_NAME]), 
"text");
 
 1156            if (
$ilDB->numRows($set) > 0) {
 
 1167                $ilDB->manipulate(
"DELETE FROM il_request_token WHERE " .
 
 1168                    " user_id = " . 
$ilDB->quote(
$ilUser->getId(), 
"integer") . 
" AND " .
 
 1169                    " session_id != " . 
$ilDB->quote(session_id(), 
"text") . 
" AND " .
 
 1181                if (count(
$_SESSION[
"rtokens"]) > 100) {
 
 1182                    $to_remove = array();
 
 1185                    foreach (
$_SESSION[
"rtokens"] as $tok => $time) {
 
 1186                        if (time() - $time > $sec) {
 
 1187                            $to_remove[] = $tok;
 
 1190                    foreach ($to_remove as $tok) {
 
 1212    public function redirect($a_gui_obj, $a_cmd = 
"", $a_anchor = 
"", $a_asynch = 
false)
 
 1215            strtolower(get_class($a_gui_obj)),
 
 1221        if ($a_anchor != 
"") {
 
 1222            $script = $script . 
"#" . $a_anchor;
 
 1235        $ilPluginAdmin = 
null;
 
 1236        if (isset(
$DIC[
"ilPluginAdmin"])) {
 
 1237            $ilPluginAdmin = 
$DIC[
"ilPluginAdmin"];
 
 1240        if (!is_int(strpos($a_script, 
"://"))) {
 
 1241            if (substr($a_script, 0, 1) != 
"/" && defined(
"ILIAS_HTTP_PATH")) {
 
 1242                if (is_int(strpos(
$_SERVER[
"PHP_SELF"], 
"/setup/"))) {
 
 1243                    $a_script = 
"setup/" . $a_script;
 
 1250        if (is_object($ilPluginAdmin)) {
 
 1251            $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE, 
"UIComponent", 
"uihk");
 
 1252            foreach ($pl_names as $pl) {
 
 1254                $gui_class = $ui_plugin->getUIClassInstance();
 
 1255                $resp = $gui_class->getHTML(
"Services/Utilities", 
"redirect", array( 
"html" => $a_script ));
 
 1257                    $a_script = $gui_class->modifyHTML($a_script, 
$resp);
 
 1266        session_write_close();
 
 1270        switch (
$http->request()->getHeaderLine(
'Accept')) {
 
 1271            case 'application/json':
 
 1274                    'message' => 
'Called redirect after async fileupload request',
 
 1275                    "redirect_url" => $a_script,
 
 1277                $http->saveResponse(
$http->response()->withBody($stream));
 
 1280                $http->saveResponse(
$http->response()->withAddedHeader(
"Location", $a_script));
 
 1283        $http->sendResponse();
 
 1297        if ($a_anchor != 
"") {
 
 1298            $script = $script . 
"#" . $a_anchor;
 
 1310        if (isset(
$_GET[
"cmdMode"]) && 
$_GET[
"cmdMode"] == 
"asynch") {
 
 1337            strtolower(get_class($a_gui_obj)),
 
 1374            $script .= $amp . 
"cmdMode=asynch";
 
 1377        if ($a_anchor != 
"") {
 
 1378            $script = $script . 
"#" . $a_anchor;
 
 1390        $script = $this->
getUrlParameters(strtolower(get_class($a_gui_obj)), $script, $a_cmd);
 
 1391        $this->
return[strtolower(get_class($a_gui_obj))] = $script;
 
 1400        $a_class = strtolower($a_class);
 
 1404        $this->
return[strtolower($a_class)] = $script;
 
 1416            "redirectSource=" . strtolower(get_class($a_gui_obj))
 
 1420            "cmdMode=" . 
$_GET[
"cmdMode"]
 
 1422        if ($a_anchor != 
"") {
 
 1423            $script = $script . 
"#" . $a_anchor;
 
 1448        $a_class = strtolower($a_class);
 
 1451            return $this->
return[$ret_class];
 
 1465        if (is_object($a_class)) {
 
 1466            $class = strtolower(get_class($a_class));
 
 1468            $class = strtolower($a_class);
 
 1479        $a_class = strtolower($a_class);
 
 1482        $node = $node[
"node_id"];
 
 1483        $n_arr = explode(
":", $node);
 
 1484        for (
$i = count($n_arr) - 2; 
$i >= 0; 
$i--) {
 
 1500        return $_GET[
"redirectSource"];
 
 1515        foreach ($params as $par => $value) {
 
 1516            if (strlen((
string) $value)) {
 
 1543        if ($a_class == 
"") {
 
 1547        if (!is_array($a_class)) {
 
 1548            $a_class = array($a_class);
 
 1551        $nr = $this->current_node;
 
 1552        $new_baseclass = 
"";
 
 1553        foreach ($a_class as $class) {
 
 1554            $class = strtolower($class);
 
 1556            if ($nr[
"base_class"] != 
"") {
 
 1557                $new_baseclass = $nr[
"base_class"];
 
 1559            $nr = $nr[
"node_id"];
 
 1560            $target_class = $class;
 
 1567        foreach ($path as $node_id) {
 
 1568            $class = ($node_id == 
"")
 
 1569                ? strtolower(
$_GET[
"baseClass"])
 
 1571            if (isset($this->save_parameter[$class]) && is_array($this->save_parameter[$class])) {
 
 1572                foreach ($this->save_parameter[$class] as $par) {
 
 1573                    if (isset(
$_GET[$par])) {
 
 1574                        $params[$par] = 
$_GET[$par];
 
 1575                    } elseif (isset(
$_POST[$par])) {
 
 1581            if (isset($this->parameter[$class]) && is_array($this->parameter[$class])) {
 
 1582                foreach ($this->parameter[$class] as $par => $value) {
 
 1583                    $params[$par] = $value;
 
 1589            $params[
"cmd"] = $a_cmd;
 
 1592        $params[
"cmdClass"] = $target_class;
 
 1593        $params[
"cmdNode"] = $nr;
 
 1594        if ($new_baseclass == 
"") {
 
 1595            $params[
"baseClass"] = 
$_GET[
"baseClass"];
 
 1597            $params[
"baseClass"] = $new_baseclass;
 
 1605        return $this->class_cid[$a_class] == 
"";
 
 1621                $add = 
"<br><br>Please make sure your GUI class name ends with 'GUI' and that the filename is 'class.[YourClassName].php'. In exceptional cases you 
 1622                                        may solve the issue by putting an empty * @ilCtrl_Calls [YourClassName]: into your class header." .
 
 1623                    " In both cases you need to reload the control structure in the setup.";
 
 1625            include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
 
 1626            throw new ilCtrlException(
"Cannot find cid for class " . $a_class . 
"." . $add);
 
 1628        return $this->class_cid[$a_class];
 
 1633        return $this->cid_class[$a_cid] == 
"";
 
 1646            include_once(
"./Services/UICore/exceptions/class.ilCtrlException.php");
 
 1647            throw new ilCtrlException(
"Cannot find class for cid " . $a_cid . 
".");
 
 1649        return $this->cid_class[$a_cid];
 
 1654        foreach ($a_cached_ctrl->
lookupCall($a_class) as $call) {
 
 1656                $this->calls[$a_class][] = $call[
"child"];
 
 1669        if (isset($this->info_read_cid[$a_cid])) {
 
 1674        $cid_info = $cached_ctrl->lookupCid($a_cid);
 
 1679            $this->info_read_class[$cid_info[
"class"]] = 
true;
 
 1682        $this->info_read_cid[$a_cid] = 
true;
 
 1693        $class_ids = explode(
":", $a_node);
 
 1694        foreach ($class_ids as $cid) {
 
 1707        $a_class = strtolower($a_class);
 
 1708        if (isset($this->info_read_class[$a_class])) {
 
 1713        $class_info = $cached_ctrl->lookupClassFile($a_class);
 
 1720        $this->info_read_class[$a_class] = 
true;
 
 1721        $this->info_read_cid[$this->class_cid[$a_class]] = 
true;
 
 1726        return !isset($this->calls[$a_class])
 
 1727                || !is_array($this->calls[$a_class])
 
 1728                || !in_array($a_child, $this->calls[$a_class]);
 
 1733        $this->cid_class[$a_cid] = $a_class;
 
 1734        $this->class_cid[$a_class] = $a_cid;
 
 1742        $class_ids = explode(
":", $a_node);
 
 1743        return $class_ids[count($class_ids) - 2];
 
 1751        $lpos = strrpos($a_node, 
":");
 
 1752        return substr($a_node, 0, $lpos);
 
 1760        $n_arr = explode(
":", $a_node);
 
 1761        return $n_arr[count($n_arr) - 1];
 
 1777        $a_parent = strtolower($a_parent);
 
 1778        $a_child = strtolower($a_child);
 
 1779        $a_comp_prefix = strtolower($a_comp_prefix);
 
 1781        $set = 
$ilDB->query(
 
 1782            "SELECT * FROM ctrl_calls WHERE " .
 
 1783            " parent = " . 
$ilDB->quote($a_parent, 
"text") . 
" AND " .
 
 1784            " child = " . 
$ilDB->quote($a_child, 
"text") . 
" AND " .
 
 1785            " comp_prefix = " . 
$ilDB->quote($a_comp_prefix, 
"text")
 
 1787        if ($rec = 
$ilDB->fetchAssoc($set)) {
 
 1790        $ilDB->manipulate(
"INSERT INTO ctrl_calls " .
 
 1791            "(parent, child, comp_prefix) VALUES (" .
 
 1792            $ilDB->quote($a_parent, 
"text") . 
"," .
 
 1793            $ilDB->quote($a_child, 
"text") . 
"," .
 
 1794            $ilDB->quote($a_comp_prefix, 
"text") .
 
 1807        foreach (explode(
":", $this->
getCmdNode()) as $cid) {
 
 1808            if ($cid != 
"" && strtolower($this->
getClassForCid($cid)) == strtolower($gui_class)) {
 
 1824        foreach (explode(
":", $this->
getCmdNode()) as $cid) {
 
 1830            $path[] = 
$_GET[
"baseClass"];
 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
static ofString($string)
Creates a new stream with an initial value.
static getComponentInfo($a_type, $a_name)
This class provides processing control methods.
initializeMemberVariables()
Initialize member variables.
getCurrentClassPath()
Get current class path as array of class file names.
getHTML($a_gui_object, array $a_parameters=null)
Gets an HTML output from another GUI class and returns the flow of control to the calling class.
getCidForClass($a_class, $a_check=false)
Get class id for class after fetching and storing corresponding information, if necessary.
checkLPSettingsForward($a_gui_obj, $a_cmd_node)
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=false)
Get form action url for gui class object.
getCallHistory()
Get controller call history.
setCmdClass($a_cmd_class)
Set the current command class.
clearParameterByClass($a_class, $a_parameter)
Same as setParameterByClass, except that a class name is passed.
getCmd($a_default_cmd="", $a_safe_commands="")
Determines current get/post command.
getParentReturnByClass($a_class)
Get return script url.
getContextSubObjId()
Get context subobject id.
getContextObjId()
Get context object id.
getCmdNode()
Get command target node.
readCallStructure($a_class, $a_nr=0, $a_parent=0)
Reads call structure from db.
getParentCidOfNode($a_node)
Get 2nd to last class id of node.
readCidInfo($a_cid)
Save class respective to $a_cid and store corresponding class calls for future reference.
getParentReturn($a_gui_obj)
Get return script url.
getTargetScript()
Get target script name.
getModuleDir()
get directory of current module
verifyToken()
Verify Token.
addTab($a_lang_var, $a_link, $a_cmd, $a_class)
Add a tab to tabs array (.
removeLastCid($a_node)
Remove the class id that comes at the beginning the sequence.
setReturn($a_gui_obj, $a_cmd)
Set return command.
$calls
Stores which class calls which other class.
__construct()
control class constructor
getPathNew($a_source_node, $a_target_node)
Get path in call structure.
getNodeIdForTargetClass($a_par_node, $a_class, $a_check=false)
Searches a node for a given class ($a_class) "near" another node ($a_par_node).
checkCurrentPathForClass($gui_class)
Check if current path contains a certain gui class.
getCmdClass()
Determines class that should execute the current command.
appendRequestTokenParameterString($a_url, $xml_style=false)
Append request token as url parameter.
getNextClass($a_gui_class=null)
Get next class in the control path from the current class to the target command class.
getCallStructure($a_class)
Get call structure of class context.
getRequestToken()
Get request token.
getRedirectSource()
Get current redirect source.
searchReturnClass($a_class)
Determine current return class.
getClassForClasspath($a_class_path)
this method assumes that the class path has the format "dir/class.<class_name>.php"
readNodeInfo($a_node)
Save classes respective to the class id's of a node and store corresponding class calls for future re...
returnToParent($a_gui_obj, $a_anchor="")
Redirects to next parent class that used setReturn.
setContext($a_obj_id, $a_obj_type, $a_sub_obj_id=0, $a_sub_obj_type="")
Set context of current user interface.
getTabs()
Get tabs array (.
setReturnByClass($a_class, $a_cmd)
Set return command.
setTargetScript(string $a_target_script)
set target script name
readClassInfo($a_class)
Save class id respective to $a_class and store corresponding class calls for future reference.
getReturnClass($a_class)
Get return class.
getContextObjType()
Get context object type.
getCurrentCidOfNode($a_node)
Get cid of node.
callBaseClass()
Calls base class of current request.
classCidUnknown($a_class)
getLinkTargetByClass( $a_class, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=false)
Get link target for command using gui class name.
fetchCallsOfClassFromCache($a_class, ilCachedCtrl $a_cached_ctrl)
getUrlParameters($a_class, $a_str, $a_cmd="", $xml_style=false)
Get URL parameters for a class and append them to a string.
getParameterArrayByClass($a_class, $a_cmd="")
Get all set/save parameters using gui class name.
saveParameter($a_obj, $a_parameter)
Set parameters that should be passed in every form and link of a gui class.
getContextSubObjType()
Get context subobject type.
$call_hist
Stores the order in which different GUI classes were called.
isAsynch()
Is current command an asynchronous command?
setParameterByClass($a_class, $a_parameter, $a_value)
Same as setParameterByClass, except that a class name is passed.
clearParametersByClass($a_class)
Clears all parameters that have been set via setParameter for a GUI class.
insertCtrlCalls($a_parent, $a_child, $a_comp_prefix)
Insert ctrl calls record.
redirectByClass($a_class, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to other gui class using class name.
lookupClassPath($a_class_name)
Get class path that can be used in include statements for a given class name.
saveParameterByClass($a_class, $a_parameter)
Save parameter for a class.
getFormActionByClass( $a_class, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=false)
Get form action url for gui class name.
updateClassCidMap($a_class, $a_cid)
redirect($a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to another command.
getClassForCid($a_cid)
Get class for class id after fetching and storing corresponding information, if necessary.
forwardCommand($a_gui_object)
Forward flow of control to next gui class this invokes the executeCommand() method of the gui object ...
getLinkTarget( $a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=false)
Get link target for command using gui object.
setCmd($a_cmd)
Set the current command.
clearParameters($a_obj)
Clears all parameters that have been set via setParameter for a GUI class.
callOfClassNotKnown($a_class, $a_child)
checkTargetClass($a_class)
Check whether target is valid.
setParameter($a_obj, $a_parameter, $a_value)
Set parameters that should be passed a form and link of a gui class.
initBaseClass($a_base_class)
Initialises new base class.
getParameterArray($a_gui_obj, $a_cmd="")
Get all set/save parameters for a gui object.
@classDescription Date and time handling
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, )
static isSupportedObjectType($a_type)
static _lookupObjectId($a_ref_id)
lookup object id
static _lookupType($a_id, $a_reference=false)
lookup object type
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
static stripSlashesRecursive($a_data, $a_strip_html=true, $a_allow="")
Strip slashes from array and sub-arrays.
foreach($_POST as $key=> $value) $res