ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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 
14 {
18  protected $ctrl;
19 
23  protected $lng;
24 
28  protected $access;
29 
33  protected $tpl;
34 
38  protected $nav_history;
39 
40  public function __construct()
41  {
42  global $DIC;
43 
44  $this->lng = $DIC->language();
45  $this->access = $DIC->access();
46  $this->tpl = $DIC["tpl"];
47  $this->nav_history = $DIC["ilNavigationHistory"];
48  $ilCtrl = $DIC->ctrl();
49 
50  // initialisation stuff
51  $this->ctrl = $ilCtrl;
52 
53  //$ilNavigationHistory->addItem($_GET["ref_id"],
54  // "ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=".$_GET["ref_id"]);
55  }
56 
60  public function executeCommand()
61  {
62  $lng = $this->lng;
63  $ilAccess = $this->access;
64  $tpl = $this->tpl;
65  $ilNavigationHistory = $this->nav_history;
66 
67  $cmd = $this->ctrl->getCmd();
68  $next_class = $this->ctrl->getNextClass($this);
69  if ($next_class == "") {
70  $this->ctrl->setCmdClass("ilobjexercisegui");
71  $next_class = $this->ctrl->getNextClass($this);
72  }
73 
74  // add entry to navigation history
75  if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
76  $ilNavigationHistory->addItem(
77  $_GET["ref_id"],
78  "ilias.php?baseClass=ilExerciseHandlerGUI&cmd=showOverview&ref_id=" . $_GET["ref_id"],
79  "exc"
80  );
81  }
82 
83  switch ($next_class) {
84  case 'ilobjexercisegui':
85  $ex_gui = new ilObjExerciseGUI("", (int) $_GET["ref_id"], true, false);
86  $this->ctrl->forwardCommand($ex_gui);
87  break;
88  }
89 
90  $tpl->printToStdout();
91  }
92 }
$_GET["client_id"]
Class ilObjExerciseGUI.
Handles user interface for exercises.
global $DIC
Definition: goto.php:24