|
1
|
|
|
<?php |
|
2
|
|
|
/* For licensing terms, see /license.txt */ |
|
3
|
|
|
|
|
4
|
|
|
namespace Chamilo\PluginBundle\LtiProvider\Entity; |
|
5
|
|
|
|
|
6
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
7
|
|
|
|
|
8
|
|
|
#[ORM\Table(name: 'plugin_lti_provider_result')] |
|
9
|
|
|
#[ORM\Entity] |
|
10
|
|
|
class Result |
|
11
|
|
|
{ |
|
12
|
|
|
#[ORM\Column(name: 'id', type: 'integer')] |
|
13
|
|
|
#[ORM\Id] |
|
14
|
|
|
#[ORM\GeneratedValue] |
|
15
|
|
|
protected ?int $id; |
|
16
|
|
|
|
|
17
|
|
|
#[ORM\Column(name: 'issuer', type: 'text')] |
|
18
|
|
|
protected string $issuer; |
|
19
|
|
|
|
|
20
|
|
|
#[ORM\Column(name: 'user_id', type: 'integer')] |
|
21
|
|
|
protected int $userId; |
|
22
|
|
|
|
|
23
|
|
|
#[ORM\Column(name: 'client_uid', type: 'text')] |
|
24
|
|
|
protected string $clientUId; |
|
25
|
|
|
|
|
26
|
|
|
#[ORM\Column(name: 'course_code', type: 'text', length: 40, nullable: true)] |
|
27
|
|
|
protected string $courseCode; |
|
28
|
|
|
|
|
29
|
|
|
#[ORM\Column(name: 'tool_id', type: 'integer')] |
|
30
|
|
|
protected int $toolId; |
|
31
|
|
|
|
|
32
|
|
|
#[ORM\Column(name: 'tool_name', type: 'string')] |
|
33
|
|
|
protected string $toolName; |
|
34
|
|
|
|
|
35
|
|
|
#[ORM\Column(name: 'score', type: 'float', precision: 6, scale: 2)] |
|
36
|
|
|
protected float $score; |
|
37
|
|
|
|
|
38
|
|
|
#[ORM\Column(name: 'progress', type: 'integer')] |
|
39
|
|
|
protected int $progress; |
|
40
|
|
|
|
|
41
|
|
|
#[ORM\Column(name: 'duration', type: 'integer')] |
|
42
|
|
|
protected int $duration; |
|
43
|
|
|
|
|
44
|
|
|
#[ORM\Column(name: 'start_date', type: 'datetime')] |
|
45
|
|
|
protected \DateTime $startDate; |
|
46
|
|
|
|
|
47
|
|
|
#[ORM\Column(name: 'user_ip', type: 'string')] |
|
48
|
|
|
protected string $userIp; |
|
49
|
|
|
|
|
50
|
|
|
#[ORM\Column(name: 'lti_launch_id', type: 'string')] |
|
51
|
|
|
protected string $ltiLaunchId; |
|
52
|
|
|
|
|
53
|
|
|
public function getId(): ?int |
|
54
|
|
|
{ |
|
55
|
|
|
return $this->id; |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
public function setId(int $id): static |
|
59
|
|
|
{ |
|
60
|
|
|
$this->id = $id; |
|
61
|
|
|
|
|
62
|
|
|
return $this; |
|
63
|
|
|
} |
|
64
|
|
|
|
|
65
|
|
|
public function getIssuer(): string |
|
66
|
|
|
{ |
|
67
|
|
|
return $this->issuer; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
public function setIssuer(string $issuer): static |
|
71
|
|
|
{ |
|
72
|
|
|
$this->issuer = $issuer; |
|
73
|
|
|
|
|
74
|
|
|
return $this; |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
public function getUserId(): int |
|
78
|
|
|
{ |
|
79
|
|
|
return $this->userId; |
|
80
|
|
|
} |
|
81
|
|
|
|
|
82
|
|
|
public function setUserId(int $userId): static |
|
83
|
|
|
{ |
|
84
|
|
|
$this->userId = $userId; |
|
85
|
|
|
|
|
86
|
|
|
return $this; |
|
87
|
|
|
} |
|
88
|
|
|
|
|
89
|
|
|
public function getClientUId(): string |
|
90
|
|
|
{ |
|
91
|
|
|
return $this->clientUId; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
public function setClientUId(string $clientUId): static |
|
95
|
|
|
{ |
|
96
|
|
|
$this->clientUId = $clientUId; |
|
97
|
|
|
|
|
98
|
|
|
return $this; |
|
99
|
|
|
} |
|
100
|
|
|
|
|
101
|
|
|
public function getCourseCode(): string |
|
102
|
|
|
{ |
|
103
|
|
|
return $this->courseCode; |
|
104
|
|
|
} |
|
105
|
|
|
|
|
106
|
|
|
public function setCourseCode(string $courseCode): static |
|
107
|
|
|
{ |
|
108
|
|
|
$this->courseCode = $courseCode; |
|
109
|
|
|
|
|
110
|
|
|
return $this; |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
public function getToolId(): int |
|
114
|
|
|
{ |
|
115
|
|
|
return $this->toolId; |
|
116
|
|
|
} |
|
117
|
|
|
|
|
118
|
|
|
public function setToolId(int $toolId): static |
|
119
|
|
|
{ |
|
120
|
|
|
$this->toolId = $toolId; |
|
121
|
|
|
|
|
122
|
|
|
return $this; |
|
123
|
|
|
} |
|
124
|
|
|
|
|
125
|
|
|
public function getToolName(): string |
|
126
|
|
|
{ |
|
127
|
|
|
return $this->toolName; |
|
128
|
|
|
} |
|
129
|
|
|
|
|
130
|
|
|
public function setToolName(string $toolName): static |
|
131
|
|
|
{ |
|
132
|
|
|
$this->toolName = $toolName; |
|
133
|
|
|
|
|
134
|
|
|
return $this; |
|
135
|
|
|
} |
|
136
|
|
|
|
|
137
|
|
|
public function getScore(): float |
|
138
|
|
|
{ |
|
139
|
|
|
return $this->score; |
|
140
|
|
|
} |
|
141
|
|
|
|
|
142
|
|
|
public function setScore(float $score): static |
|
143
|
|
|
{ |
|
144
|
|
|
$this->score = $score; |
|
145
|
|
|
|
|
146
|
|
|
return $this; |
|
147
|
|
|
} |
|
148
|
|
|
|
|
149
|
|
|
public function getProgress(): int |
|
150
|
|
|
{ |
|
151
|
|
|
return $this->progress; |
|
152
|
|
|
} |
|
153
|
|
|
|
|
154
|
|
|
public function setProgress(int $progress): static |
|
155
|
|
|
{ |
|
156
|
|
|
$this->progress = $progress; |
|
157
|
|
|
|
|
158
|
|
|
return $this; |
|
159
|
|
|
} |
|
160
|
|
|
|
|
161
|
|
|
public function getDuration(): int |
|
162
|
|
|
{ |
|
163
|
|
|
return $this->duration; |
|
164
|
|
|
} |
|
165
|
|
|
|
|
166
|
|
|
public function setDuration(int $duration): static |
|
167
|
|
|
{ |
|
168
|
|
|
$this->duration = $duration; |
|
169
|
|
|
|
|
170
|
|
|
return $this; |
|
171
|
|
|
} |
|
172
|
|
|
|
|
173
|
|
|
public function getStartDate(): \DateTime |
|
174
|
|
|
{ |
|
175
|
|
|
return $this->startDate; |
|
176
|
|
|
} |
|
177
|
|
|
|
|
178
|
|
|
public function setStartDate(\DateTime $startDate): static |
|
179
|
|
|
{ |
|
180
|
|
|
$this->startDate = $startDate; |
|
181
|
|
|
|
|
182
|
|
|
return $this; |
|
183
|
|
|
} |
|
184
|
|
|
|
|
185
|
|
|
public function getUserIp(): string |
|
186
|
|
|
{ |
|
187
|
|
|
return $this->userIp; |
|
188
|
|
|
} |
|
189
|
|
|
|
|
190
|
|
|
public function setUserIp(string $userIp): static |
|
191
|
|
|
{ |
|
192
|
|
|
$this->userIp = $userIp; |
|
193
|
|
|
|
|
194
|
|
|
return $this; |
|
195
|
|
|
} |
|
196
|
|
|
|
|
197
|
|
|
public function getLtiLaunchId(): string |
|
198
|
|
|
{ |
|
199
|
|
|
return $this->ltiLaunchId; |
|
200
|
|
|
} |
|
201
|
|
|
|
|
202
|
|
|
public function setLtiLaunchId(string $ltiLaunchId): static |
|
203
|
|
|
{ |
|
204
|
|
|
$this->ltiLaunchId = $ltiLaunchId; |
|
205
|
|
|
|
|
206
|
|
|
return $this; |
|
207
|
|
|
} |
|
208
|
|
|
} |
|
209
|
|
|
|