1<?php 2 3/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */ 4 5/** 6 * Class ilMyTestResultsGUI 7 * 8 * @author Björn Heyser <info@bjoernheyser.de> 9 * @version $Id$ 10 * 11 * @package Modules/Test 12 * 13 * @ilCtrl_Calls ilMyTestResultsGUI: ilTestEvaluationGUI 14 * @ilCtrl_Calls ilMyTestResultsGUI: ilAssQuestionPageGUI 15 * @ilCtrl_Calls ilMyTestResultsGUI: ilAssSpecFeedbackPageGUI 16 * @ilCtrl_Calls ilMyTestResultsGUI: ilAssGenFeedbackPageGUI 17 */ 18class ilMyTestResultsGUI 19{ 20 /** 21 * command constants 22 */ 23 const EVALGUI_CMD_SHOW_PASS_OVERVIEW = 'outUserResultsOverview'; 24 25 /** 26 * @var ilObjTest 27 */ 28 protected $testObj; 29 30 /** 31 * @var ilTestAccess 32 */ 33 protected $testAccess; 34 35 /** 36 * @var ilTestSession 37 */ 38 protected $testSession; 39 40 /** 41 * @var ilTestObjectiveOrientedContainer 42 */ 43 protected $objectiveParent; 44 45 /** 46 * @return ilObjTest 47 */ 48 public function getTestObj() 49 { 50 return $this->testObj; 51 } 52 53 /** 54 * @param ilObjTest $testObj 55 */ 56 public function setTestObj($testObj) 57 { 58 $this->testObj = $testObj; 59 } 60 61 /** 62 * @return ilTestAccess 63 */ 64 public function getTestAccess() 65 { 66 return $this->testAccess; 67 } 68 69 /** 70 * @param ilTestAccess $testAccess 71 */ 72 public function setTestAccess($testAccess) 73 { 74 $this->testAccess = $testAccess; 75 } 76 77 /** 78 * @return ilTestSession 79 */ 80 public function getTestSession() 81 { 82 return $this->testSession; 83 } 84 85 /** 86 * @param ilTestSession $testSession 87 */ 88 public function setTestSession($testSession) 89 { 90 $this->testSession = $testSession; 91 } 92 93 /** 94 * @return ilTestObjectiveOrientedContainer 95 */ 96 public function getObjectiveParent() 97 { 98 return $this->objectiveParent; 99 } 100 101 /** 102 * @param ilTestObjectiveOrientedContainer $objectiveParent 103 */ 104 public function setObjectiveParent($objectiveParent) 105 { 106 $this->objectiveParent = $objectiveParent; 107 } 108 109 /** 110 * Execute Command 111 */ 112 public function executeCommand() 113 { 114 global $DIC; /* @var ILIAS\DI\Container $DIC */ 115 116 if (!$DIC->ctrl()->getCmd()) { 117 $DIC->ctrl()->setCmd(self::EVALGUI_CMD_SHOW_PASS_OVERVIEW); 118 } 119 120 switch ($DIC->ctrl()->getNextClass()) { 121 case "iltestevaluationgui": 122 require_once 'Modules/Test/classes/class.ilTestEvaluationGUI.php'; 123 $gui = new ilTestEvaluationGUI($this->getTestObj()); 124 $gui->setObjectiveOrientedContainer($this->getObjectiveParent()); 125 $gui->setTestAccess($this->getTestAccess()); 126 $DIC->ctrl()->forwardCommand($gui); 127 break; 128 129 case 'ilassquestionpagegui': 130 require_once 'Modules/Test/classes/class.ilAssQuestionPageCommandForwarder.php'; 131 $forwarder = new ilAssQuestionPageCommandForwarder(); 132 $forwarder->setTestObj($this->getTestObj()); 133 $forwarder->forward(); 134 break; 135 } 136 } 137} 138