Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
 
3
namespace Packback\Lti1p3;
4
 
5
use Packback\Lti1p3\Concerns\JsonStringable;
6
 
7
class LtiGradeSubmissionReview
8
{
9
    use JsonStringable;
10
    private $reviewable_status;
11
    private $label;
12
    private $url;
13
    private $custom;
14
 
15
    public function __construct(?array $gradeSubmission = null)
16
    {
17
        $this->reviewable_status = $gradeSubmission['reviewableStatus'] ?? null;
18
        $this->label = $gradeSubmission['label'] ?? null;
19
        $this->url = $gradeSubmission['url'] ?? null;
20
        $this->custom = $gradeSubmission['custom'] ?? null;
21
    }
22
 
23
    public function getArray(): array
24
    {
25
        return [
26
            'reviewableStatus' => $this->reviewable_status,
27
            'label' => $this->label,
28
            'url' => $this->url,
29
            'custom' => $this->custom,
30
        ];
31
    }
32
 
33
    /**
34
     * Static function to allow for method chaining without having to assign to a variable first.
35
     */
36
    public static function new(): self
37
    {
38
        return new LtiGradeSubmissionReview();
39
    }
40
 
41
    public function getReviewableStatus()
42
    {
43
        return $this->reviewable_status;
44
    }
45
 
46
    public function setReviewableStatus($value): self
47
    {
48
        $this->reviewable_status = $value;
49
 
50
        return $this;
51
    }
52
 
53
    public function getLabel()
54
    {
55
        return $this->label;
56
    }
57
 
58
    public function setLabel($value): self
59
    {
60
        $this->label = $value;
61
 
62
        return $this;
63
    }
64
 
65
    public function getUrl()
66
    {
67
        return $this->url;
68
    }
69
 
70
    public function setUrl($url): self
71
    {
72
        $this->url = $url;
73
 
74
        return $this;
75
    }
76
 
77
    public function getCustom()
78
    {
79
        return $this->custom;
80
    }
81
 
82
    public function setCustom($value): self
83
    {
84
        $this->custom = $value;
85
 
86
        return $this;
87
    }
88
}