Passed
Push — master ( 4ca170...784f70 )
by Julito
12:58
created

CAttendance   A

Complexity

Total Complexity 25

Size/Duplication

Total Lines 346
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 46
dl 0
loc 346
rs 10
c 0
b 0
f 0
wmc 25

25 Methods

Rating   Name   Duplication   Size   Complexity  
A getAttendanceQualifyMax() 0 3 1
A __construct() 0 2 1
A getResourceIdentifier() 0 3 1
A getActive() 0 3 1
A getAttendanceQualifyTitle() 0 3 1
A setLocked() 0 5 1
A getDescription() 0 3 1
A __toString() 0 3 1
A setActive() 0 5 1
A setAttendanceQualifyTitle() 0 5 1
A getAttendanceWeight() 0 3 1
A getLocked() 0 3 1
A setAttendanceQualifyMax() 0 5 1
A getSessionId() 0 3 1
A setAttendanceWeight() 0 5 1
A getId() 0 3 1
A setDescription() 0 5 1
A setSessionId() 0 5 1
A setName() 0 5 1
A setId() 0 5 1
A getCId() 0 3 1
A getResourceName() 0 3 1
A getName() 0 3 1
A getIid() 0 3 1
A setCId() 0 5 1
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CourseBundle\Entity;
6
7
use Chamilo\CoreBundle\Entity\Resource\AbstractResource;
8
use Chamilo\CoreBundle\Entity\Resource\ResourceInterface;
9
use Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * CAttendance.
13
 *
14
 * @ORM\Table(
15
 *  name="c_attendance",
16
 *  indexes={
17
 *      @ORM\Index(name="course", columns={"c_id"}),
18
 *      @ORM\Index(name="session_id", columns={"session_id"}),
19
 *      @ORM\Index(name="active", columns={"active"})
20
 *  }
21
 * )
22
 * @ORM\Entity
23
 */
