Passed
Push — master ( 95f607...254001 )
by Julito
12:38
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
use Gedmo\Timestampable\Traits\TimestampableEntity;
10
11
/**
12
 * Class TrackEExerciseConfirmation.
13
 *
14
 * @ORM\Table(name="track_e_exercise_confirmation")
15
 * @ORM\Entity()
16
 */
17
class TrackEExerciseConfirmation
18
{
19
    use TimestampableEntity;
20
    use UserTrait;
21
22
    /**
23
     * @var int
24
     *
25
     * @ORM\Column(name="id", type="integer")
26
     * @ORM\Id
27
     * @ORM\GeneratedValue(strategy="IDENTITY")
28
     */
29
    protected $id;
30
31
    /**
32
     * @var User
33
     *
34
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User", inversedBy="trackEExerciseConfirmations")
35
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
36
     */
37
    protected $user;
38
39
    /**
40
     * @var int
41
     *
42
     * @ORM\Column(name="course_id", type="integer")
43
     */
44
    private $courseId;
45
46
    /**
47
     * @var int
48
     *
49
     * @ORM\Column(name="attempt_id", type="integer")
50
     */
51
    private $attemptId;
52
53
    /**
54
     * @var int
55
     *
56
     * @ORM\Column(name="quiz_id", type="integer")
57
     */
58
    private $quizId;
59
60
    /**
61
     * @var int
62
     *
63
     * @ORM\Column(name="session_id", type="integer")
64
     */
65
    private $sessionId;
66
67
    /**
68
     * @var bool
69
     *
70
     * @ORM\Column(name="confirmed", type="boolean", options={"default": false})
71
     */
72
    private $confirmed;
73
74
    /**
75
     * @var int
76
     *
77
     * @ORM\Column(name="questions_count", type="integer")
78
     */
79
    private $questionsCount;
80
81
    /**
82
     * @var int
83
     *
84
     * @ORM\Column(name="saved_answers_count", type="integer")
85
     */
86
    private $savedAnswersCount;
87
88
    /**
89
     * TrackEExerciseConfirmation constructor.
90
     */
91
    public function __construct()
92
    {
93
        $this->confirmed = false;
94
    }
95
96
    /**
97
     * @return int
98
     */
99
    public function getId()
100
    {
101
        return $this->id;
102
    }
103
104
    /**
105
     * @return int
106
     */
107
    public function getCourseId()
108
    {
109
        return $this->courseId;
110
    }
111
112
    /**
113
     * @param int $courseId
114
     *
115
     * @return TrackEExerciseConfirmation
116
     */
117
    public function setCourseId($courseId)
118
    {
119
        $this->courseId = $courseId;
120
121
        return $this;
122
    }
123
124
    /**
125
     * @return int
126
     */
127
    public function getAttemptId()
128
    {
129
        return $this->attemptId;
130
    }
131
132
    /**
133
     * @param int $attemptId
134
     *
135
     * @return TrackEExerciseConfirmation
136
     */
137
    public function setAttemptId($attemptId)
138
    {
139
        $this->attemptId = $attemptId;
140
141
        return $this;
142
    }
143
144
    /**
145
     * @return int
146
     */
147
    public function getQuizId()
148
    {
149
        return $this->quizId;
150
    }
151
152
    /**
153
     * @param int $quizId
154
     *
155
     * @return TrackEExerciseConfirmation
156
     */
157
    public function setQuizId($quizId)
158
    {
159
        $this->quizId = $quizId;
160
161
        return $this;
162
    }
163
164
    /**
165
     * @return int
166
     */
167
    public function getSessionId()
168
    {
169
        return $this->sessionId;
170
    }
171
172
    /**
173
     * @param int $sessionId
174
     *
175
     * @return TrackEExerciseConfirmation
176
     */
177
    public function setSessionId($sessionId)
178
    {
179
        $this->sessionId = $sessionId;
180
181
        return $this;
182
    }
183
184
    /**
185
     * @return bool
186
     */
187
    public function isConfirmed()
188
    {
189
        return $this->confirmed;
190
    }
191
192
    /**
193
     * @param bool $confirmed
194
     *
195
     * @return TrackEExerciseConfirmation
196
     */
197
    public function setConfirmed($confirmed)
198
    {
199
        $this->confirmed = $confirmed;
200
201
        return $this;
202
    }
203
204
    /**
205
     * @return int
206
     */
207
    public function getQuestionsCount()
208
    {
209
        return $this->questionsCount;
210
    }
211
212
    /**
213
     * @param int $questionsCount
214
     *
215
     * @return TrackEExerciseConfirmation
216
     */
217
    public function setQuestionsCount($questionsCount)
218
    {
219
        $this->questionsCount = $questionsCount;
220
221
        return $this;
222
    }
223
224
    /**
225
     * @return int
226
     */
227
    public function getSavedAnswersCount()
228
    {
229
        return $this->savedAnswersCount;
230
    }
231
232
    /**
233
     * @param int $savedAnswersCount
234
     *
235
     * @return TrackEExerciseConfirmation
236
     */
237
    public function setSavedAnswersCount($savedAnswersCount)
238
    {
239
        $this->savedAnswersCount = $savedAnswersCount;
240
241
        return $this;
242
    }
243
}
244