|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* For licensing terms, see /license.txt */ |
|
4
|
|
|
|
|
5
|
|
|
namespace Chamilo\PluginBundle\ExerciseFocused\Entity; |
|
6
|
|
|
|
|
7
|
|
|
use Chamilo\CoreBundle\Entity\TrackEExercises; |
|
8
|
|
|
use Chamilo\CoreBundle\Traits\TimestampableTypedEntity; |
|
9
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
10
|
|
|
|
|
11
|
|
|
/** |
|
12
|
|
|
* Class EmbedRegistry. |
|
13
|
|
|
* |
|
14
|
|
|
* @package Chamilo\PluginBundle\Entity\EmbedRegistry |
|
15
|
|
|
* |
|
16
|
|
|
* @ORM\Entity(repositoryClass="Chamilo\PluginBundle\ExerciseFocused\Repository\LogRepository") |
|
17
|
|
|
* @ORM\Table(name="plugin_exercisefocused_log") |
|
18
|
|
|
*/ |
|
19
|
|
|
class Log |
|
20
|
|
|
{ |
|
21
|
|
|
use TimestampableTypedEntity; |
|
22
|
|
|
|
|
23
|
|
|
public const TYPE_RETURN = 'return'; |
|
24
|
|
|
public const TYPE_OUTFOCUSED = 'outfocused'; |
|
25
|
|
|
public const TYPE_OUTFOCUSED_LIMIT = 'outfocused_limit'; |
|
26
|
|
|
public const TYPE_TIME_LIMIT = 'time_limit'; |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* @var int |
|
30
|
|
|
* |
|
31
|
|
|
* @ORM\Column(name="id", type="integer") |
|
32
|
|
|
* @ORM\Id |
|
33
|
|
|
* @ORM\GeneratedValue |
|
34
|
|
|
*/ |
|
35
|
|
|
private $id; |
|
36
|
|
|
|
|
37
|
|
|
/** |
|
38
|
|
|
* @var TrackEExercises |
|
39
|
|
|
* |
|
40
|
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\TrackEExercises") |
|
41
|
|
|
* @ORM\JoinColumn(name="exe_id", referencedColumnName="exe_id", onDelete="SET NULL") |
|
42
|
|
|
*/ |
|
43
|
|
|
private $exe; |
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* @var int |
|
47
|
|
|
* |
|
48
|
|
|
* @ORM\Column(name="level", type="integer") |
|
49
|
|
|
*/ |
|
50
|
|
|
private $level; |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* @var string |
|
54
|
|
|
* |
|
55
|
|
|
* @ORM\Column(name="action", type="string", nullable=false) |
|
56
|
|
|
*/ |
|
57
|
|
|
private $action; |
|
58
|
|
|
|
|
59
|
|
|
public function getId(): int |
|
60
|
|
|
{ |
|
61
|
|
|
return $this->id; |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
public function getExe(): TrackEExercises |
|
65
|
|
|
{ |
|
66
|
|
|
return $this->exe; |
|
67
|
|
|
} |
|
68
|
|
|
|
|
69
|
|
|
public function setExe(TrackEExercises $exe): Log |
|
70
|
|
|
{ |
|
71
|
|
|
$this->exe = $exe; |
|
72
|
|
|
|
|
73
|
|
|
return $this; |
|
74
|
|
|
} |
|
75
|
|
|
|
|
76
|
|
|
public function getLevel(): int |
|
77
|
|
|
{ |
|
78
|
|
|
return $this->level; |
|
79
|
|
|
} |
|
80
|
|
|
|
|
81
|
|
|
public function setLevel(int $level): self |
|
82
|
|
|
{ |
|
83
|
|
|
$this->level = $level; |
|
84
|
|
|
|
|
85
|
|
|
return $this; |
|
86
|
|
|
} |
|
87
|
|
|
|
|
88
|
|
|
public function getAction(): string |
|
89
|
|
|
{ |
|
90
|
|
|
return $this->action; |
|
91
|
|
|
} |
|
92
|
|
|
|
|
93
|
|
|
public function setAction(string $action): Log |
|
94
|
|
|
{ |
|
95
|
|
|
$this->action = $action; |
|
96
|
|
|
|
|
97
|
|
|
return $this; |
|
98
|
|
|
} |
|
99
|
|
|
} |
|
100
|
|
|
|