24
class CAttendance extends AbstractResource implements ResourceInterface
25
{
26
    /**
27
     * @var int
28
     *
29
     * @ORM\Column(name="iid", type="integer")
30
     * @ORM\Id
31
     * @ORM\GeneratedValue
32
     */
33
    protected $iid;
34
35
    /**
36
     * @var int
37
     *
38
     * @ORM\Column(name="c_id", type="integer")
39
     */
40
    protected $cId;
41
42
    /**
43
     * @var int
44
     *
45
     * @ORM\Column(name="id", type="integer", nullable=true)
46
     */
47
    protected $id;
48
49
    /**
50
     * @var string
51
     *
52
     * @ORM\Column(name="name", type="text", nullable=false)
53
     */
54
    protected $name;
55
56
    /**
57
     * @var string
58
     *
59
     * @ORM\Column(name="description", type="text", nullable=true)
60
     */
61
    protected $description;
62
63
    /**
64
     * @var bool
65
     *
66
     * @ORM\Column(name="active", type="boolean", nullable=false)
67
     */
68
    protected $active;
69
70
    /**
71
     * @var string
72
     *
73
     * @ORM\Column(name="attendance_qualify_title", type="string", length=255, nullable=true)
74
     */
75
    protected $attendanceQualifyTitle;
76
77
    /**
78
     * @var int
79
     *
80
     * @ORM\Column(name="attendance_qualify_max", type="integer", nullable=false)
81
     */
82
    protected $attendanceQualifyMax;
83
84
    /**
85
     * @var float
86
     *
87
     * @ORM\Column(name="attendance_weight", type="float", precision=6, scale=2, nullable=false)
88
     */
89
    protected $attendanceWeight;
90
91
    /**
92
     * @var int
93
     *
94
     * @ORM\Column(name="session_id", type="integer", nullable=false)
95
     */
96
    protected $sessionId;
97
98
    /**
99
     * @var int
100
     *
101
     * @ORM\Column(name="locked", type="integer", nullable=false)
102
     */
103
    protected $locked;
104
105
    public function __construct()
106
    {
107
    }
108
109
    /**
110
     * Set name.
111
     *
112
     * @param string $name
113
     *
114
     * @return CAttendance
115
     */
116
    public function setName($name)
117
    {
118
        $this->name = $name;
119
120
        return $this;
121
    }
122
123
    /**
124
     * Get name.
125
     *
126
     * @return string
127
     */
128
    public function getName()
129
    {
130
        return $this->name;
131
    }
132
133
    /**
134
     * Set description.
135
     *
136
     * @param string $description
137
     *
138
     * @return CAttendance
139
     */
140
    public function setDescription($description)
141
    {
142
        $this->description = $description;
143
144
        return $this;
145
    }
146
147
    /**
148
     * Get description.
149
     *
150
     * @return string
151
     */
152
    public function getDescription()
153
    {
154
        return $this->description;
155
    }
156
157
    /**
158
     * Set active.
159
     *
160
     * @param bool $active
161
     *
162
     * @return CAttendance
163
     */
164
    public function setActive($active)
165
    {
166
        $this->active = $active;
167
168
        return $this;
169
    }
170
171
    /**
172
     * Get active.
173
     *
174
     * @return bool
175
     */
176
    public function getActive()
177
    {
178
        return $this->active;
179
    }
180
181
    /**
182
     * Set attendanceQualifyTitle.
183
     *
184
     * @param string $attendanceQualifyTitle
185
     *
186
     * @return CAttendance
187
     */
188
    public function setAttendanceQualifyTitle($attendanceQualifyTitle)
189
    {
190
        $this->attendanceQualifyTitle = $attendanceQualifyTitle;
191
192
        return $this;
193
    }
194
195
    /**
196
     * Get attendanceQualifyTitle.
197
     *
198
     * @return string
199
     */
200
    public function getAttendanceQualifyTitle()
201
    {
202
        return $this->attendanceQualifyTitle;
203
    }
204
205
    /**
206
     * Set attendanceQualifyMax.
207
     *
208
     * @param int $attendanceQualifyMax
209
     *
210
     * @return CAttendance
211
     */
212
    public function setAttendanceQualifyMax($attendanceQualifyMax)
213
    {
214
        $this->attendanceQualifyMax = $attendanceQualifyMax;
215
216
        return $this;
217
    }
218
219
    /**
220
     * Get attendanceQualifyMax.
221
     *
222
     * @return int
223
     */
224
    public function getAttendanceQualifyMax()
225
    {
226
        return $this->attendanceQualifyMax;
227
    }
228
229
    /**
230
     * Set attendanceWeight.
231
     *
232
     * @param float $attendanceWeight
233
     *
234
     * @return CAttendance
235
     */
236
    public function setAttendanceWeight($attendanceWeight)
237
    {
238
        $this->attendanceWeight = $attendanceWeight;
239
240
        return $this;
241
    }
242
243
    /**
244
     * Get attendanceWeight.
245
     *
246
     * @return float
247
     */
248
    public function getAttendanceWeight()
249
    {
250
        return $this->attendanceWeight;
251
    }
252
253
    /**
254
     * Set sessionId.
255
     *
256
     * @param int $sessionId
257
     *
258
     * @return CAttendance
259
     */
260
    public function setSessionId($sessionId)
261
    {
262
        $this->sessionId = $sessionId;
263
264
        return $this;
265
    }
266
267
    /**
268
     * Get sessionId.
269
     *
270
     * @return int
271
     */
272
    public function getSessionId()
273
    {
274
        return $this->sessionId;
275
    }
276
277
    /**
278
     * Set locked.
279
     *
280
     * @param int $locked
281
     *
282
     * @return CAttendance
283
     */
284
    public function setLocked($locked)
285
    {
286
        $this->locked = $locked;
287
288
        return $this;
289
    }
290
291
    /**
292
     * Get locked.
293
     *
294
     * @return int
295
     */
296
    public function getLocked()
297
    {
298
        return $this->locked;
299
    }
300
301
    /**
302
     * Set id.
303
     *
304
     * @param int $id
305
     *
306
     * @return CAttendance
307
     */
308
    public function setId($id)
309
    {
310
        $this->id = $id;
311
312
        return $this;
313
    }
314
315
    /**
316
     * Get id.
317
     *
318
     * @return int
319
     */
320
    public function getId()
321
    {
322
        return $this->id;
323
    }
324
325
    /**
326
     * Set cId.
327
     *
328
     * @param int $cId
329
     *
330
     * @return CAttendance
331
     */
332
    public function setCId($cId)
333
    {
334
        $this->cId = $cId;
335
336
        return $this;
337
    }
338
339
    /**
340
     * Get cId.
341
     *
342
     * @return int
343
     */
344
    public function getCId()
345
    {
346
        return $this->cId;
347
    }
348
349
    public function __toString(): string
350
    {
351
        return (string) $this->getIid();
352
    }
353
354
    public function getIid(): int
355
    {
356
        return $this->iid;
357
    }
358
359
    /**
360
     * Resource identifier.
361
     */
362
    public function getResourceIdentifier(): int
363
    {
364
        return $this->getIid();
365
    }
366
367
    public function getResourceName(): string
368
    {
369
        return $this->getName();
370
    }
371
}
372