Gitlab CSE Unil
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
moodle-assignfeedback_editpdfplus
Commits
fc6121b0
Commit
fc6121b0
authored
Sep 10, 2018
by
M. Chardon
Browse files
- renommage editpdf -> editpdfplus
- correction copyright
parent
cc3565d7
Changes
36
Hide whitespace changes
Inline
Side-by-side
ajax.php
View file @
fc6121b0
...
...
@@ -20,6 +20,7 @@
*
* @package assignfeedback_editpdfplus
* @copyright 2016 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/ajax.php by Davo Smith.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
use
\
assignfeedback_editpdfplus\document_services
;
...
...
ajax_progress.php
View file @
fc6121b0
...
...
@@ -19,7 +19,8 @@
* ALL RETURNED INFO IS PUBLIC.
*
* @package assignfeedback_editpdfplus
* @copyright 2013 Jerome Mouneyrac
* @copyright 2016 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/ajax_progress.php by Jerome Mouneyrac.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
...
...
backup/moodle2/backup_assignfeedback_editpdfplus_subplugin.class.php
View file @
fc6121b0
...
...
@@ -17,22 +17,18 @@
/**
* This file contains the backup code for the feedback_editpdfplus plugin.
*
* @package assignfeedback_editpdfplus
* @copyright 2013 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
/**
*
* Provides the information to backup feedback pdf annotations.
*
* This just adds its fileareas to the annotations and the comments and annotation data.
*
* @package assignfeedback_editpdfplus
* @copyright 2013 Damyon Wiese
* @copyright 2016 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/backup/moodle2/backup_assignfeedback_editpdf_subplugin.class.php by Damyon Wiese.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
class
backup_assignfeedback_editpdfplus_subplugin
extends
backup_subplugin
{
const
GRADEID
=
'gradeid'
;
...
...
backup/moodle2/restore_assignfeedback_editpdfplus_subplugin.class.php
View file @
fc6121b0
...
...
@@ -17,23 +17,19 @@
/**
* This file contains the restore code for the feedback_editpdfplus plugin.
*
* @package assignfeedback_editpdfplus
* @copyright 2013 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
/**
*
* Restore subplugin class.
*
* Provides the necessary information needed
* to restore one assign_feedback subplugin.
*
* @package assignfeedback_editpdfplus
* @copyright 2013 Damyon Wiese
* @copyright 2016 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/backup/moodle2/restore_assignfeedback_editpdfplus_subplugin.class.php by Damyon Wiese.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
class
restore_assignfeedback_editpdfplus_subplugin
extends
restore_subplugin
{
const
GRADE
=
'grade'
;
...
...
classes/admin_editor.php
View file @
fc6121b0
...
...
@@ -17,6 +17,10 @@
/**
* This file contains the editor class for the assignfeedback_editpdfplus plugin
*
* This class performs crud operations on comments and annotations from a page of a response.
*
* No capability checks are done - they should be done by the calling class.
*
* @package assignfeedback_editpdfplus
* @copyright 2017 Université de Lausanne
...
...
@@ -29,15 +33,6 @@ use assignfeedback_editpdfplus\bdd\axis;
use
assignfeedback_editpdfplus\bdd\type_tool
;
use
assignfeedback_editpdfplus
\
bdd\tool
;
/**
* This class performs crud operations on comments and annotations from a page of a response.
*
* No capability checks are done - they should be done by the calling class.
*
* @package assignfeedback_editpdfplus
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
admin_editor
{
const
BDDTABLETOOL
=
"assignfeedback_editpp_tool"
;
...
...
classes/bdd/annotation.php
View file @
fc6121b0
...
...
@@ -18,20 +18,16 @@
/**
* This file contains the annotation class for the assignfeedback_editpdfplus plugin
*
* This class adds and removes annotations from a page of a response.
*
* @package assignfeedback_editpdfplus
* @copyright 2016 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/classes/annotation.php by Davo Smith.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace
assignfeedback_editpdfplus\bdd
;
/**
* This class adds and removes annotations from a page of a response.
*
* @package assignfeedback_editpdfplus
* @copyright 2012 Davo Smith
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
annotation
{
/** @var int unique id for this annotation */
...
...
classes/bdd/comment.php
View file @
fc6121b0
...
...
@@ -17,9 +17,12 @@
/**
* This file contains the comment class for the assignfeedback_editpdfplus plugin
*
* This class represents a comment box on a page of feedback.
*
* @package assignfeedback_editpdfplus
* @copyright 2012 Davo Smith
* @copyright 2016 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/classes/comment.php by Davo Smith.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @deprecated since version 2017051600
*/
...
...
@@ -27,9 +30,6 @@
namespace
assignfeedback_editpdfplus\bdd
;
/**
* This class represents a comment box on a page of feedback.
* @copyright 2012 Davo Smith
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @deprecated since version 2016101700
*/
class
comment
{
...
...
classes/combined_document.php
View file @
fc6121b0
...
...
@@ -17,9 +17,12 @@
/**
* This file contains the combined document class for the assignfeedback_editpdfplus plugin.
*
* The combined_document class for the assignfeedback_editpdfplus plugin.
*
* @package assignfeedback_editpdfplus
* @copyright 2017 Andrew Nicols <andrew@nicols.co.uk>
* @copyright 2017 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/classes/combined_document.php by Andrew Nicols <andrew@nicols.co.uk>.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
...
...
@@ -27,12 +30,6 @@ namespace assignfeedback_editpdfplus;
defined
(
'MOODLE_INTERNAL'
)
||
die
();
/**
* The combined_document class for the assignfeedback_editpdfplus plugin.
*
* @copyright 2017 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
combined_document
{
/**
...
...
classes/document_services.php
View file @
fc6121b0
...
...
@@ -17,9 +17,17 @@
/**
* This file contains the annotation class for the assignfeedback_editpdfplus plugin
*
* Functions for generating the annotated pdf.
*
* This class controls the ingest of student submission files to a normalised
* PDF 1.4 document with all submission files concatinated together. It also
* provides the functions to generate a downloadable pdf with all comments and
* annotations embedded.
*
* @package assignfeedback_editpdfplus
* @copyright 2016 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/classes/document_services.php by Davo Smith
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
...
...
@@ -27,16 +35,6 @@ namespace assignfeedback_editpdfplus;
use
DOMDocument
;
/**
* Functions for generating the annotated pdf.
*
* This class controls the ingest of student submission files to a normalised
* PDF 1.4 document with all submission files concatinated together. It also
* provides the functions to generate a downloadable pdf with all comments and
* annotations embedded.
* @copyright 2012 Davo Smith
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
document_services
{
/** File area for generated pdf */
...
...
classes/event/observer.php
View file @
fc6121b0
...
...
@@ -19,17 +19,13 @@
* An event observer.
*
* @package assignfeedback_editpdfplus
* @copyright 2016 Damyon Wiese
* @copyright 2016 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/classes/event/observer.php by Damyon Wiese.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace
assignfeedback_editpdfplus\event
;
/**
* An event observer.
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
observer
{
const
BDDTABLEQUEUE
=
"assignfeedback_editpp_queue"
;
...
...
classes/form/axis_del_form.php
View file @
fc6121b0
...
...
@@ -18,6 +18,8 @@
/**
* This file contains the axis_del_form class for the assignfeedback_editpdfplus plugin
*
* Form to delete an axis
*
* @package assignfeedback_editpdfplus
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
...
...
@@ -29,13 +31,6 @@ require_once("$CFG->libdir/formslib.php");
use
moodleform
;
/**
* Form to delete an axis
*
* @package assignfeedback_editpdfplus
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
axis_del_form
extends
moodleform
{
const
HIDDENSTATE
=
"hidden"
;
...
...
classes/form/axis_form.php
View file @
fc6121b0
...
...
@@ -17,6 +17,8 @@
/**
* This file contains the axis_form class for the assignfeedback_editpdfplus plugin
*
* Form to add or edit an axis
*
* @package assignfeedback_editpdfplus
* @copyright 2017 Université de Lausanne
...
...
@@ -29,13 +31,6 @@ require_once("$CFG->libdir/formslib.php");
use
moodleform
;
/**
* Form to add or edit an axis
*
* @package assignfeedback_editpdfplus
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
axis_form
extends
moodleform
{
protected
function
definition
()
{
...
...
classes/form/axis_import_form.php
View file @
fc6121b0
...
...
@@ -18,6 +18,8 @@
/**
* This file contains the axis_import_form class for the assignfeedback_editpdfplus plugin
*
* Form to import an axis
*
* @package assignfeedback_editpdfplus
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
...
...
@@ -29,15 +31,6 @@ require_once("$CFG->libdir/formslib.php");
use
moodleform
;
/**
* Description of formslib
*
* Form to import an axis
*
* @package assignfeedback_editpdfplus
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
axis_import_form
extends
moodleform
{
protected
function
definition
()
{
...
...
classes/form/tool_form.php
View file @
fc6121b0
...
...
@@ -18,6 +18,8 @@
/**
* This file contains the tool_form class for the assignfeedback_editpdfplus plugin
*
* Form to add and edit a tool
*
* @package assignfeedback_editpdfplus
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
...
...
@@ -29,13 +31,6 @@ require_once("$CFG->libdir/formslib.php");
use
moodleform
;
/**
* Form to add and edit a tool
*
* @package assignfeedback_editpdfplus
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
tool_form
extends
moodleform
{
protected
function
definition
()
{
...
...
classes/form/tool_order_form.php
View file @
fc6121b0
...
...
@@ -18,6 +18,8 @@
/**
* This file contains the tool_form class for the assignfeedback_editpdfplus plugin
*
* Form to add and edit a tool
*
* @package assignfeedback_editpdfplus
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
...
...
@@ -29,13 +31,6 @@ require_once("$CFG->libdir/formslib.php");
use
moodleform
;
/**
* Form to add and edit a tool
*
* @package assignfeedback_editpdfplus
* @copyright 2017 Université de Lausanne
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
tool_order_form
extends
moodleform
{
const
HIDDENSTATE
=
"hidden"
;
...
...
classes/page_editor.php
View file @
fc6121b0
...
...
@@ -18,8 +18,13 @@
/**
* This file contains the editor class for the assignfeedback_editpdfplus plugin
*
* This class performs crud operations on comments and annotations from a page of a response.
*
* No capability checks are done - they should be done by the calling class.
*
* @package assignfeedback_editpdfplus
* @copyright 2016 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/classes/page_editor.php by Davo Smith
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
...
...
@@ -31,15 +36,6 @@ use assignfeedback_editpdfplus\bdd\tool_generic;
use
assignfeedback_editpdfplus
\
bdd\axis
;
use
assignfeedback_editpdfplus
\
bdd\annotation
;
/**
* This class performs crud operations on comments and annotations from a page of a response.
*
* No capability checks are done - they should be done by the calling class.
*
* @package assignfeedback_editpdfplus
* @copyright 2012 Davo Smith
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
page_editor
{
const
BDDTABLEOOL
=
"assignfeedback_editpp_tool"
;
...
...
classes/pdf.php
View file @
fc6121b0
...
...
@@ -20,6 +20,7 @@
*
* @package assignfeedback_editpdfplus
* @copyright 2016 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/classes/pdf.php by Davo Smith.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
...
...
@@ -34,13 +35,6 @@ global $CFG;
require_once
(
$CFG
->
libdir
.
'/pdflib.php'
);
require_once
(
$CFG
->
dirroot
.
'/mod/assign/feedback/editpdf/fpdi/fpdi.php'
);
/**
* Library code for manipulating PDFs
*
* @package assignfeedback_editpdfplus
* @copyright 2012 Davo Smith
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
pdf
extends
\
FPDI
{
/** @var int the number of the current page in the PDF being processed */
...
...
@@ -633,7 +627,7 @@ class pdf extends \FPDI {
$pdf
=
new
pdf
();
$pdf
->
set_pdf
(
$errorfile
);
$pdf
->
copy_page
();
$pdf
->
add_comment
(
get_string
(
'errorpdfpage'
,
'assignfeedback_editpdf'
),
250
,
300
,
200
,
"red"
);
$pdf
->
add_comment
(
get_string
(
'errorpdfpage'
,
'assignfeedback_editpdf
plus
'
),
250
,
300
,
200
,
"red"
);
$generatedpdf
=
$tmperrorimagefolder
.
'/'
.
'error.pdf'
;
$pdf
->
save_pdf
(
$generatedpdf
);
...
...
classes/privacy/provider.php
View file @
fc6121b0
...
...
@@ -18,7 +18,8 @@
* Privacy class for requesting user data.
*
* @package assignfeedback_editpdfplus
* @copyright 2018 Adrian Greeve <adrian@moodle.com>
* @copyright 2018 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/classes/privacy/provider.php by Adrian Greeve <adrian@moodle.com>.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
...
...
@@ -36,13 +37,6 @@ use \core_privacy\local\request\contextlist;
use
\
mod_assign\privacy\assign_plugin_request_data
;
use
\
mod_assign\privacy\useridlist
;
/**
* Privacy class for requesting user data.
*
* @package assignfeedback_editpdfplus
* @copyright 2018 Adrian Greeve <adrian@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
provider
implements
metadataprovider
,
assignfeedback_provider
{
/**
...
...
classes/renderer.php
View file @
fc6121b0
...
...
@@ -18,8 +18,11 @@
/**
* This file contains the definition for the library class for edit PDF renderer.
*
* A custom renderer class that extends the plugin_renderer_base and is used by the editpdfplus feedback plugin.
*
* @package assignfeedback_editpdfplus
* @copyright 2016 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/classes/renderer.php by Davo Smith.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
...
...
@@ -27,13 +30,6 @@ defined('MOODLE_INTERNAL') || die();
use
\
assignfeedback_editpdfplus\bdd\tool_generic
;
use
\
assignfeedback_editpdfplus\bdd\axis
;
/**
* 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_renderer
extends
plugin_renderer_base
{
const
PLUGIN_NAME
=
"assignfeedback_editpdfplus"
;
...
...
@@ -104,7 +100,7 @@ class assignfeedback_editpdfplus_renderer extends plugin_renderer_base {
}
/**
* Render the editpdf widget in the grading form.
* Render the editpdf
plus
widget in the grading form.
*
* @param assignfeedback_editpdfplus_widget $widget - Renderable widget containing assignment, user and attempt number.
* @return string
...
...
classes/task/convert_submissions.php
View file @
fc6121b0
...
...
@@ -17,9 +17,12 @@
/**
* A scheduled task.
*
* Simple task to convert submissions to pdf in the background.
*
* @package assignfeedback_editpdfplus
* @copyright 2016 Damyon Wiese
* @copyright 2016 Université de Lausanne
* The code is based on mod/assign/feedback/editpdf/classes/task/convert_submissions.php by Damyon Wiese.
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
...
...
@@ -31,11 +34,6 @@ use assignfeedback_editpdfplus\combined_document;
use
context_module
;
use
assign
;
/**
* Simple task to convert submissions to pdf in the background.
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class
convert_submissions
extends
scheduled_task
{
/**
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment