1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
5include_once('./Services/Table/classes/class.ilTable2GUI.php');
6
7/**
8*
9* @author Helmut Schottmüller <ilias@aurealis.de>
10* @version $Id$
11*
12* @ingroup ModulesTest
13*/
14
15class ilTestAggregatedResultsTableGUI extends ilTable2GUI
16{
17    /**
18     * Constructor
19     *
20     * @access public
21     * @param
22     * @return
23     */
24    public function __construct($a_parent_obj, $a_parent_cmd)
25    {
26        parent::__construct($a_parent_obj, $a_parent_cmd);
27
28        global $DIC;
29        $lng = $DIC['lng'];
30        $ilCtrl = $DIC['ilCtrl'];
31
32        $this->lng = $lng;
33        $this->ctrl = $ilCtrl;
34
35        $this->setFormName('aggregated');
36        $this->setTitle($this->lng->txt('tst_results_aggregated'));
37        $this->setStyle('table', 'fullwidth');
38        $this->addColumn($this->lng->txt("result"), 'result', '');
39        $this->addColumn($this->lng->txt("value"), 'value', '');
40
41        $this->setRowTemplate("tpl.il_as_tst_aggregated_results_row.html", "Modules/Test");
42
43        $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
44
45        $this->disable('sort');
46        $this->enable('header');
47        $this->disable('select_all');
48    }
49
50    /**
51     * fill row
52     *
53     * @access public
54     * @param
55     * @return
56     */
57    public function fillRow($data)
58    {
59        $this->tpl->setVariable("RESULT", $data["result"]);
60        $this->tpl->setVariable("VALUE", $data["value"]);
61    }
62}
63