|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* For licensing terms, see /license.txt */ |
|
4
|
|
|
|
|
5
|
|
|
declare(strict_types=1); |
|
6
|
|
|
|
|
7
|
|
|
namespace Chamilo\CoreBundle\Entity; |
|
8
|
|
|
|
|
9
|
|
|
use Chamilo\CoreBundle\Repository\XApiResultRepository; |
|
10
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
11
|
|
|
|
|
12
|
|
|
#[ORM\Entity(repositoryClass: XApiResultRepository::class)] |
|
13
|
|
|
class XApiResult |
|
14
|
|
|
{ |
|
15
|
|
|
#[ORM\Id] |
|
16
|
|
|
#[ORM\GeneratedValue] |
|
17
|
|
|
#[ORM\Column] |
|
18
|
|
|
private ?int $identifier = null; |
|
19
|
|
|
|
|
20
|
|
|
#[ORM\Column] |
|
21
|
|
|
private ?bool $hasScore = null; |
|
22
|
|
|
|
|
23
|
|
|
#[ORM\Column(nullable: true)] |
|
24
|
|
|
private ?float $scaled = null; |
|
25
|
|
|
|
|
26
|
|
|
#[ORM\Column(nullable: true)] |
|
27
|
|
|
private ?float $raw = null; |
|
28
|
|
|
|
|
29
|
|
|
#[ORM\Column(nullable: true)] |
|
30
|
|
|
private ?float $min = null; |
|
31
|
|
|
|
|
32
|
|
|
#[ORM\Column(nullable: true)] |
|
33
|
|
|
private ?float $max = null; |
|
34
|
|
|
|
|
35
|
|
|
#[ORM\Column(nullable: true)] |
|
36
|
|
|
private ?bool $success = null; |
|
37
|
|
|
|
|
38
|
|
|
#[ORM\Column(nullable: true)] |
|
39
|
|
|
private ?bool $completion = null; |
|
40
|
|
|
|
|
41
|
|
|
#[ORM\Column(length: 255, nullable: true)] |
|
42
|
|
|
private ?string $response = null; |
|
43
|
|
|
|
|
44
|
|
|
#[ORM\Column(length: 255, nullable: true)] |
|
45
|
|
|
private ?string $duration = null; |
|
46
|
|
|
|
|
47
|
|
|
#[ORM\OneToOne(cascade: ['persist', 'remove'])] |
|
48
|
|
|
#[ORM\JoinColumn(referencedColumnName: 'identifier')] |
|
49
|
|
|
private ?XApiExtensions $extensions = null; |
|
50
|
|
|
|
|
51
|
|
|
public function getIdentifier(): ?int |
|
52
|
|
|
{ |
|
53
|
|
|
return $this->identifier; |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
public function hasScore(): ?bool |
|
57
|
|
|
{ |
|
58
|
|
|
return $this->hasScore; |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
public function setHasScore(bool $hasScore): static |
|
62
|
|
|
{ |
|
63
|
|
|
$this->hasScore = $hasScore; |
|
64
|
|
|
|
|
65
|
|
|
return $this; |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
public function getScaled(): ?float |
|
69
|
|
|
{ |
|
70
|
|
|
return $this->scaled; |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
public function setScaled(?float $scaled): static |
|
74
|
|
|
{ |
|
75
|
|
|
$this->scaled = $scaled; |
|
76
|
|
|
|
|
77
|
|
|
return $this; |
|
78
|
|
|
} |
|
79
|
|
|
|
|
80
|
|
|
public function getRaw(): ?float |
|
81
|
|
|
{ |
|
82
|
|
|
return $this->raw; |
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
public function setRaw(?float $raw): static |
|
86
|
|
|
{ |
|
87
|
|
|
$this->raw = $raw; |
|
88
|
|
|
|
|
89
|
|
|
return $this; |
|
90
|
|
|
} |
|
91
|
|
|
|
|
92
|
|
|
public function getMin(): ?float |
|
93
|
|
|
{ |
|
94
|
|
|
return $this->min; |
|
95
|
|
|
} |
|
96
|
|
|
|
|
97
|
|
|
public function setMin(?float $min): static |
|
98
|
|
|
{ |
|
99
|
|
|
$this->min = $min; |
|
100
|
|
|
|
|
101
|
|
|
return $this; |
|
102
|
|
|
} |
|
103
|
|
|
|
|
104
|
|
|
public function getMax(): ?float |
|
105
|
|
|
{ |
|
106
|
|
|
return $this->max; |
|
107
|
|
|
} |
|
108
|
|
|
|
|
109
|
|
|
public function setMax(?float $max): static |
|
110
|
|
|
{ |
|
111
|
|
|
$this->max = $max; |
|
112
|
|
|
|
|
113
|
|
|
return $this; |
|
114
|
|
|
} |
|
115
|
|
|
|
|
116
|
|
|
public function isSuccess(): ?bool |
|
117
|
|
|
{ |
|
118
|
|
|
return $this->success; |
|
119
|
|
|
} |
|
120
|
|
|
|
|
121
|
|
|
public function setSuccess(?bool $success): static |
|
122
|
|
|
{ |
|
123
|
|
|
$this->success = $success; |
|
124
|
|
|
|
|
125
|
|
|
return $this; |
|
126
|
|
|
} |
|
127
|
|
|
|
|
128
|
|
|
public function isCompletion(): ?bool |
|
129
|
|
|
{ |
|
130
|
|
|
return $this->completion; |
|
131
|
|
|
} |
|
132
|
|
|
|
|
133
|
|
|
public function setCompletion(?bool $completion): static |
|
134
|
|
|
{ |
|
135
|
|
|
$this->completion = $completion; |
|
136
|
|
|
|
|
137
|
|
|
return $this; |
|
138
|
|
|
} |
|
139
|
|
|
|
|
140
|
|
|
public function getResponse(): ?string |
|
141
|
|
|
{ |
|
142
|
|
|
return $this->response; |
|
143
|
|
|
} |
|
144
|
|
|
|
|
145
|
|
|
public function setResponse(?string $response): static |
|
146
|
|
|
{ |
|
147
|
|
|
$this->response = $response; |
|
148
|
|
|
|
|
149
|
|
|
return $this; |
|
150
|
|
|
} |
|
151
|
|
|
|
|
152
|
|
|
public function getDuration(): ?string |
|
153
|
|
|
{ |
|
154
|
|
|
return $this->duration; |
|
155
|
|
|
} |
|
156
|
|
|
|
|
157
|
|
|
public function setDuration(?string $duration): static |
|
158
|
|
|
{ |
|
159
|
|
|
$this->duration = $duration; |
|
160
|
|
|
|
|
161
|
|
|
return $this; |
|
162
|
|
|
} |
|
163
|
|
|
|
|
164
|
|
|
public function getExtensions(): ?XApiExtensions |
|
165
|
|
|
{ |
|
166
|
|
|
return $this->extensions; |
|
167
|
|
|
} |
|
168
|
|
|
|
|
169
|
|
|
public function setExtensions(?XApiExtensions $extensions): static |
|
170
|
|
|
{ |
|
171
|
|
|
$this->extensions = $extensions; |
|
172
|
|
|
|
|
173
|
|
|
return $this; |
|
174
|
|
|
} |
|
175
|
|
|
} |
|
176
|
|
|
|