Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-30999 grade: updated Grade API phpdocs

  • Loading branch information...
commit a153c9f2fe1fe77a1a0fb86408a5ff2e97513be6 1 parent 5fc420e
@andyjdavis andyjdavis authored
Showing with 1,463 additions and 823 deletions.
  1. +8 −1 grade/edit/letter/edit_form.php
  2. +1 −2  grade/edit/letter/index.php
  3. +8 −1 grade/edit/letter/tabs.php
  4. +8 −1 grade/edit/outcome/course.php
  5. +1 −2  grade/edit/outcome/edit.php
  6. +8 −1 grade/edit/outcome/edit_form.php
  7. +7 −2 grade/edit/outcome/export.php
  8. +8 −1 grade/edit/outcome/import.php
  9. +8 −1 grade/edit/outcome/import_outcomes_form.php
  10. +1 −2  grade/edit/outcome/index.php
  11. +8 −1 grade/edit/outcome/tabs.php
  12. +8 −1 grade/edit/scale/edit.php
  13. +8 −1 grade/edit/scale/edit_form.php
  14. +8 −1 grade/edit/scale/index.php
  15. +8 −1 grade/edit/settings/form.php
  16. +8 −1 grade/edit/settings/index.php
  17. +8 −1 grade/edit/tree/action.php
  18. +8 −1 grade/edit/tree/calculation.php
  19. +8 −1 grade/edit/tree/calculation_form.php
  20. +8 −1 grade/edit/tree/category.php
  21. +8 −1 grade/edit/tree/category_form.php
  22. +8 −1 grade/edit/tree/grade.php
  23. +8 −1 grade/edit/tree/grade_form.php
  24. +2 −3 grade/edit/tree/index.php
  25. +9 −1 grade/edit/tree/item.php
  26. +8 −1 grade/edit/tree/item_form.php
  27. +8 −1 grade/edit/tree/lib.php
  28. +8 −1 grade/edit/tree/outcomeitem.php
  29. +8 −1 grade/edit/tree/outcomeitem_form.php
  30. +1 −2  grade/grading/manage.php
  31. +1 −2  grade/grading/pick.php
  32. +6 −3 grade/index.php
  33. +6 −7 grade/lib.php
  34. +26 −16 grade/querylib.php
  35. +7 −1 grade/report/grader/ajax_callbacks.php
  36. +8 −1 grade/report/grader/db/access.php
  37. +8 −1 grade/report/grader/index.php
  38. +1 −1  grade/report/grader/lang/en/gradereport_grader.php
  39. +6 −4 grade/report/grader/lib.php
  40. +8 −1 grade/report/grader/preferences.php
  41. +2 −5 grade/report/grader/preferences_form.php
  42. +8 −1 grade/report/grader/quickedit_item.php
  43. +8 −1 grade/report/grader/settings.php
  44. +8 −1 grade/report/grader/tabs.php
  45. +2 −3 grade/report/grader/version.php
  46. +8 −1 grade/report/index.php
  47. +6 −5 grade/report/lib.php
  48. +8 −1 grade/report/outcomes/db/access.php
  49. +8 −1 grade/report/outcomes/index.php
  50. +1 −1  grade/report/outcomes/lang/en/gradereport_outcomes.php
  51. +2 −3 grade/report/outcomes/version.php
  52. +8 −1 grade/report/overview/db/access.php
  53. +8 −1 grade/report/overview/index.php
  54. +1 −2  grade/report/overview/lang/en/gradereport_overview.php
  55. +6 −4 grade/report/overview/lib.php
  56. +3 −4 grade/report/overview/renderer.php
  57. +7 −2 grade/report/overview/settings.php
  58. +2 −3 grade/report/overview/version.php
  59. +8 −1 grade/report/user/db/access.php
  60. +8 −1 grade/report/user/index.php
  61. +1 −2  grade/report/user/lang/en/gradereport_user.php
  62. +6 −4 grade/report/user/lib.php
  63. +2 −3 grade/report/user/renderer.php
  64. +7 −2 grade/report/user/settings.php
  65. +2 −3 grade/report/user/version.php
  66. +188 −12 lib/grade/constants.php
  67. +120 −122 lib/grade/grade_category.php
  68. +80 −55 lib/grade/grade_grade.php
  69. +192 −121 lib/grade/grade_item.php
  70. +75 −34 lib/grade/grade_object.php
  71. +43 −21 lib/grade/grade_outcome.php
  72. +35 −14 lib/grade/grade_scale.php
  73. +18 −27 lib/grade/simpletest/testgradecategory.php
  74. +18 −27 lib/grade/simpletest/testgradegrades.php
  75. +18 −27 lib/grade/simpletest/testgradeitem.php
  76. +18 −27 lib/grade/simpletest/testgradeoutcome.php
  77. +18 −27 lib/grade/simpletest/testgradescale.php
  78. +126 −122 lib/gradelib.php
  79. +27 −1 mod/assignment/grade.php
  80. +18 −8 mod/assignment/lib.php
  81. +5 −6 mod/data/lib.php
  82. +7 −8 mod/forum/lib.php
  83. +12 −14 mod/glossary/lib.php
  84. +5 −6 mod/lesson/grade.php
  85. +3 −4 mod/lesson/lib.php
  86. +2 −0  mod/lti/lib.php
  87. +4 −4 mod/quiz/grade.php
  88. +5 −1 mod/quiz/lib.php
  89. +9 −0 mod/scorm/grade.php
  90. +3 −5 mod/scorm/lib.php
  91. +1 −0  mod/workshop/lib.php
