Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
63.64% |
7 / 11 |
|
50.00% |
3 / 6 |
CRAP | |
0.00% |
0 / 1 |
| taoResultServer_models_classes_TraceVariable | |
63.64% |
7 / 11 |
|
50.00% |
3 / 6 |
7.73 | |
0.00% |
0 / 1 |
| setTrace | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getTrace | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getValue | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setValue | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| jsonSerialize | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |||
| getType | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; under version 2 |
| 9 | * of the License (non-upgradable). |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 19 | * |
| 20 | * Copyright (c) 2013 (original work) Open Assessment Technologies S.A. |
| 21 | * |
| 22 | * @author "Patrick Plichart, <patrick@taotesting.com>" |
| 23 | * |
| 24 | * An Assessment Result is used to report the results of a candidate's interaction |
| 25 | * with a test and/or one or more items attempted. |
| 26 | * Information about the test is optional, |
| 27 | * in some systems it may be possible to interact with items that are not organized into a test at all. For example, |
| 28 | * items that are organized with learning resources and presented individually in a formative context. |
| 29 | */ |
| 30 | class taoResultServer_models_classes_TraceVariable extends taoResultServer_models_classes_Variable |
| 31 | { |
| 32 | public const TYPE = 'traceVariable'; |
| 33 | |
| 34 | /** |
| 35 | * When a response variable is bound to an interaction that supports the shuffling of choices, the sequence of |
| 36 | * choices experienced by the candidate will vary between test instances. When shuffling is in effect, the sequence |
| 37 | * of choices should be reported as a sequence of choice identifiers using this attribute. |
| 38 | * |
| 39 | * @var string|null |
| 40 | */ |
| 41 | protected $trace; |
| 42 | |
| 43 | public function setTrace(string $trace): self |
| 44 | { |
| 45 | $this->trace = $trace; |
| 46 | |
| 47 | return $this; |
| 48 | } |
| 49 | |
| 50 | public function getTrace(): ?string |
| 51 | { |
| 52 | return $this->trace; |
| 53 | } |
| 54 | |
| 55 | public function getValue() |
| 56 | { |
| 57 | return $this->getTrace(); |
| 58 | } |
| 59 | |
| 60 | public function setValue($value): self |
| 61 | { |
| 62 | $this->setTrace($value); |
| 63 | |
| 64 | return $this; |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * {@inheritdoc} |
| 69 | */ |
| 70 | public function jsonSerialize() |
| 71 | { |
| 72 | return parent::jsonSerialize() + |
| 73 | [ |
| 74 | 'trace' => $this->trace, |
| 75 | ]; |
| 76 | } |
| 77 | |
| 78 | protected function getType(): string |
| 79 | { |
| 80 | return self::TYPE; |
| 81 | } |
| 82 | } |