Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
// This file is part of the customcert module for Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
/**
18
 * Contains the class that provides a grade object to be used by elements for display purposes.
19
 *
20
 * @package    mod_customcert
21
 * @copyright  2017 Mark Nelson <markn@moodle.com>
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 */
24
 
25
namespace mod_customcert;
26
 
27
/**
28
 * The class that provides a grade object to be used by elements for display purposes.
29
 *
30
 * @package    mod_customcert
31
 * @copyright  2017 Mark Nelson <markn@moodle.com>
32
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
33
 */
34
class grade_information {
35
 
36
    /**
37
     * @var string The grade name.
38
     */
39
    protected $name;
40
 
41
    /**
42
     * @var float The raw grade.
43
     */
44
    protected $grade;
45
 
46
    /**
47
     * @var string The grade to display
48
     */
49
    protected $displaygrade;
50
 
51
    /**
52
     * @var int The date it was graded.
53
     */
54
    protected $dategraded;
55
 
56
    /**
57
     * The constructor.
58
     *
59
     * @param string $name
60
     * @param float $grade
61
     * @param string $displaygrade
62
     * @param int $dategraded
63
     */
64
    public function __construct($name, $grade, $displaygrade, $dategraded) {
65
        $this->name = $name;
66
        $this->grade = $grade;
67
        $this->displaygrade = $displaygrade;
68
        $this->dategraded = $dategraded;
69
    }
70
 
71
    /**
72
     * Returns the name.
73
     *
74
     * @return string
75
     */
76
    public function get_name() {
77
        return $this->name;
78
    }
79
 
80
    /**
81
     * Returns the raw grade.
82
     *
83
     * @return float
84
     */
85
    public function get_grade() {
86
        return $this->grade;
87
    }
88
 
89
    /**
90
     * Returns the display grade.
91
     *
92
     * @return string
93
     */
94
    public function get_displaygrade() {
95
        return $this->displaygrade;
96
    }
97
 
98
    /**
99
     * Returns the date it was graded.
100
     *
101
     * @return int
102
     */
103
    public function get_dategraded() {
104
        return $this->dategraded;
105
    }
106
}