Completed
Pull Request — master (#3464)
by Julito
14:18 queued 01:15
created

GradebookEvaluation::getUser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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