Completed
Push — master ( c9546d...95f607 )
by Julito
09:41
created

TrackEExerciseConfirmation::setUpdatedAt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CoreBundle\Entity;
6
7
use Chamilo\CoreBundle\Traits\UserTrait;
8
use Doctrine\ORM\Mapping as ORM;
9
10
/**
11
 * Class TrackEExerciseConfirmation.
12
 *
13
 * @ORM\Table(name="track_e_exercise_confirmation")
14
 * @ORM\Entity()
15
 */
16
class TrackEExerciseConfirmation
17
{
18
    use UserTrait;
19
20
    /**
21
     * @var int
22
     *
23
     * @ORM\Column(name="id", type="integer")
24
     * @ORM\Id
25
     * @ORM\GeneratedValue(strategy="IDENTITY")
26
     */
27
    protected $id;
28
29
    /**
30
     * @var User
31
     *
32
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User", inversedBy="trackEExerciseConfirmations")
33
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
34
     */
35
    protected $user;
36
37
    /**
38
     * @var int
39
     *
40
     * @ORM\Column(name="course_id", type="integer")
41
     */
42
    private $courseId;
43
44
    /**
45
     * @var int
46
     *
47
     * @ORM\Column(name="attempt_id", type="integer")
48
     */
49
    private $attemptId;
50
51
    /**
52
     * @var int
53
     *
54
     * @ORM\Column(name="quiz_id", type="integer")
55
     */
56
    private $quizId;
57
58
    /**
59
     * @var int
60
     *
61
     * @ORM\Column(name="session_id", type="integer")
62
     */
63
    private $sessionId;
64
65
    /**
66
     * @var bool
67
     *
68
     * @ORM\Column(name="confirmed", type="boolean", options={"default": false})
69
     */
70
    private $confirmed;
71
72
    /**
73
     * @var int
74
     *
75
     * @ORM\Column(name="questions_count", type="integer")
76
     */
77
    private $questionsCount;
78
79
    /**
80
     * @var int
81
     *
82
     * @ORM\Column(name="saved_answers_count", type="integer")
83
     */
84
    private $savedAnswersCount;
85
86
    /**
87
     * @var \DateTime
88
     *
89
     * @ORM\Column(name="created_at", type="datetime")
90
     */
91
    private $createdAt;
92
93
    /**
94
     * @var \DateTime
95
     *
96
     * @ORM\Column(name="updated_at", type="datetime", nullable=true)
97
     */
98
    private $updatedAt;
99
100
    /**
101
     * TrackEExerciseConfirmation constructor.
102
     */
103
    public function __construct()
104
    {
105
        $this->confirmed = false;
106
    }
107
108
    /**
109
     * @return int
110
     */
111
    public function getId()
112
    {
113
        return $this->id;
114
    }
115
116
    /**
117
     * @return int
118
     */
119
    public function getCourseId()
120
    {
121
        return $this->courseId;
122
    }
123
124
    /**
125
     * @param int $courseId
126
     *
127
     * @return TrackEExerciseConfirmation
128
     */
129
    public function setCourseId($courseId)
130
    {
131
        $this->courseId = $courseId;
132
133
        return $this;
134
    }
135
136
    /**
137
     * @return int
138
     */
139
    public function getAttemptId()
140
    {
141
        return $this->attemptId;
142
    }
143
144
    /**
145
     * @param int $attemptId
146
     *
147
     * @return TrackEExerciseConfirmation
148
     */
149
    public function setAttemptId($attemptId)
150
    {
151
        $this->attemptId = $attemptId;
152
153
        return $this;
154
    }
155
156
    /**
157
     * @return int
158
     */
159
    public function getQuizId()
160
    {
161
        return $this->quizId;
162
    }
163
164
    /**
165
     * @param int $quizId
166
     *
167
     * @return TrackEExerciseConfirmation
168
     */
169
    public function setQuizId($quizId)
170
    {
171
        $this->quizId = $quizId;
172
173
        return $this;
174
    }
175
176
    /**
177
     * @return int
178
     */
179
    public function getSessionId()
180
    {
181
        return $this->sessionId;
182
    }
183
184
    /**
185
     * @param int $sessionId
186
     *
187
     * @return TrackEExerciseConfirmation
188
     */
189
    public function setSessionId($sessionId)
190
    {
191
        $this->sessionId = $sessionId;
192
193
        return $this;
194
    }
195
196
    /**
197
     * @return bool
198
     */
199
    public function isConfirmed()
200
    {
201
        return $this->confirmed;
202
    }
203
204
    /**
205
     * @param bool $confirmed
206
     *
207
     * @return TrackEExerciseConfirmation
208
     */
209
    public function setConfirmed($confirmed)
210
    {
211
        $this->confirmed = $confirmed;
212
213
        return $this;
214
    }
215
216
    /**
217
     * @return int
218
     */
219
    public function getQuestionsCount()
220
    {
221
        return $this->questionsCount;
222
    }
223
224
    /**
225
     * @param int $questionsCount
226
     *
227
     * @return TrackEExerciseConfirmation
228
     */
229
    public function setQuestionsCount($questionsCount)
230
    {
231
        $this->questionsCount = $questionsCount;
232
233
        return $this;
234
    }
235
236
    /**
237
     * @return int
238
     */
239
    public function getSavedAnswersCount()
240
    {
241
        return $this->savedAnswersCount;
242
    }
243
244
    /**
245
     * @param int $savedAnswersCount
246
     *
247
     * @return TrackEExerciseConfirmation
248
     */
249
    public function setSavedAnswersCount($savedAnswersCount)
250
    {
251
        $this->savedAnswersCount = $savedAnswersCount;
252
253
        return $this;
254
    }
255
256
    /**
257
     * @return \DateTime
258
     */
259
    public function getCreatedAt()
260
    {
261
        return $this->createdAt;
262
    }
263
264
    /**
265
     * @param \DateTime $createdAt
266
     *
267
     * @return TrackEExerciseConfirmation
268
     */
269
    public function setCreatedAt($createdAt)
270
    {
271
        $this->createdAt = $createdAt;
272
273
        return $this;
274
    }
275
276
    /**
277
     * @return \DateTime
278
     */
279
    public function getUpdatedAt()
280
    {
281
        return $this->updatedAt;
282
    }
283
284
    /**
285
     * @param \DateTime $updatedAt
286
     *
287
     * @return TrackEExerciseConfirmation
288
     */
289
    public function setUpdatedAt($updatedAt)
290
    {
291
        $this->updatedAt = $updatedAt;
292
293
        return $this;
294
    }
295
}
296