Completed
Push — master ( 90a7a9...7c306d )
by Julito
25:02
created

CStudentPublication::getSession()   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
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CourseBundle\Entity;
5
6
use Chamilo\CoreBundle\Entity\Session;
7
use Doctrine\ORM\Mapping as ORM;
8
9
/**
10
 * CStudentPublication.
11
 *
12
 * @ORM\Table(
13
 *  name="c_student_publication",
14
 *  indexes={
15
 *      @ORM\Index(name="course", columns={"c_id"}),
16
 *      @ORM\Index(name="session_id", columns={"session_id"}),
17
 *      @ORM\Index(name="idx_csp_u", columns={"user_id"})
18
 *  }
19
 * )
20
 * @ORM\Entity(repositoryClass="Chamilo\CourseBundle\Entity\Repository\CStudentPublicationRepository")
21
 */
22
class CStudentPublication
23
{
24
    /**
25
     * @var int
26
     *
27
     * @ORM\Column(name="iid", type="integer")
28
     * @ORM\Id
29
     * @ORM\GeneratedValue
30
     */
31
    private $iid;
32
33
    /**
34
     * @var int
35
     *
36
     * @ORM\Column(name="c_id", type="integer")
37
     */
38
    private $cId;
39
40
    /**
41
     * @var int
42
     *
43
     * @ORM\Column(name="id", type="integer", nullable=true)
44
     */
45
    private $id;
46
47
    /**
48
     * @var string
49
     *
50
     * @ORM\Column(name="url", type="string", length=255, nullable=true)
51
     */
52
    private $url;
53
54
    /**
55
     * @var string
56
     *
57
     * @ORM\Column(name="url_correction", type="string", length=255, nullable=true)
58
     */
59
    private $urlCorrection;
60
61
    /**
62
     * @var string
63
     *
64
     * @ORM\Column(name="title", type="string", length=255, nullable=true)
65
     */
66
    private $title;
67
68
    /**
69
     * @var string
70
     *
71
     * @ORM\Column(name="title_correction", type="string", length=255, nullable=true)
72
     */
73
    private $titleCorrection;
74
75
    /**
76
     * @var string
77
     *
78
     * @ORM\Column(name="description", type="text", nullable=true)
79
     */
80
    private $description;
81
82
    /**
83
     * @var string
84
     *
85
     * @ORM\Column(name="author", type="string", length=255, nullable=true)
86
     */
87
    private $author;
88
89
    /**
90
     * @var bool
91
     *
92
     * @ORM\Column(name="active", type="boolean", nullable=true)
93
     */
94
    private $active;
95
96
    /**
97
     * @var bool
98
     *
99
     * @ORM\Column(name="accepted", type="boolean", nullable=true)
100
     */
101
    private $accepted;
102
103
    /**
104
     * @var int
105
     *
106
     * @ORM\Column(name="post_group_id", type="integer", nullable=false)
107
     */
108
    private $postGroupId;
109
110
    /**
111
     * @var \DateTime
112
     *
113
     * @ORM\Column(name="sent_date", type="datetime", nullable=true)
114
     */
115
    private $sentDate;
116
117
    /**
118
     * @var string
119
     *
120
     * @ORM\Column(name="filetype", type="string", length=10, nullable=false)
121
     */
122
    private $filetype;
123
124
    /**
125
     * @var int
126
     *
127
     * @ORM\Column(name="has_properties", type="integer", nullable=false)
128
     */
129
    private $hasProperties;
130
131
    /**
132
     * @var bool
133
     *
134
     * @ORM\Column(name="view_properties", type="boolean", nullable=true)
135
     */
136
    private $viewProperties;
137
138
    /**
139
     * @var float
140
     *
141
     * @ORM\Column(name="qualification", type="float", precision=6, scale=2, nullable=false)
142
     */
143
    private $qualification;
144
145
    /**
146
     * @var \DateTime
147
     *
148
     * @ORM\Column(name="date_of_qualification", type="datetime", nullable=true)
149
     */
150
    private $dateOfQualification;
151
152
    /**
153
     * @var int
154
     *
155
     * @ORM\Column(name="parent_id", type="integer", nullable=false)
156
     */
157
    private $parentId;
158
159
    /**
160
     * @var int
161
     *
162
     * @ORM\Column(name="qualificator_id", type="integer", nullable=false)
163
     */
164
    private $qualificatorId;
165
166
    /**
167
     * @var float
168
     *
169
     * @ORM\Column(name="weight", type="float", precision=6, scale=2, nullable=false)
170
     */
171
    private $weight;
172
173
    /**
174
     * @var Session
175
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Session", inversedBy="studentPublications")
176
     * @ORM\JoinColumn(name="session_id", referencedColumnName="id")
177
     */
178
    private $session;
179
180
    /**
181
     * @var int
182
     *
183
     * @ORM\Column(name="user_id", type="integer", nullable=false)
184
     */
185
    private $userId;
186
187
    /**
188
     * @var int
189
     *
190
     * @ORM\Column(name="allow_text_assignment", type="integer", nullable=false)
191
     */
192
    private $allowTextAssignment;
193
194
    /**
195
     * @var int
196
     *
197
     * @ORM\Column(name="contains_file", type="integer", nullable=false)
198
     */
199
    private $containsFile;
200
201
    /**
202
     * @var int
203
     *
204
     * @ORM\Column(name="document_id", type="integer", nullable=false)
205
     */
206
    private $documentId;
207
208
    /**
209
     * @var int
210
     *
211
     * @ORM\Column(name="filesize", type="integer", nullable=true)
212
     */
213
    private $fileSize;
214
215
    /**
216
     * Set url.
217
     *
218
     * @param string $url
219
     *
220
     * @return CStudentPublication
221
     */
222
    public function setUrl($url)
223
    {
224
        $this->url = $url;
225
226
        return $this;
227
    }
228
229
    /**
230
     * Get url.
231
     *
232
     * @return string
233
     */
234
    public function getUrl()
235
    {
236
        return $this->url;
237
    }
238
239
    /**
240
     * Set title.
241
     *
242
     * @param string $title
243
     *
244
     * @return CStudentPublication
245
     */
246
    public function setTitle($title)
247
    {
248
        $this->title = $title;
249
250
        return $this;
251
    }
252
253
    /**
254
     * Get title.
255
     *
256
     * @return string
257
     */
258
    public function getTitle()
259
    {
260
        return $this->title;
261
    }
262
263
    /**
264
     * Set description.
265
     *
266
     * @param string $description
267
     *
268
     * @return CStudentPublication
269
     */
270
    public function setDescription($description)
271
    {
272
        $this->description = $description;
273
274
        return $this;
275
    }
276
277
    /**
278
     * Get description.
279
     *
280
     * @return string
281
     */
282
    public function getDescription()
283
    {
284
        return $this->description;
285
    }
286
287
    /**
288
     * Set author.
289
     *
290
     * @param string $author
291
     *
292
     * @return CStudentPublication
293
     */
294
    public function setAuthor($author)
295
    {
296
        $this->author = $author;
297
298
        return $this;
299
    }
300
301
    /**
302
     * Get author.
303
     *
304
     * @return string
305
     */
306
    public function getAuthor()
307
    {
308
        return $this->author;
309
    }
310
311
    /**
312
     * Set active.
313
     *
314
     * @param bool $active
315
     *
316
     * @return CStudentPublication
317
     */
318
    public function setActive($active)
319
    {
320
        $this->active = $active;
321
322
        return $this;
323
    }
324
325
    /**
326
     * Get active.
327
     *
328
     * @return bool
329
     */
330
    public function getActive()
331
    {
332
        return $this->active;
333
    }
334
335
    /**
336
     * Set accepted.
337
     *
338
     * @param bool $accepted
339
     *
340
     * @return CStudentPublication
341
     */
342
    public function setAccepted($accepted)
343
    {
344
        $this->accepted = $accepted;
345
346
        return $this;
347
    }
348
349
    /**
350
     * Get accepted.
351
     *
352
     * @return bool
353
     */
354
    public function getAccepted()
355
    {
356
        return $this->accepted;
357
    }
358
359
    /**
360
     * Set postGroupId.
361
     *
362
     * @param int $postGroupId
363
     *
364
     * @return CStudentPublication
365
     */
366
    public function setPostGroupId($postGroupId)
367
    {
368
        $this->postGroupId = $postGroupId;
369
370
        return $this;
371
    }
372
373
    /**
374
     * Get postGroupId.
375
     *
376
     * @return int
377
     */
378
    public function getPostGroupId()
379
    {
380
        return $this->postGroupId;
381
    }
382
383
    /**
384
     * Set sentDate.
385
     *
386
     * @param \DateTime $sentDate
387
     *
388
     * @return CStudentPublication
389
     */
390
    public function setSentDate($sentDate)
391
    {
392
        $this->sentDate = $sentDate;
393
394
        return $this;
395
    }
396
397
    /**
398
     * Get sentDate.
399
     *
400
     * @return \DateTime
401
     */
402
    public function getSentDate()
403
    {
404
        return $this->sentDate;
405
    }
406
407
    /**
408
     * Set filetype.
409
     *
410
     * @param string $filetype
411
     *
412
     * @return CStudentPublication
413
     */
414
    public function setFiletype($filetype)
415
    {
416
        $this->filetype = $filetype;
417
418
        return $this;
419
    }
420
421
    /**
422
     * Get filetype.
423
     *
424
     * @return string
425
     */
426
    public function getFiletype()
427
    {
428
        return $this->filetype;
429
    }
430
431
    /**
432
     * Set hasProperties.
433
     *
434
     * @param int $hasProperties
435
     *
436
     * @return CStudentPublication
437
     */
438
    public function setHasProperties($hasProperties)
439
    {
440
        $this->hasProperties = $hasProperties;
441
442
        return $this;
443
    }
444
445
    /**
446
     * Get hasProperties.
447
     *
448
     * @return int
449
     */
450
    public function getHasProperties()
451
    {
452
        return $this->hasProperties;
453
    }
454
455
    /**
456
     * Set viewProperties.
457
     *
458
     * @param bool $viewProperties
459
     *
460
     * @return CStudentPublication
461
     */
462
    public function setViewProperties($viewProperties)
463
    {
464
        $this->viewProperties = $viewProperties;
465
466
        return $this;
467
    }
468
469
    /**
470
     * Get viewProperties.
471
     *
472
     * @return bool
473
     */
474
    public function getViewProperties()
475
    {
476
        return $this->viewProperties;
477
    }
478
479
    /**
480
     * Set qualification.
481
     *
482
     * @param float $qualification
483
     *
484
     * @return CStudentPublication
485
     */
486
    public function setQualification($qualification)
487
    {
488
        $this->qualification = $qualification;
489
490
        return $this;
491
    }
492
493
    /**
494
     * Get qualification.
495
     *
496
     * @return float
497
     */
498
    public function getQualification()
499
    {
500
        return $this->qualification;
501
    }
502
503
    /**
504
     * Set dateOfQualification.
505
     *
506
     * @param \DateTime $dateOfQualification
507
     *
508
     * @return CStudentPublication
509
     */
510
    public function setDateOfQualification($dateOfQualification)
511
    {
512
        $this->dateOfQualification = $dateOfQualification;
513
514
        return $this;
515
    }
516
517
    /**
518
     * Get dateOfQualification.
519
     *
520
     * @return \DateTime
521
     */
522
    public function getDateOfQualification()
523
    {
524
        return $this->dateOfQualification;
525
    }
526
527
    /**
528
     * Set parentId.
529
     *
530
     * @param int $parentId
531
     *
532
     * @return CStudentPublication
533
     */
534
    public function setParentId($parentId)
535
    {
536
        $this->parentId = $parentId;
537
538
        return $this;
539
    }
540
541
    /**
542
     * Get parentId.
543
     *
544
     * @return int
545
     */
546
    public function getParentId()
547
    {
548
        return $this->parentId;
549
    }
550
551
    /**
552
     * Set qualificatorId.
553
     *
554
     * @param int $qualificatorId
555
     *
556
     * @return CStudentPublication
557
     */
558
    public function setQualificatorId($qualificatorId)
559
    {
560
        $this->qualificatorId = $qualificatorId;
561
562
        return $this;
563
    }
564
565
    /**
566
     * Get qualificatorId.
567
     *
568
     * @return int
569
     */
570
    public function getQualificatorId()
571
    {
572
        return $this->qualificatorId;
573
    }
574
575
    /**
576
     * Set weight.
577
     *
578
     * @param float $weight
579
     *
580
     * @return CStudentPublication
581
     */
582
    public function setWeight($weight)
583
    {
584
        $this->weight = $weight;
585
586
        return $this;
587
    }
588
589
    /**
590
     * Get weight.
591
     *
592
     * @return float
593
     */
594
    public function getWeight()
595
    {
596
        return $this->weight;
597
    }
598
599
    /**
600
     * Set session.
601
     *
602
     * @param Session $session
603
     *
604
     * @return CStudentPublication
605
     */
606
    public function setSession(Session $session = null)
607
    {
608
        $this->session = $session;
609
610
        return $this;
611
    }
612
613
    /**
614
     * Get session.
615
     *
616
     * @return Session
617
     */
618
    public function getSession()
619
    {
620
        return $this->session;
621
    }
622
623
    /**
624
     * Set userId.
625
     *
626
     * @param int $userId
627
     *
628
     * @return CStudentPublication
629
     */
630
    public function setUserId($userId)
631
    {
632
        $this->userId = $userId;
633
634
        return $this;
635
    }
636
637
    /**
638
     * Get userId.
639
     *
640
     * @return int
641
     */
642
    public function getUserId()
643
    {
644
        return $this->userId;
645
    }
646
647
    /**
648
     * Set allowTextAssignment.
649
     *
650
     * @param int $allowTextAssignment
651
     *
652
     * @return CStudentPublication
653
     */
654
    public function setAllowTextAssignment($allowTextAssignment)
655
    {
656
        $this->allowTextAssignment = $allowTextAssignment;
657
658
        return $this;
659
    }
660
661
    /**
662
     * Get allowTextAssignment.
663
     *
664
     * @return int
665
     */
666
    public function getAllowTextAssignment()
667
    {
668
        return $this->allowTextAssignment;
669
    }
670
671
    /**
672
     * Set containsFile.
673
     *
674
     * @param int $containsFile
675
     *
676
     * @return CStudentPublication
677
     */
678
    public function setContainsFile($containsFile)
679
    {
680
        $this->containsFile = $containsFile;
681
682
        return $this;
683
    }
684
685
    /**
686
     * Get containsFile.
687
     *
688
     * @return int
689
     */
690
    public function getContainsFile()
691
    {
692
        return $this->containsFile;
693
    }
694
695
    /**
696
     * Set id.
697
     *
698
     * @param int $id
699
     *
700
     * @return CStudentPublication
701
     */
702
    public function setId($id)
703
    {
704
        $this->id = $id;
705
706
        return $this;
707
    }
708
709
    /**
710
     * Get id.
711
     *
712
     * @return int
713
     */
714
    public function getId()
715
    {
716
        return $this->id;
717
    }
718
719
    /**
720
     * Set cId.
721
     *
722
     * @param int $cId
723
     *
724
     * @return CStudentPublication
725
     */
726
    public function setCId($cId)
727
    {
728
        $this->cId = $cId;
729
730
        return $this;
731
    }
732
733
    /**
734
     * Get cId.
735
     *
736
     * @return int
737
     */
738
    public function getCId()
739
    {
740
        return $this->cId;
741
    }
742
743
    /**
744
     * @return string
745
     */
746
    public function getUrlCorrection()
747
    {
748
        return $this->urlCorrection;
749
    }
750
751
    /**
752
     * @param string $urlCorrection
753
     */
754
    public function setUrlCorrection($urlCorrection)
755
    {
756
        $this->urlCorrection = $urlCorrection;
757
    }
758
759
    /**
760
     * @return string
761
     */
762
    public function getTitleCorrection()
763
    {
764
        return $this->titleCorrection;
765
    }
766
767
    /**
768
     * @param string $titleCorrection
769
     */
770
    public function setTitleCorrection($titleCorrection)
771
    {
772
        $this->titleCorrection = $titleCorrection;
773
    }
774
775
    /**
776
     * @return int
777
     */
778
    public function getDocumentId()
779
    {
780
        return $this->documentId;
781
    }
782
783
    /**
784
     * @param int $documentId
785
     */
786
    public function setDocumentId($documentId)
787
    {
788
        $this->documentId = $documentId;
789
    }
790
791
    /**
792
     * Get iid.
793
     *
794
     * @return int
795
     */
796
    public function getIid()
797
    {
798
        return $this->iid;
799
    }
800
801
    /**
802
     * @return int
803
     */
804
    public function getFileSize(): int
805
    {
806
        return $this->fileSize;
807
    }
808
809
    /**
810
     * @param int $fileSize
811
     *
812
     * @return CStudentPublication
813
     */
814
    public function setFileSize(int $fileSize): CStudentPublication
815
    {
816
        $this->fileSize = $fileSize;
817
818
        return $this;
819
    }
820
}
821