|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Chamilo\PluginBundle\H5pImport\Entity; |
|
4
|
|
|
|
|
5
|
|
|
use Chamilo\CoreBundle\Entity\Course; |
|
6
|
|
|
use Chamilo\CoreBundle\Entity\Session; |
|
7
|
|
|
use Chamilo\CourseBundle\Entity\CLpItemView; |
|
8
|
|
|
use Chamilo\UserBundle\Entity\User; |
|
9
|
|
|
use DateTime; |
|
10
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
11
|
|
|
use Gedmo\Mapping\Annotation as Gedmo; |
|
12
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* Class H5pImportResults. |
|
15
|
|
|
* |
|
16
|
|
|
* @ORM\Entity() |
|
17
|
|
|
* |
|
18
|
|
|
* @ORM\Table(name="plugin_h5p_import_results") |
|
19
|
|
|
*/ |
|
20
|
|
|
class H5pImportResults |
|
21
|
|
|
{ |
|
22
|
|
|
/** |
|
23
|
|
|
* @var int |
|
24
|
|
|
* |
|
25
|
|
|
* @ORM\Column(name="start_time", type="integer", nullable=false) |
|
26
|
|
|
*/ |
|
27
|
|
|
protected $startTime; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* @var int |
|
31
|
|
|
* |
|
32
|
|
|
* @ORM\Column(name="total_time", type="integer", nullable=false) |
|
33
|
|
|
*/ |
|
34
|
|
|
protected $totalTime; |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* @var int |
|
38
|
|
|
* |
|
39
|
|
|
* @ORM\Column(name="iid", type="integer") |
|
40
|
|
|
* |
|
41
|
|
|
* @ORM\Id |
|
42
|
|
|
* |
|
43
|
|
|
* @ORM\GeneratedValue |
|
44
|
|
|
*/ |
|
45
|
|
|
private $iid; |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* @var int |
|
49
|
|
|
* |
|
50
|
|
|
* @ORM\Column(name="score", type="integer") |
|
51
|
|
|
*/ |
|
52
|
|
|
private $score; |
|
53
|
|
|
|
|
54
|
|
|
/** |
|
55
|
|
|
* @var int |
|
56
|
|
|
* |
|
57
|
|
|
* @ORM\Column(name="max_score", type="integer") |
|
58
|
|
|
*/ |
|
59
|
|
|
private $maxScore; |
|
60
|
|
|
|
|
61
|
|
|
/** |
|
62
|
|
|
* @var Course |
|
63
|
|
|
* |
|
64
|
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course") |
|
65
|
|
|
* |
|
66
|
|
|
* @ORM\JoinColumn(name="c_id", referencedColumnName="id", nullable=false, onDelete="CASCADE") |
|
67
|
|
|
*/ |
|
68
|
|
|
private $course; |
|
69
|
|
|
|
|
70
|
|
|
/** |
|
71
|
|
|
* @var null|Session |
|
72
|
|
|
* |
|
73
|
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Session") |
|
74
|
|
|
* |
|
75
|
|
|
* @ORM\JoinColumn(name="session_id", referencedColumnName="id") |
|
76
|
|
|
*/ |
|
77
|
|
|
private $session; |
|
78
|
|
|
|
|
79
|
|
|
/** |
|
80
|
|
|
* @var H5pImport |
|
81
|
|
|
* |
|
82
|
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\H5pImport\Entity\H5pImport") |
|
83
|
|
|
* |
|
84
|
|
|
* @ORM\JoinColumn(name="plugin_h5p_import_id", referencedColumnName="iid", nullable=false, onDelete="CASCADE") |
|
85
|
|
|
*/ |
|
86
|
|
|
private $h5pImport; |
|
87
|
|
|
|
|
88
|
|
|
/** |
|
89
|
|
|
* @var User |
|
90
|
|
|
* |
|
91
|
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User") |
|
92
|
|
|
* |
|
93
|
|
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false, onDelete="CASCADE") |
|
94
|
|
|
*/ |
|
95
|
|
|
private $user; |
|
96
|
|
|
|
|
97
|
|
|
/** |
|
98
|
|
|
* @var CLpItemView |
|
99
|
|
|
* |
|
100
|
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CLpItemView") |
|
101
|
|
|
* |
|
102
|
|
|
* @ORM\JoinColumn(name="c_lp_item_view_id", referencedColumnName="iid", nullable=true, onDelete="CASCADE") |
|
103
|
|
|
*/ |
|
104
|
|
|
private $cLpItemView; |
|
105
|
|
|
|
|
106
|
|
|
/** |
|
107
|
|
|
* @var \DateTime |
|
108
|
|
|
* |
|
109
|
|
|
* @Gedmo\Timestampable(on="create") |
|
110
|
|
|
* |
|
111
|
|
|
* @ORM\Column(name="created_at", type="datetime", nullable=false) |
|
112
|
|
|
*/ |
|
113
|
|
|
private $createdAt; |
|
114
|
|
|
|
|
115
|
|
|
/** |
|
116
|
|
|
* @var \DateTime |
|
117
|
|
|
* |
|
118
|
|
|
* @Gedmo\Timestampable(on="update") |
|
119
|
|
|
* |
|
120
|
|
|
* @ORM\Column(name="modified_at", type="datetime", nullable=false) |
|
121
|
|
|
*/ |
|
122
|
|
|
private $modifiedAt; |
|
123
|
|
|
|
|
124
|
|
|
public function getIid(): int |
|
125
|
|
|
{ |
|
126
|
|
|
return $this->iid; |
|
127
|
|
|
} |
|
128
|
|
|
|
|
129
|
|
|
public function setIid(int $iid): H5pImportResults |
|
130
|
|
|
{ |
|
131
|
|
|
$this->iid = $iid; |
|
132
|
|
|
|
|
133
|
|
|
return $this; |
|
134
|
|
|
} |
|
135
|
|
|
|
|
136
|
|
|
public function getScore(): int |
|
137
|
|
|
{ |
|
138
|
|
|
return $this->score; |
|
139
|
|
|
} |
|
140
|
|
|
|
|
141
|
|
|
public function setScore(int $score): H5pImportResults |
|
142
|
|
|
{ |
|
143
|
|
|
$this->score = $score; |
|
144
|
|
|
|
|
145
|
|
|
return $this; |
|
146
|
|
|
} |
|
147
|
|
|
|
|
148
|
|
|
public function getMaxScore(): int |
|
149
|
|
|
{ |
|
150
|
|
|
return $this->maxScore; |
|
151
|
|
|
} |
|
152
|
|
|
|
|
153
|
|
|
public function setMaxScore(int $maxScore): H5pImportResults |
|
154
|
|
|
{ |
|
155
|
|
|
$this->maxScore = $maxScore; |
|
156
|
|
|
|
|
157
|
|
|
return $this; |
|
158
|
|
|
} |
|
159
|
|
|
|
|
160
|
|
|
public function getCourse(): Course |
|
161
|
|
|
{ |
|
162
|
|
|
return $this->course; |
|
163
|
|
|
} |
|
164
|
|
|
|
|
165
|
|
|
public function setCourse(Course $course): H5pImportResults |
|
166
|
|
|
{ |
|
167
|
|
|
$this->course = $course; |
|
168
|
|
|
|
|
169
|
|
|
return $this; |
|
170
|
|
|
} |
|
171
|
|
|
|
|
172
|
|
|
public function getSession(): ?Session |
|
173
|
|
|
{ |
|
174
|
|
|
return $this->session; |
|
175
|
|
|
} |
|
176
|
|
|
|
|
177
|
|
|
public function setSession(?Session $session): H5pImportResults |
|
178
|
|
|
{ |
|
179
|
|
|
$this->session = $session; |
|
180
|
|
|
|
|
181
|
|
|
return $this; |
|
182
|
|
|
} |
|
183
|
|
|
|
|
184
|
|
|
public function getH5pImport(): H5pImport |
|
185
|
|
|
{ |
|
186
|
|
|
return $this->h5pImport; |
|
187
|
|
|
} |
|
188
|
|
|
|
|
189
|
|
|
public function setH5pImport(H5pImport $h5pImport): H5pImportResults |
|
190
|
|
|
{ |
|
191
|
|
|
$this->h5pImport = $h5pImport; |
|
192
|
|
|
|
|
193
|
|
|
return $this; |
|
194
|
|
|
} |
|
195
|
|
|
|
|
196
|
|
|
public function getUser(): User |
|
197
|
|
|
{ |
|
198
|
|
|
return $this->user; |
|
199
|
|
|
} |
|
200
|
|
|
|
|
201
|
|
|
public function setUser(User $user): H5pImportResults |
|
202
|
|
|
{ |
|
203
|
|
|
$this->user = $user; |
|
204
|
|
|
|
|
205
|
|
|
return $this; |
|
206
|
|
|
} |
|
207
|
|
|
|
|
208
|
|
|
public function getCreatedAt(): \DateTime |
|
209
|
|
|
{ |
|
210
|
|
|
return $this->createdAt; |
|
211
|
|
|
} |
|
212
|
|
|
|
|
213
|
|
|
public function getCLpItemView(): CLpItemView |
|
214
|
|
|
{ |
|
215
|
|
|
return $this->cLpItemView; |
|
216
|
|
|
} |
|
217
|
|
|
|
|
218
|
|
|
public function setCLpItemView(CLpItemView $cLpItemView): H5pImportResults |
|
219
|
|
|
{ |
|
220
|
|
|
$this->cLpItemView = $cLpItemView; |
|
221
|
|
|
|
|
222
|
|
|
return $this; |
|
223
|
|
|
} |
|
224
|
|
|
|
|
225
|
|
|
public function getStartTime(): int |
|
226
|
|
|
{ |
|
227
|
|
|
return $this->startTime; |
|
228
|
|
|
} |
|
229
|
|
|
|
|
230
|
|
|
public function setStartTime(int $startTime): H5pImportResults |
|
231
|
|
|
{ |
|
232
|
|
|
$this->startTime = $startTime; |
|
233
|
|
|
|
|
234
|
|
|
return $this; |
|
235
|
|
|
} |
|
236
|
|
|
|
|
237
|
|
|
public function getTotalTime(): int |
|
238
|
|
|
{ |
|
239
|
|
|
return $this->totalTime; |
|
240
|
|
|
} |
|
241
|
|
|
|
|
242
|
|
|
public function setTotalTime(int $totalTime): H5pImportResults |
|
243
|
|
|
{ |
|
244
|
|
|
$this->totalTime = $totalTime; |
|
245
|
|
|
|
|
246
|
|
|
return $this; |
|
247
|
|
|
} |
|
248
|
|
|
|
|
249
|
|
|
public function setCreatedAt(\DateTime $createdAt): H5pImportResults |
|
250
|
|
|
{ |
|
251
|
|
|
$this->createdAt = $createdAt; |
|
252
|
|
|
|
|
253
|
|
|
return $this; |
|
254
|
|
|
} |
|
255
|
|
|
|
|
256
|
|
|
public function getModifiedAt(): \DateTime |
|
257
|
|
|
{ |
|
258
|
|
|
return $this->modifiedAt; |
|
259
|
|
|
} |
|
260
|
|
|
|
|
261
|
|
|
public function setModifiedAt(\DateTime $modifiedAt): H5pImportResults |
|
262
|
|
|
{ |
|
263
|
|
|
$this->modifiedAt = $modifiedAt; |
|
264
|
|
|
|
|
265
|
|
|
return $this; |
|
266
|
|
|
} |
|
267
|
|
|
} |
|
268
|
|
|
|