1<?php 2/* (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */ 3 4/** 5 * test result overview 6 * 7 * @author Stefan Meyer <smeyer.ilias@gmx.de> 8 * @version $Id$ 9 * @ilCtrl_isCalledBy ilLOMemberTestResultGUI: ilObjCourseGUI 10 */ 11class ilLOMemberTestResultGUI 12{ 13 private $container = null; 14 private $container_gui = null; 15 private $user_id = 0; 16 17 /** 18 * Constructor 19 * @param ilObjectGUI $parent_gui 20 * @param ilObject $parent 21 */ 22 public function __construct(ilObjectGUI $parent_gui, ilObject $parent, $a_user_id) 23 { 24 $this->container_gui = $parent_gui; 25 $this->container = $parent; 26 $this->user_id = $a_user_id; 27 } 28 29 /** 30 * Execute command 31 * @global type $ilCtrl 32 * @return boolean 33 */ 34 public function executeCommand() 35 { 36 global $DIC; 37 38 $ilCtrl = $DIC['ilCtrl']; 39 40 $next_class = $ilCtrl->getNextClass($this); 41 $cmd = $ilCtrl->getCmd(); 42 43 switch ($next_class) { 44 45 default: 46 if (!$cmd) { 47 $cmd = 'viewResult'; 48 } 49 $this->$cmd(); 50 51 break; 52 } 53 return true; 54 } 55 56 /** 57 * Get container 58 * @return ilObject 59 */ 60 public function getParentObject() 61 { 62 return $this->container; 63 } 64 65 /** 66 * Get parent gui 67 * @return ilObjectGUI 68 */ 69 public function getParentGUI() 70 { 71 return $this->container_gui; 72 } 73 74 75 /** 76 * Get current user id 77 * @return type 78 */ 79 public function getUserId() 80 { 81 return $this->user_id; 82 } 83 84 /** 85 * View results 86 */ 87 protected function viewResult() 88 { 89 include_once './Modules/Course/classes/Objectives/class.ilLOMemberTestResultTableGUI.php'; 90 $result_table = new ilLOMemberTestResultTableGUI($this, $this->getParentObject(), 'viewResult'); 91 $result_table->setUserId($this->getUserId()); 92 $result_table->init(); 93 $result_table->parse(); 94 95 $GLOBALS['DIC']['tpl']->setContent($result_table->getHTML()); 96 } 97 98 /** 99 * Set tabs 100 */ 101 protected function setTabs() 102 { 103 } 104} 105