Gitlab CSE Unil

widget.php 3.24 KB
Newer Older
M. Chardon's avatar
init  
M. Chardon committed
1
<?php
2

M. Chardon's avatar
init  
M. Chardon committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

/**
 * This file contains the definition for the library class for edit PDF renderer.
 *
 * @package   assignfeedback_editpdfplus
M. Chardon's avatar
GPL3    
M. Chardon committed
22
 * @copyright  2016 Université de Lausanne
M. Chardon's avatar
init  
M. Chardon committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
defined('MOODLE_INTERNAL') || die();

/**
 * A custom renderer class that extends the plugin_renderer_base and is used by the editpdf feedback plugin.
 *
 * @package assignfeedback_editpdfplus
 * @copyright 2013 Davo Smith
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
class assignfeedback_editpdfplus_widget implements renderable {

    /** @var int $assignment - Assignment instance id */
    public $assignment = 0;
38

M. Chardon's avatar
init  
M. Chardon committed
39
40
    /** @var int $userid - The user id we are grading */
    public $userid = 0;
41

M. Chardon's avatar
init  
M. Chardon committed
42
43
    /** @var mixed $attemptnumber - The attempt number we are grading */
    public $attemptnumber = 0;
44

M. Chardon's avatar
init  
M. Chardon committed
45
46
    /** @var moodle_url $downloadurl */
    public $downloadurl = null;
47

M. Chardon's avatar
init  
M. Chardon committed
48
49
    /** @var string $downloadfilename */
    public $downloadfilename = null;
50

M. Chardon's avatar
init  
M. Chardon committed
51
52
    /** @var string[] $stampfiles */
    public $stampfiles = array();
53

M. Chardon's avatar
init  
M. Chardon committed
54
55
    /** @var bool $readonly */
    public $readonly = true;
56

M. Chardon's avatar
init  
M. Chardon committed
57
58
59
    /** @var integer $pagetotal */
    public $pagetotal = 0;

M. Chardon's avatar
M. Chardon committed
60
    /** @var tool[] $toolbars */
61
    public $toolbars = array();
M. Chardon's avatar
M. Chardon committed
62
63
64
    
    /** @var axis[] $toolbars */
    public $axis = array();
65

M. Chardon's avatar
init  
M. Chardon committed
66
67
68
69
70
71
72
73
74
75
    /**
     * Constructor
     * @param int $assignment - Assignment instance id
     * @param int $userid - The user id we are grading
     * @param int $attemptnumber - The attempt number we are grading
     * @param moodle_url $downloadurl - A url to download the current generated pdf.
     * @param string $downloadfilename - Name of the generated pdf.
     * @param string[] $stampfiles - The file names of the stamps.
     * @param bool $readonly - Show the readonly interface (no tools).
     * @param integer $pagetotal - The total number of pages.
76
77
     * @param tool[] $toolbars - the different tool to display
     * @param axis[] $axis - the different axis to display
M. Chardon's avatar
init  
M. Chardon committed
78
     */
M. Chardon's avatar
M. Chardon committed
79
    public function __construct($assignment, $userid, $attemptnumber, $downloadurl, $downloadfilename, $stampfiles, $readonly, $pagetotal, $toolbars, $axis) {
M. Chardon's avatar
init  
M. Chardon committed
80
81
82
83
84
85
86
87
        $this->assignment = $assignment;
        $this->userid = $userid;
        $this->attemptnumber = $attemptnumber;
        $this->downloadurl = $downloadurl;
        $this->downloadfilename = $downloadfilename;
        $this->stampfiles = $stampfiles;
        $this->readonly = $readonly;
        $this->pagetotal = $pagetotal;
88
        $this->toolbars = $toolbars;
M. Chardon's avatar
M. Chardon committed
89
        $this->axis = $axis;
M. Chardon's avatar
init  
M. Chardon committed
90
    }
91

M. Chardon's avatar
init  
M. Chardon committed
92
}