ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilExerciseHandlerGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
15{
19 protected $ctrl;
20
24 protected $lng;
25
29 protected $access;
30
34 protected $tpl;
35
39 protected $nav_history;
40
41 public function __construct()
42 {
43 global $DIC;
44
45 $this->lng = $DIC->language();
46 $this->access = $DIC->access();
47 $this->tpl = $DIC["tpl"];
48 $this->nav_history = $DIC["ilNavigationHistory"];
49 $ilCtrl = $DIC->ctrl();
50
51 // initialisation stuff
52 $this->ctrl = $ilCtrl;
53
54 //$ilNavigationHistory->addItem($_GET["ref_id"],
55 // "ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$_GET["ref_id"]);
56 }
57
61 public function executeCommand()
62 {
64 $ilAccess = $this->access;
66 $ilNavigationHistory = $this->nav_history;
67
68 $cmd = $this->ctrl->getCmd();
69 $next_class = $this->ctrl->getNextClass($this);
70 if ($next_class == "") {
71 $this->ctrl->setCmdClass("ilobjexercisegui");
72 $next_class = $this->ctrl->getNextClass($this);
73 }
74
75 // add entry to navigation history
76 if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
77 $ilNavigationHistory->addItem(
78 $_GET["ref_id"],
79 "ilias.php?baseClass=ilExerciseHandlerGUI&cmd=showOverview&ref_id=" . $_GET["ref_id"],
80 "exc"
81 );
82 }
83
84 switch ($next_class) {
85 case 'ilobjexercisegui':
86 require_once "./Modules/Exercise/classes/class.ilObjExerciseGUI.php";
87 $ex_gui = new ilObjExerciseGUI("", (int) $_GET["ref_id"], true, false);
88 $this->ctrl->forwardCommand($ex_gui);
89 break;
90 }
91
92 $tpl->show();
93 }
94}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
Handles user interface for exercises.
Class ilObjExerciseGUI.
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7