Skip to content
Snippets Groups Projects
Commit 3b88db98 authored by Friederike Schwager's avatar Friederike Schwager Committed by Friederike Schwager
Browse files

add/correct some documentation.

Correct order in upgrade.php
parent 4c584e86
No related branches found
No related tags found
No related merge requests found
......@@ -15,9 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* The purpose of this script is to collect the output data for the statistic template and
* make it available to the renderer. The data is collected via the statistic model and then processed.
* Therefore, class statistic can be seen as a view controller.
* Dropdown menu in answerstable on overview tab.
*
* @package mod_pdfannotator
* @copyright 2018 RWTH Aachen (see README.md)
......@@ -33,6 +31,16 @@ class answermenu implements \renderable, \templatable {
private $label;
private $buttonclass;
/**
* Constructor of renderable for dropdown menu in answerstable.
* @global type $CFG
* @param int $annotationid Id of the annotation the answer belongs to
* @param bool $issubscribed Is the user subscribed to the question?
* @param int $cmid Course module id
* @param int $currentpage Page of the table on overviewpage
* @param int $itemsperpage Number of entries on every page in the table
* @param int $answerfilter Value of the filter for the answerstable
*/
public function __construct($annotationid, $issubscribed, $cmid, $currentpage, $itemsperpage, $answerfilter) {
global $CFG;
......
......@@ -15,9 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* The purpose of this script is to collect the output data for the statistic template and
* make it available to the renderer. The data is collected via the statistic model and then processed.
* Therefore, class statistic can be seen as a view controller.
* Renderable for comments.
*
* @package mod_pdfannotator
* @copyright 2018 RWTH Aachen (see README.md)
......@@ -30,6 +28,14 @@ class comment implements \renderable, \templatable {
private $comments = [];
/**
* Constructor of renderable for comments.
*
* @param object $data Comment or array of comments
* @param object $cm Course module
* @param object $context Context
* @return type
*/
public function __construct($data, $cm, $context) {
global $USER;
......
......@@ -15,9 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* The purpose of this script is to collect the output data for the statistic template and
* make it available to the renderer. The data is collected via the statistic model and then processed.
* Therefore, class statistic can be seen as a view controller.
* Dropdown menu in questionstable on overview tab.
*
* @package mod_pdfannotator
* @copyright 2018 RWTH Aachen (see README.md)
......@@ -33,6 +31,12 @@ class questionmenu implements \renderable, \templatable {
private $label;
private $buttonclass;
/**
* Constructor of renderable for dropdown menu in questionstable.
*
* @param int $commentid Id of the question
* @param array $urlparams Parameters for the link
*/
public function __construct($commentid, $urlparams) {
global $CFG;
......
......@@ -15,9 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* The purpose of this script is to collect the output data for the statistic template and
* make it available to the renderer. The data is collected via the statistic model and then processed.
* Therefore, class statistic can be seen as a view controller.
* Dropdown menu in reportstable on overview tab.
*
* @package mod_pdfannotator
* @copyright 2018 RWTH Aachen (see README.md)
......@@ -32,6 +30,15 @@ class reportmenu implements \renderable, \templatable {
private $iconclass;
private $label;
/**
* Constructor of renderable for dropdown menu in reportstable.
* @global type $CFG
* @param object $report Report object
* @param int $cmid Course module id
* @param int $currentpage Page of the table on overviewpage
* @param int $itemsperpage Number of entries on every page in the table
* @param int $reportfilter Value of the filter for the answerstable
*/
public function __construct($report, $cmid, $currentpage, $itemsperpage, $reportfilter) {
global $CFG;
if ($report->seen == 0) {
......
......@@ -35,6 +35,15 @@ class statistics implements \renderable, \templatable {
private $isteacher;
private $tabledata;
/**
* Constructor of renderable for statistics tab.
* @global type $USER
* @global type $PAGE
* @param int $annotatorid Id of the annotator
* @param int $courseid ID of the course
* @param object $capabilities Some of the capabilities the user has-
* @param int $id Course module id
*/
public function __construct($annotatorid, $courseid, $capabilities, $id) {
global $USER, $PAGE;
$userid = $USER->id;
......
......@@ -440,7 +440,7 @@ function xmldb_pdfannotator_upgrade($oldversion) {
}
// Pdfannotator savepoint reached.
upgrade_mod_savepoint(true, 2018111602, 'pdfannotator');
upgrade_mod_savepoint(true, 2018092400, 'pdfannotator');
}
if ($oldversion < 2018103000) {
......@@ -455,21 +455,6 @@ function xmldb_pdfannotator_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2018103000, 'pdfannotator');
}
if ($oldversion < 2018112203) {
// Define field solved to be added to pdfannotator_comments.
$table = new xmldb_table('pdfannotator_comments');
$field = new xmldb_field('solved', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'seen');
// Conditionally launch add field solved.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Pdfannotator savepoint reached.
upgrade_mod_savepoint(true, 2018112203, 'pdfannotator');
}
if ($oldversion < 2018111901) {
// Changing the default of field useprint on table pdfannotator to 0.
......@@ -485,6 +470,21 @@ function xmldb_pdfannotator_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2018111901, 'pdfannotator');
}
if ($oldversion < 2018112203) {
// Define field solved to be added to pdfannotator_comments.
$table = new xmldb_table('pdfannotator_comments');
$field = new xmldb_field('solved', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'seen');
// Conditionally launch add field solved.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Pdfannotator savepoint reached.
upgrade_mod_savepoint(true, 2018112203, 'pdfannotator');
}
if ($oldversion < 2018112100) {
// Define field modifiedby to be added to pdfannotator_annotations.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment