Passed
Push — master ( 3ef090...0b35a3 )
by Julito
12:21
created

CQuizRelQuestion::setQuestionOrder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CourseBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
9
/**
10
 * CQuizRelQuestion.
11
 *
12
 * @ORM\Table(
13
 *  name="c_quiz_rel_question",
14
 *  indexes={
15
 *      @ORM\Index(name="course", columns={"c_id"}),
16
 *      @ORM\Index(name="question", columns={"question_id"}),
17
 *      @ORM\Index(name="exercise", columns={"exercice_id"})
18
 *  }
19
 * )
20
 * @ORM\Entity
21
 */
22
class CQuizRelQuestion
23
{
24
    /**
25
     * @var int
26
     *
27
     * @ORM\Column(name="iid", type="integer")
28
     * @ORM\Id
29
     * @ORM\GeneratedValue
30
     */
31
    protected $iid;
32
33
    /**
34
     * @var int
35
     *
36
     * @ORM\Column(name="c_id", type="integer")
37
     */
38
    protected $cId;
39
40
    /**
41
     * @var int
42
     *
43
     * @ORM\Column(name="question_order", type="integer", nullable=false)
44
     */
45
    protected $questionOrder;
46
47
    /**
48
     * @var CQuizQuestion
49
     *
50
     * @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CQuizQuestion", inversedBy="relQuiz")
51
     * @ORM\JoinColumn(name="question_id", referencedColumnName="iid")
52
     */
53
    protected $question;
54
55
    /**
56
     * @var CQuiz
57
     *
58
     * @ORM\ManyToOne(targetEntity="CQuiz", inversedBy="relQuestions")
59
     * @ORM\JoinColumn(name="exercice_id", referencedColumnName="iid")
60
     */
61
    protected $quiz;
62
63
    /**
64
     * Set questionOrder.
65
     *
66
     * @param int $questionOrder
67
     *
68
     * @return CQuizRelQuestion
69
     */
70
    public function setQuestionOrder($questionOrder)
71
    {
72
        $this->questionOrder = $questionOrder;
73
74
        return $this;
75
    }
76
77
    /**
78
     * Get questionOrder.
79
     *
80
     * @return int
81
     */
82
    public function getQuestionOrder()
83
    {
84
        return $this->questionOrder;
85
    }
86
87
    /**
88
     * Set cId.
89
     *
90
     * @param int $cId
91
     *
92
     * @return CQuizRelQuestion
93
     */
94
    public function setCId($cId)
95
    {
96
        $this->cId = $cId;
97
98
        return $this;
99
    }
100
101
    /**
102
     * Get cId.
103
     *
104
     * @return int
105
     */
106
    public function getCId()
107
    {
108
        return $this->cId;
109
    }
110
111
    public function getQuiz()
112
    {
113
        return $this->quiz;
114
    }
115
116
    public function getQuestion()
117
    {
118
        return $this->question;
119
    }
120
}
121