View
9 grade/edit/letter/edit_form.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * A moodleform for editing grade letters
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
View
3  grade/edit/letter/index.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -18,7 +17,7 @@
/**
* List of grade letters.
*
- * @package moodlecore
+ * @package core_grades
* @copyright 2008 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
9 grade/edit/letter/tabs.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Prints navigation tabs for viewing and editing grade letters
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
$row = $tabs = array();
$row[] = new tabobject('lettersview',
View
9 grade/edit/outcome/course.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * A page for selecting outcomes for use in a course
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../../config.php';
require_once $CFG->dirroot.'/grade/lib.php';
require_once $CFG->libdir.'/gradelib.php';
View
3  grade/edit/outcome/edit.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -18,7 +17,7 @@
/**
* Edit page for grade outcomes.
*
- * @package moodlecore
+ * @package core_grades
* @copyright 2008 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
9 grade/edit/outcome/edit_form.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Edit form for grade outcomes
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
View
9 grade/edit/outcome/export.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,7 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
- // Exports selected outcomes in CSV format.
+/**
+ * Exports selected outcomes in CSV format
+ *
+ * @package core_grades
+ * @copyright 2008 Moodle Pty Ltd (http://moodle.com)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
require_once '../../../config.php';
require_once $CFG->dirroot.'/grade/lib.php';
View
9 grade/edit/outcome/import.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Import outcomes from a file
+ *
+ * @package core_grades
+ * @copyright 2008 Moodle Pty Ltd (http://moodle.com)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once(dirname(__FILE__).'/../../../config.php');
require_once($CFG->dirroot.'/lib/formslib.php');
require_once($CFG->dirroot.'/grade/lib.php');
View
9 grade/edit/outcome/import_outcomes_form.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * A form to allow importing outcomes from a file
+ *
+ * @package core_grades
+ * @copyright 2008 Moodle Pty Ltd (http://moodle.com)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
View
3  grade/edit/outcome/index.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -18,7 +17,7 @@
/**
* Listing page for grade outcomes.
*
- * @package moodlecore
+ * @package core_grades
* @copyright 2008 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
9 grade/edit/outcome/tabs.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Prints navigation tabs for viewing and editing grade outcomes
+ *
+ * @package core_grades
+ * @copyright 2009 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
$row = $tabs = array();
$coursecontext = get_context_instance(CONTEXT_COURSE, $courseid);
View
9 grade/edit/scale/edit.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Edit page for grade scales
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../../config.php';
require_once $CFG->dirroot.'/grade/lib.php';
require_once $CFG->dirroot.'/grade/report/lib.php';
View
9 grade/edit/scale/edit_form.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Edit form for grade scales
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
View
9 grade/edit/scale/index.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * A page for managing custom and standard scales
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../../config.php';
require_once $CFG->dirroot.'/grade/lib.php';
require_once $CFG->libdir.'/gradelib.php';
View
9 grade/edit/settings/form.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * A form for editing course grade settings
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
View
9 grade/edit/settings/index.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * A page for editing course grade settings
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../../config.php';
require_once $CFG->dirroot.'/grade/lib.php';
require_once $CFG->libdir.'/gradelib.php';
View
9 grade/edit/tree/action.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Performs actions on grade items and categories like hiding and locking
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../../config.php';
require_once $CFG->dirroot.'/grade/lib.php';
View
9 grade/edit/tree/calculation.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Edit a calculated grade item
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../../config.php';
require_once $CFG->dirroot.'/grade/lib.php';
require_once $CFG->libdir.'/mathslib.php';
View
9 grade/edit/tree/calculation_form.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * A moodleform to allow the editing of a calculated grade item
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
View
9 grade/edit/tree/category.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Edit the grade options for an individual grade category
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../../config.php';
require_once $CFG->dirroot.'/grade/lib.php';
require_once $CFG->dirroot.'/grade/report/lib.php';
View
9 grade/edit/tree/category_form.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * A moodleform to edit the grade options for an individual grade category
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
View
9 grade/edit/tree/grade.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Edit a user's grade for a particular activity
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../../config.php';
require_once $CFG->dirroot.'/grade/lib.php';
require_once $CFG->dirroot.'/grade/report/lib.php';
View
9 grade/edit/tree/grade_form.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * A moodleform to allow the editing of a user's grade for a particular activity
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
View
5 grade/edit/tree/index.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Edit and review page for grade categories and items.
+ * Edit and review page for grade categories and items
*
- * @package moodlecore
+ * @package core_grades
* @copyright 2008 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
10 grade/edit/tree/item.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,15 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Edit the grade options for an individual grade item
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
require_once '../../../config.php';
require_once $CFG->dirroot.'/grade/lib.php';
require_once $CFG->dirroot.'/grade/report/lib.php';
View
9 grade/edit/tree/item_form.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * A moodleform allowing the editing of the grade options for an individual grade item
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
View
9 grade/edit/tree/lib.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * A library of classes used by the grade edit pages
+ *
+ * @package core_grades
+ * @copyright 2009 Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
class grade_edit_tree {
public $columns = array();
View
9 grade/edit/tree/outcomeitem.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * A page to create or edit outcome grade items
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../../config.php';
require_once $CFG->dirroot.'/grade/lib.php';
require_once $CFG->dirroot.'/grade/report/lib.php';
View
9 grade/edit/tree/outcomeitem_form.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * A moodleform to allow the creation and editing of outcome grade items
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
View
3  grade/grading/manage.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -22,7 +21,7 @@
* area, provides access to the plugin editor and allows user to save the
* current form as a template or re-use some existing form.
*
- * @package core
+ * @package core_grades
* @subpackage grading
* @copyright 2011 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
View
3  grade/grading/pick.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -18,7 +17,7 @@
/**
* Allows to choose a form from the list of available templates
*
- * @package core
+ * @package core_grades
* @subpackage grading
* @copyright 2011 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
View
9 grade/index.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,8 +14,12 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-/*
- * Compatibility redirection to reports
+/**
+ * This page is provided for compatability and redirects the user to the default grade report
+ *
+ * @package core_grades
+ * @copyright 2005 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once '../config.php';
View
13 grade/lib.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -18,7 +17,7 @@
/**
* Functions used by gradebook plugins and reports.
*
- * @package moodlecore
+ * @package core_grades
* @copyright 2009 Petr Skoda and Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -563,7 +562,7 @@ function grade_get_plugin_info($courseid, $active_type, $active_plugin) {
* A simple class containing info about grade plugins.
* Can be subclassed for special rules
*
- * @package moodlecore
+ * @package core_grades
* @copyright 2009 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -694,7 +693,7 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null,
/**
* Utility class used for return tracking when using edit and other forms in grade plugins
*
- * @package moodlecore
+ * @package core_grades
* @copyright 2009 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -1000,7 +999,7 @@ function grade_build_nav($path, $pagename=null, $id=null) {
/**
* General structure representing grade items in course
*
- * @package moodlecore
+ * @package core_grades
* @copyright 2009 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -1557,7 +1556,7 @@ public function get_calculation_icon($element, $gpr) {
* Flat structure similar to grade tree.
*
* @uses grade_structure
- * @package moodlecore
+ * @package core_grades
* @copyright 2009 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -1694,7 +1693,7 @@ public function locate_element($eid) {
* deletion and moving of items and categories within the tree.
*
* @uses grade_structure
- * @package moodlecore
+ * @package core_grades
* @copyright 2009 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
42 grade/querylib.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,11 +15,21 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Returns the aggregated or calculated course grade(s) in given course.
- * @public
- * @param int $courseid id of course
- * @param int $userid_or_ids optional id of the graded user or array of ids; if userid not used, returns only information about grade_item
- * @return information about course grade item scaleid, name, grade and locked status, etc. + user grades
+ * Functions used to retrieve grades objects
+ *
+ * @package core_grades
+ * @category grade
+ * @copyright 2008 Petr Skoda and Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+/**
+ * Returns the aggregated or calculated course grade(s) for a single course for one or more users
+ *
+ * @param int $courseid The ID of course
+ * @param int|array $userid_or_ids Optional ID of the graded user or array of user IDs; if userid not used, returns only information about grade_item
+ * @return stdClass Returns an object containing information about course grade item. scaleid, name, grade
+ * and locked status etc and user course grades: $item->grades[$userid] => $usercoursegrade
*/
function grade_get_course_grades($courseid, $userid_or_ids=null) {
@@ -118,10 +127,10 @@ function grade_get_course_grades($courseid, $userid_or_ids=null) {
}
/**
- * Returns the aggregated or calculated course grade for the given user(s).
- * @public
- * @param int $userid
- * @param int $courseid optional id of course or array of ids, empty means all uses courses (returns array if not present)
+ * Returns the aggregated or calculated course grade for a single user for one or more courses
+ *
+ * @param int $userid The ID of the single user
+ * @param int|array $courseid_or_ids Optional ID of course or array of IDs, empty means all of the user's courses
* @return mixed grade info or grades array including item info, false if error
*/
function grade_get_course_grade($userid, $courseid_or_ids=null) {
@@ -233,8 +242,9 @@ function grade_get_course_grade($userid, $courseid_or_ids=null) {
/**
* Returns all grade items (including outcomes) or main item for a given activity identified by $cm object.
*
- * @param object $cm A course module object (preferably with modname property)
- * @return mixed - array of grade item instances (one if $only_main_item true), false if error or not found
+ * @param cm_info $cm A course module object (preferably with modname property)
+ * @param bool $only_main_item Limit the search to the primary grade item for the activity, 'itemnumber'==0
+ * @return mixed An array of grade item instances, one grade item if $only_main_item == true, false if error or not found
*/
function grade_get_grade_items_for_activity($cm, $only_main_item=false) {
global $CFG, $DB;
@@ -261,11 +271,11 @@ function grade_get_grade_items_for_activity($cm, $only_main_item=false) {
}
/**
- * Returns whether or not user received grades in main grade item for given activity.
+ * Returns whether or not a user received grades in main grade item for given activity
*
- * @param object $cm
- * @param int $userid
- * @return bool True if graded false if user not graded yet
+ * @param cm_info $cm The activity context module
+ * @param int $userid The user ID
+ * @return bool True if graded, false if user not graded yet
*/
function grade_is_user_graded_in_activity($cm, $userid) {
View
8 grade/report/grader/ajax_callbacks.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,13 @@
// 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 receives ajax callbacks for the grader report
+ *
+ * @package gradereport_grader
+ * @copyright 2008 Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
require_once '../../../config.php';
require_once $CFG->libdir.'/gradelib.php';
View
9 grade/report/grader/db/access.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Capability definition for the gradebook grader report
+ *
+ * @package gradereport_grader
+ * @copyright 2007 Moodle Pty Ltd (http://moodle.com)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
$capabilities = array(
'gradereport/grader:view' => array(
View
9 grade/report/grader/index.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * The gradebook grader report
+ *
+ * @package gradereport_grader
+ * @copyright 2007 Moodle Pty Ltd (http://moodle.com)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../../config.php';
require_once $CFG->libdir.'/gradelib.php';
require_once $CFG->dirroot.'/grade/lib.php';
View
2  grade/report/grader/lang/en/gradereport_grader.php
@@ -16,7 +16,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Strings for component 'gradereport_grader', language 'en', branch 'MOODLE_20_STABLE'
+ * Strings for component 'gradereport_grader', language 'en'
*
* @package gradereport_grader
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
View
10 grade/report/grader/lib.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,8 +15,11 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * File in which the grader_report class is defined.
- * @package gradebook
+ * Definition of the grader report class
+ *
+ * @package gradereport_grader
+ * @copyright 2007 Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/grade/report/lib.php');
@@ -26,7 +28,7 @@
/**
* Class providing an API for the grader report building and displaying.
* @uses grade_report
- * @package gradebook
+ * @package gradereport_grader
*/
class grade_report_grader extends grade_report {
/**
View
9 grade/report/grader/preferences.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Grader report preferences configuration page
+ *
+ * @package gradereport_grader
+ * @copyright 2007 Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
set_time_limit(0);
require_once '../../../config.php';
require_once $CFG->libdir . '/gradelib.php';
View
7 grade/report/grader/preferences_form.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,12 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
- * Form for grader report preferences.
+ * Form for grader report preferences
*
- * @package moodlecore
- * @subpackage grade
+ * @package gradereport_grader
* @copyright 2009 Nicolas Connault
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
9 grade/report/grader/quickedit_item.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Allow the editing of grades for a grade item
+ *
+ * @package gradereport_grader
+ * @copyright 2009 Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../../config.php';
require_once $CFG->libdir.'/gradelib.php';
require_once $CFG->dirroot.'/grade/lib.php';
View
9 grade/report/grader/settings.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Defines site config settings for the grader report
+ *
+ * @package gradereport_grader
+ * @copyright 2007 Moodle Pty Ltd (http://moodle.com)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
defined('MOODLE_INTERNAL') || die;
if ($ADMIN->fulltree) {
View
9 grade/report/grader/tabs.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Outputs navigation tabs for the grader report
+ *
+ * @package gradereport_grader
+ * @copyright 2007 2009 Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
$row = $tabs = array();
$tabcontext = get_context_instance(CONTEXT_COURSE, $COURSE->id);
$row[] = new tabobject('graderreport',
View
5 grade/report/grader/version.php
@@ -15,10 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Version details
+ * Version details for the grader report
*
- * @package gradereport
- * @subpackage grader
+ * @package gradereport_grader
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
9 grade/report/index.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Redirects the user to the default grade report
+ *
+ * @package core_grades
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../config.php';
$courseid = required_param('id', PARAM_INT);
View
11 grade/report/lib.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,16 +15,18 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * File containing the grade_report class.
- * @package gradebook
+ * File containing the grade_report class
+ *
+ * @package core_grades
+ * @copyright 2007 Moodle Pty Ltd (http://moodle.com)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->libdir.'/gradelib.php');
/**
* An abstract class containing variables and methods used by all or most reports.
- * @abstract
- * @package gradebook
+ * @package core_grades
*/
abstract class grade_report {
/**
View
9 grade/report/outcomes/db/access.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Defines capabilities for the outcomes report
+ *
+ * @package gradereport_outcomes
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
$capabilities = array(
'gradereport/outcomes:view' => array(
View
9 grade/report/outcomes/index.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * The gradebook outcomes report
+ *
+ * @package gradereport_outcomes
+ * @copyright 2007 Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
include_once('../../../config.php');
require_once($CFG->libdir . '/gradelib.php');
require_once $CFG->dirroot.'/grade/lib.php';
View
2  grade/report/outcomes/lang/en/gradereport_outcomes.php
@@ -16,7 +16,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Strings for component 'gradereport_outcomes', language 'en', branch 'MOODLE_20_STABLE'
+ * Strings for component 'gradereport_outcomes', language 'en'
*
* @package gradereport_outcomes
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
View
5 grade/report/outcomes/version.php
@@ -15,10 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Version details
+ * Version details for the outcomes report
*
- * @package gradereport
- * @subpackage outcomes
+ * @package gradereport_outcomes
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
9 grade/report/overview/db/access.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Defines capabilities for the overview report
+ *
+ * @package gradereport_overview
+ * @copyright 2007 Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
$capabilities = array(
'gradereport/overview:view' => array(
View
9 grade/report/overview/index.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * The gradebook overview report
+ *
+ * @package gradereport_overview
+ * @copyright 2007 Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../../config.php';
require_once $CFG->libdir.'/gradelib.php';
require_once $CFG->dirroot.'/grade/lib.php';
View
3  grade/report/overview/lang/en/gradereport_overview.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,7 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Strings for component 'gradereport_overview', language 'en', branch 'MOODLE_20_STABLE'
+ * Strings for component 'gradereport_overview', language 'en'
*
* @package gradereport_overview
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
View
10 grade/report/overview/lib.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,8 +15,11 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * File in which the overview_report class is defined.
- * @package gradebook
+ * Definition of the grade_overview_report class
+ *
+ * @package gradereport_overview
+ * @copyright 2007 Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/grade/report/lib.php');
@@ -26,7 +28,7 @@
/**
* Class providing an API for the overview report building and displaying.
* @uses grade_report
- * @package gradebook
+ * @package gradereport_overview
*/
class grade_report_overview extends grade_report {
View
7 grade/report/overview/renderer.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Renderer for the grade user report
+ * Renderer for the gradebook overview report
*
- * @package moodlecore
+ * @package gradereport_overview
* @copyright 2010 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -44,4 +43,4 @@ public function graded_users_selector($report, $course, $userid, $groupid, $incl
return $output;
}
-}
+}
View
9 grade/report/overview/settings.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,7 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-/// Add settings for this module to the $settings object (it's already defined)
+/**
+ * Defines site settings for the overview gradebook report
+ *
+ * @package gradereport_overview
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
defined('MOODLE_INTERNAL') || die;
View
5 grade/report/overview/version.php
@@ -15,10 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Version details
+ * Version details for the overview gradebook report
*
- * @package gradereport
- * @subpackage overview
+ * @package gradereport_overview
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
9 grade/report/user/db/access.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Defines capabilities for the user report
+ *
+ * @package gradereport_user
+ * @copyright 2007 onwards Martin Dougiamas (http://dougiamas.com)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
$capabilities = array(
'gradereport/user:view' => array(
View
9 grade/report/user/index.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * The gradebook user report
+ *
+ * @package gradereport_user
+ * @copyright 2007 Moodle Pty Ltd (http://moodle.com)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
require_once '../../../config.php';
require_once $CFG->libdir.'/gradelib.php';
require_once $CFG->dirroot.'/grade/lib.php';
View
3  grade/report/user/lang/en/gradereport_user.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,7 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Strings for component 'gradereport_user', language 'en', branch 'MOODLE_20_STABLE'
+ * Strings for component 'gradereport_user', language 'en'
*
* @package gradereport_user
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
View
10 grade/report/user/lib.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -16,8 +15,11 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * File in which the user_report class is defined.
- * @package gradebook
+ * Definition of the grade_user_report class is defined
+ *
+ * @package gradereport_user
+ * @copyright 2007 Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/grade/report/lib.php');
@@ -31,7 +33,7 @@
/**
* Class providing an API for the user report building and displaying.
* @uses grade_report
- * @package gradebook
+ * @package gradereport_user
*/
class grade_report_user extends grade_report {
View
5 grade/report/user/renderer.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -18,7 +17,7 @@
/**
* Renderer for the grade user report
*
- * @package moodlecore
+ * @package gradereport_user
* @copyright 2010 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -44,4 +43,4 @@ public function graded_users_selector($report, $course, $userid, $groupid, $incl
return $output;
}
-}
+}
View
9 grade/report/user/settings.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,7 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-/// Add settings for this module to the $settings object (it's already defined)
+/**
+ * Defines site settings for the user gradebook report
+ *
+ * @package gradereport_user
+ * @copyright 2007 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
defined('MOODLE_INTERNAL') || die;
View
5 grade/report/user/version.php
@@ -15,10 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Version details
+ * Version details for the user gradebook report
*
- * @package gradereport
- * @subpackage user
+ * @package gradereport_user
* @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
200 lib/grade/constants.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -14,76 +13,253 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
/**
* Definitions of constants for gradebook
*
- * @package core
- * @subpackage grade
- * @copyright 2007 Nicolas Connault
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core_grades
+ * @category grade
+ * @copyright 2007 Nicolas Connault
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
-// category aggregation types
+// Category aggregation types
+
+/**
+ * GRADE_AGGREGATE_MEAN - Use the category mean for grade aggregation.
+ */
define('GRADE_AGGREGATE_MEAN', 0);
+
+/**
+ * GRADE_AGGREGATE_MEDIAN - Use the category median for grade aggregation.
+ */
define('GRADE_AGGREGATE_MEDIAN', 2);
+
+/**
+ * GRADE_AGGREGATE_MIN - Use the category minimum grade for grade aggregation.
+ */
define('GRADE_AGGREGATE_MIN', 4);
+
+/**
+ * GRADE_AGGREGATE_MAX - Use the category maximum grade for grade aggregation.
+ */
define('GRADE_AGGREGATE_MAX', 6);
+
+/**
+ * GRADE_AGGREGATE_MEDIAN - Use the category mode for grade aggregation.
+ */
define('GRADE_AGGREGATE_MODE', 8);
+
+/**
+ * GRADE_AGGREGATE_WEIGHTED_MEAN - Use a weighted mean of grades in the category for grade aggregation. Weights can be manually set.
+ */
define('GRADE_AGGREGATE_WEIGHTED_MEAN', 10);
+
+/**
+ * GRADE_AGGREGATE_WEIGHTED_MEAN2 - Use a simple weighted mean of grades in the category for grade aggregation.
+ */
define('GRADE_AGGREGATE_WEIGHTED_MEAN2', 11);
+
+/**
+ * GRADE_AGGREGATE_EXTRACREDIT_MEAN - Use the category mean for grade aggregation and include support for extra credit.
+ */
define('GRADE_AGGREGATE_EXTRACREDIT_MEAN', 12);
+
+/**
+ * GRADE_AGGREGATE_WEIGHTED_MEAN2 - Use the sum of grades in the category for grade aggregation.
+ */
define('GRADE_AGGREGATE_SUM', 13);
-// grade types
+// Grade types
+
+/**
+ * GRADE_TYPE_NONE - Ungraded.
+ */
define('GRADE_TYPE_NONE', 0);
+
+/**
+ * GRADE_TYPE_NONE - The grade is a numeric value
+ */
define('GRADE_TYPE_VALUE', 1);
+
+/**
+ * GRADE_TYPE_NONE - The grade is a value from the set of values available in a grade scale.
+ */
define('GRADE_TYPE_SCALE', 2);
+
+/**
+ * GRADE_TYPE_NONE - Feedback only.
+ */
define('GRADE_TYPE_TEXT', 3);
+
// grade_update() return status
+
+/**
+ * GRADE_UPDATE_OK - Grade updated completed successfully.
+ */
define('GRADE_UPDATE_OK', 0);
+
+/**
+ * GRADE_UPDATE_FAILED - Grade updated failed.
+ */
define('GRADE_UPDATE_FAILED', 1);
+
+/**
+ * GRADE_UPDATE_MULTIPLE - Grade update failed because there are multiple grade items with the same itemnumber for this activity.
+ */
define('GRADE_UPDATE_MULTIPLE', 2);
+
+/**
+ * GRADE_UPDATE_DELETED - Grade item deleted (MDL-31362)
+ */
define('GRADE_UPDATE_ITEM_DELETED', 3);
+
+/**
+ * GRADE_UPDATE_DELETED - Grade item cannot be updated as it is locked
+ */
define('GRADE_UPDATE_ITEM_LOCKED', 4);
+
// Grade tables history tracking actions
+
+/**
+ * GRADE_HISTORY_INSERT - A grade item was inserted
+ */
define('GRADE_HISTORY_INSERT', 1);
+
+/**
+ * GRADE_HISTORY_UPDATE - A grade item was updated
+ */
define('GRADE_HISTORY_UPDATE', 2);
+
+/**
+ * GRADE_HISTORY_INSERT - A grade item was deleted
+ */
define('GRADE_HISTORY_DELETE', 3);
// Display style constants
+
+/**
+ * GRADE_DISPLAY_TYPE_DEFAULT - Grade display type can be set at 3 levels: grade_item, course setting and site. Use the display type from the higher level.
+ */
define('GRADE_DISPLAY_TYPE_DEFAULT', 0);
+
+/**
+ * GRADE_DISPLAY_TYPE_REAL - Display the grade as a decimal number.
+ */
define('GRADE_DISPLAY_TYPE_REAL', 1);
+
+/**
+ * GRADE_DISPLAY_TYPE_PERCENTAGE - Display the grade as a percentage.
+ */
define('GRADE_DISPLAY_TYPE_PERCENTAGE', 2);
+
+/**
+ * GRADE_DISPLAY_TYPE_LETTER - Display the grade as a letter grade. For example, A, B, C, D or F.
+ */
define('GRADE_DISPLAY_TYPE_LETTER', 3);
+
+/**
+ * GRADE_DISPLAY_TYPE_REAL_PERCENTAGE - Display the grade as a decimal number and a percentage.
+ */
define('GRADE_DISPLAY_TYPE_REAL_PERCENTAGE', 12);
+
+/**
+ * GRADE_DISPLAY_TYPE_REAL_LETTER - Display the grade as a decimal number and a letter grade.
+ */
define('GRADE_DISPLAY_TYPE_REAL_LETTER', 13);
+
+/**
+ * GRADE_DISPLAY_TYPE_LETTER_REAL - Display the grade as a letter grade and a decimal number.
+ */
define('GRADE_DISPLAY_TYPE_LETTER_REAL', 31);
+
+/**
+ * GRADE_DISPLAY_TYPE_LETTER_PERCENTAGE - Display the grade as a letter grade and a percentage.
+ */
define('GRADE_DISPLAY_TYPE_LETTER_PERCENTAGE', 32);
+
+/**
+ * GRADE_DISPLAY_TYPE_PERCENTAGE_LETTER - Display the grade as a percentage and a letter grade.
+ */
define('GRADE_DISPLAY_TYPE_PERCENTAGE_LETTER', 23);
+
+/**
+ * GRADE_DISPLAY_TYPE_PERCENTAGE_REAL - Display the grade as a percentage and a decimal number.
+ */
define('GRADE_DISPLAY_TYPE_PERCENTAGE_REAL', 21);
+/**
+ * GRADE_REPORT_AGGREGATION_POSITION_FIRST - Display the course totals before the individual activity grades
+ */
define('GRADE_REPORT_AGGREGATION_POSITION_FIRST', 0);
+
+/**
+ * GRADE_REPORT_AGGREGATION_POSITION_LAST - Display the course totals after the individual activity grades
+ */
define('GRADE_REPORT_AGGREGATION_POSITION_LAST', 1);
+
+// These constants dont seem to be in use (MDL-31363)
define('GRADE_REPORT_AGGREGATION_VIEW_FULL', 0);
define('GRADE_REPORT_AGGREGATION_VIEW_AGGREGATES_ONLY', 1);
define('GRADE_REPORT_AGGREGATION_VIEW_GRADES_ONLY', 2);
-//What to do if category or course total contains a hidden item
-define('GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN', 0);//hide the total from students
-define('GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN', 1);//show the total to students minus grades from the hidden items
-define('GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN', 2);//show students the real total including marks from hidden items
+// What to do if category or course total contains a hidden item
+
+/**
+ * GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN - If the category or course total contains a hidden item hide the total from students.
+ */
+define('GRADE_REPORT_HIDE_TOTAL_IF_CONTAINS_HIDDEN', 0);
+
+/**
+ * GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN - If the category or course total contains a hidden item show the total to students minus grades from the hidden items.
+ */
+define('GRADE_REPORT_SHOW_TOTAL_IF_CONTAINS_HIDDEN', 1);
-define('GRADE_REPORT_PREFERENCE_DEFAULT', 'default'); // means use setting from site preferences
+/**
+ * GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN - If the category or course total contains a hidden item show students the real total including marks from hidden items.
+ */
+define('GRADE_REPORT_SHOW_REAL_TOTAL_IF_CONTAINS_HIDDEN', 2);
+
+/**
+ * GRADE_REPORT_PREFERENCE_DEFAULT - Use the setting from site preferences.
+ */
+define('GRADE_REPORT_PREFERENCE_DEFAULT', 'default');
+
+/**
+ * GRADE_REPORT_PREFERENCE_INHERIT - Inherit the setting value from the parent.
+ */
define('GRADE_REPORT_PREFERENCE_INHERIT', 'inherit'); // means inherit from parent
+
+/**
+ * GRADE_REPORT_PREFERENCE_UNUSED - Unused constant.
+ */
define('GRADE_REPORT_PREFERENCE_UNUSED', -1);
+/**
+ * GRADE_REPORT_MEAN_ALL - Include all grade items including those where the student hasn't received a grade when calculating the mean.
+ */
define('GRADE_REPORT_MEAN_ALL', 0);
+
+/**
+ * GRADE_REPORT_MEAN_GRADED - Only include grade items where the student has a grade when calculating the mean.
+ */
define('GRADE_REPORT_MEAN_GRADED', 1);
+/**
+ * GRADE_NAVMETHOD_DROPDOWN - Display a drop down box to allow navigation within the gradebook
+ */
define('GRADE_NAVMETHOD_DROPDOWN', 0);
+
+/**
+ * GRADE_NAVMETHOD_TABS - Display tabs to allow navigation within the gradebook
+ */
define('GRADE_NAVMETHOD_TABS', 1);
+
+/**
+ * GRADE_NAVMETHOD_TABS - Display both a drop down and tabs to allow navigation within the gradebook
+ */
define('GRADE_NAVMETHOD_COMBO', 2);
View
242 lib/grade/grade_category.php
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -14,13 +13,13 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.