Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 7
CRAP
0.00% covered (danger)
0.00%
0 / 1
ResponseProcessing
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 7
56
0.00% covered (danger)
0.00%
0 / 1
 create
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 takeoverFrom
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getForm
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 takeNoticeOfAddedInteraction
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 takeNoticeOfRemovedInteraction
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getUsedAttributes
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 toFilteredArray
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3/*
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; under version 2
7 * of the License (non-upgradable).
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 *
18 * Copyright (c) 2013 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
19 *
20 *
21 */
22
23namespace oat\taoQtiItem\model\qti\response;
24
25use oat\taoQtiItem\model\qti\response\ResponseProcessing;
26use oat\taoQtiItem\model\qti\Element;
27use oat\taoQtiItem\model\qti\Item;
28use oat\taoQtiItem\model\qti\response\TakeoverFailedException;
29use oat\taoQtiItem\model\qti\ResponseDeclaration;
30use oat\taoQtiItem\model\qti\interaction\Interaction;
31use oat\taoQtiItem\model\qti\ContentVariable;
32use common_Exception;
33
34/**
35 * Short description of class
36 *
37 * @abstract
38 * @access public
39 * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu>
40 * @package taoQTI
41
42 */
43abstract class ResponseProcessing extends Element implements ContentVariable
44{
45    protected static $qtiTagName = 'responseProcessing';
46
47    /**
48     * Short description of method create
49     *
50     * @access public
51     * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu>
52     * @param  Item item
53     * @return oat\taoQtiItem\model\qti\response\ResponseProcessing
54     */
55    public static function create(Item $item)
56    {
57
58        throw new common_Exception('create not implemented for ' . get_called_class());
59
60        return $returnValue;
61    }
62
63    /**
64     * Short description of method takeoverFrom
65     *
66     * @access public
67     * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu>
68     * @param  ResponseProcessing responseProcessing
69     * @param  Item item
70     * @return oat\taoQtiItem\controller\QTIform\ResponseProcessing
71     */
72    public static function takeoverFrom(ResponseProcessing $responseProcessing, Item $item)
73    {
74
75        throw new TakeoverFailedException('takeoverFrom not implemented for ' . get_called_class());
76
77        return $returnValue;
78    }
79
80    /**
81     * Short description of method getForm
82     *
83     * @access public
84     * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu>
85     * @param  Response response
86     * @return tao_helpers_form_Form
87     */
88    public function getForm(ResponseDeclaration $response)
89    {
90        return null;
91    }
92
93    /**
94     * Short description of method takeNoticeOfAddedInteraction
95     *
96     * @access public
97     * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu>
98     * @param  Interaction interaction
99     * @param  Item item
100     * @return mixed
101     */
102    public function takeNoticeOfAddedInteraction(Interaction $interaction, Item $item)
103    {
104    }
105
106    /**
107     * Short description of method takeNoticeOfRemovedInteraction
108     *
109     * @access public
110     * @author Jerome Bogaerts, <jerome.bogaerts@tudor.lu>
111     * @param  Interaction interaction
112     * @param  Item item
113     * @return mixed
114     */
115    public function takeNoticeOfRemovedInteraction(Interaction $interaction, Item $item)
116    {
117    }
118
119    /**
120     *
121     * @return array
122     */
123    protected function getUsedAttributes()
124    {
125        //currently not used
126        return [];
127    }
128
129    public function toFilteredArray()
130    {
131        return $this->toArray(true);
132    }
133}