Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of git://git.moodle.org/moodle

  • Loading branch information...
commit c8802ce4068c7173807da4eb0bafcb37a24a6144 2 parents c0c175e + c4a12af
@pcharsle pcharsle authored
Showing with 8,323 additions and 4,237 deletions.
  1. +4 −1 admin/mnet/peer_forms.php
  2. +2 −0  admin/settings/grades.php
  3. +15 −15 admin/tool/customlang/lang/en/tool_customlang.php
  4. +1 −0  backup/cc/cc_includes.php
  5. +1 −1  backup/cc/cc_lib/cc_asssesment.php
  6. +4 −4 backup/cc/cc_lib/cc_basiclti.php
  7. +10 −1 backup/cc/cc_lib/cc_convert_moodle2.php
  8. +39 −0 backup/cc/cc_lib/cc_converter_label.php
  9. +2 −2 backup/cc/cc_lib/cc_forum.php
  10. +2 −2 backup/cc/cc_lib/cc_page.php
  11. +8 −14 backup/cc/cc_lib/cc_resources.php
  12. +1 −1  backup/cc/cc_lib/cc_weblink.php
  13. +12 −0 backup/cc/cc_lib/xmlbase.php
  14. +17 −6 backup/moodle2/backup_plan_builder.class.php
  15. +6 −0 backup/moodle2/restore_stepslib.php
  16. +3 −0  blocks/community/communitycourse.php
  17. +1 −0  blocks/dock.js
  18. +77 −8 blog/rsslib.php
  19. +3 −0  course/publish/backup.php
  20. +1 −1  enrol/ldap/lang/en/enrol_ldap.php
  21. +7 −1 enrol/manual/lib.php
  22. +6 −2 enrol/manual/yui/quickenrolment/quickenrolment.js
  23. +8 −1 grade/edit/letter/edit_form.php
  24. +1 −2  grade/edit/letter/index.php
  25. +8 −1 grade/edit/letter/tabs.php
  26. +8 −1 grade/edit/outcome/course.php
  27. +1 −2  grade/edit/outcome/edit.php
  28. +8 −1 grade/edit/outcome/edit_form.php
  29. +7 −2 grade/edit/outcome/export.php
  30. +8 −1 grade/edit/outcome/import.php
  31. +8 −1 grade/edit/outcome/import_outcomes_form.php
  32. +1 −2  grade/edit/outcome/index.php
  33. +8 −1 grade/edit/outcome/tabs.php
  34. +8 −1 grade/edit/scale/edit.php
  35. +8 −1 grade/edit/scale/edit_form.php
  36. +8 −1 grade/edit/scale/index.php
  37. +8 −1 grade/edit/settings/form.php
  38. +8 −1 grade/edit/settings/index.php
  39. +8 −1 grade/edit/tree/action.php
  40. +8 −1 grade/edit/tree/calculation.php
  41. +8 −1 grade/edit/tree/calculation_form.php
  42. +8 −1 grade/edit/tree/category.php
  43. +8 −1 grade/edit/tree/category_form.php
  44. +8 −1 grade/edit/tree/grade.php
  45. +8 −1 grade/edit/tree/grade_form.php
  46. +2 −3 grade/edit/tree/index.php
  47. +9 −1 grade/edit/tree/item.php
  48. +8 −1 grade/edit/tree/item_form.php
  49. +8 −1 grade/edit/tree/lib.php
  50. +8 −1 grade/edit/tree/outcomeitem.php
  51. +8 −1 grade/edit/tree/outcomeitem_form.php
  52. +2 −0  grade/grading/form/rubric/styles.css
  53. +1 −2  grade/grading/manage.php
  54. +1 −2  grade/grading/pick.php
  55. +6 −3 grade/index.php
  56. +6 −7 grade/lib.php
  57. +26 −16 grade/querylib.php
  58. +7 −1 grade/report/grader/ajax_callbacks.php
  59. +8 −1 grade/report/grader/db/access.php
  60. +8 −1 grade/report/grader/index.php
  61. +1 −1  grade/report/grader/lang/en/gradereport_grader.php
  62. +6 −4 grade/report/grader/lib.php
  63. +8 −1 grade/report/grader/preferences.php
  64. +2 −5 grade/report/grader/preferences_form.php
  65. +8 −1 grade/report/grader/quickedit_item.php
  66. +8 −1 grade/report/grader/settings.php
  67. +8 −1 grade/report/grader/tabs.php
  68. +2 −3 grade/report/grader/version.php
  69. +8 −1 grade/report/index.php
  70. +6 −5 grade/report/lib.php
  71. +8 −1 grade/report/outcomes/db/access.php
  72. +8 −1 grade/report/outcomes/index.php
  73. +1 −1  grade/report/outcomes/lang/en/gradereport_outcomes.php
  74. +2 −3 grade/report/outcomes/version.php
  75. +8 −1 grade/report/overview/db/access.php
  76. +8 −1 grade/report/overview/index.php
  77. +1 −2  grade/report/overview/lang/en/gradereport_overview.php
  78. +6 −4 grade/report/overview/lib.php
  79. +3 −4 grade/report/overview/renderer.php
  80. +7 −2 grade/report/overview/settings.php
  81. +2 −3 grade/report/overview/version.php
  82. +8 −1 grade/report/user/db/access.php
  83. +8 −1 grade/report/user/index.php
  84. +1 −2  grade/report/user/lang/en/gradereport_user.php
  85. +6 −4 grade/report/user/lib.php
  86. +2 −3 grade/report/user/renderer.php
  87. +7 −2 grade/report/user/settings.php
  88. +2 −3 grade/report/user/version.php
  89. +2 −2 group/assign.php
  90. +21 −6 group/autogroup.php
  91. +40 −4 group/autogroup_form.php
  92. +18 −3 group/clientlib.js
  93. +19 −4 group/delete.php
  94. +67 −45 group/externallib.php
  95. +19 −5 group/group.php
  96. +41 −8 group/group_form.php
  97. +19 −5 group/grouping.php
  98. +37 −8 group/grouping_form.php
  99. +1 −1  group/groupings.php
  100. +1 −1  group/import.php
  101. +32 −0 group/import_form.php
  102. +21 −7 group/index.php
  103. +62 −25 group/lib.php
  104. +19 −5 group/members.php
  105. +19 −4 group/overview.php
  106. +22 −0 group/tabs.php
  107. +1 −1  install/lang/ca/error.php
  108. +5 −5 install/lang/de/admin.php
  109. +1 −1  install/lang/it/admin.php
  110. +33 −0 install/lang/ka/moodle.php
  111. +34 −0 install/lang/lt/admin.php
  112. +1 −0  install/lang/lt/moodle.php
  113. +34 −0 install/lang/lt_uni/langconfig.php
  114. +2 −0  lang/en/backup.php
  115. +2 −0  lang/en/grades.php
  116. +4 −4 lang/en/langconfig.php
  117. +1 −0  lang/en/mnet.php
  118. +8 −11 lib/ajax/ajaxlib.php
  119. +1 −1  lib/ajax/getnavbranch.php
  120. +21 −27 lib/ajax/setuserpref.php
  121. +1 −1  lib/db/install.xml
  122. +42 −0 lib/db/upgrade.php
  123. +32 −10 lib/dml/database_column_info.php
  124. +332 −296 lib/dml/moodle_database.php
  125. +1 −0  lib/dml/moodle_recordset.php
  126. +8 −4 lib/dml/moodle_temptables.php
  127. +10 −1 lib/dml/moodle_transaction.php
  128. +33 −24 lib/dml/mssql_native_moodle_database.php
  129. +1 −1  lib/dml/mssql_native_moodle_recordset.php
  130. +1 −1  lib/dml/mssql_native_moodle_temptables.php
  131. +33 −24 lib/dml/mysqli_native_moodle_database.php
  132. +6 −1 lib/dml/mysqli_native_moodle_recordset.php
  133. +1 −1  lib/dml/mysqli_native_moodle_temptables.php
  134. +51 −31 lib/dml/oci_native_moodle_database.php
  135. +1 −1  lib/dml/oci_native_moodle_package.sql
  136. +1 −1  lib/dml/oci_native_moodle_recordset.php
  137. +1 −1  lib/dml/oci_native_moodle_temptables.php
  138. +16 −9 lib/dml/pdo_moodle_database.php
  139. +6 −1 lib/dml/pdo_moodle_recordset.php
  140. +32 −23 lib/dml/pgsql_native_moodle_database.php
  141. +8 −2 lib/dml/pgsql_native_moodle_recordset.php
  142. +1 −1  lib/dml/pgsql_native_moodle_temptables.php
  143. +9 −2 lib/dml/sqlite3_pdo_moodle_database.php
  144. +34 −25 lib/dml/sqlsrv_native_moodle_database.php
  145. +2 −2 lib/dml/sqlsrv_native_moodle_recordset.php
  146. +9 −4 lib/dml/sqlsrv_native_moodle_temptables.php
  147. +86 −33 lib/dmllib.php
  148. +58 −34 lib/form/advcheckbox.php
  149. +48 −30 lib/form/button.php
  150. +61 −14 lib/form/cancel.php
  151. +64 −18 lib/form/checkbox.php
  152. +69 −69 lib/form/dateselector.php
  153. +72 −73 lib/form/datetimeselector.php
  154. +72 −40 lib/form/duration.php
  155. +130 −9 lib/form/editor.php
  156. +55 −13 lib/form/file.php
  157. +113 −10 lib/form/filemanager.php
  158. +74 −4 lib/form/filepicker.php
  159. +39 −9 lib/form/format.php
  160. +31 −30 lib/form/grading.php
  161. +60 −15 lib/form/group.php
  162. +46 −16 lib/form/header.php
  163. +46 −10 lib/form/hidden.php
  164. +60 −8 lib/form/htmleditor.php
  165. +43 −15 lib/form/modgrade.php
  166. +41 −14 lib/form/modvisible.php
  167. +47 −9 lib/form/password.php
  168. +46 −4 lib/form/passwordunmask.php
  169. +33 −10 lib/form/questioncategory.php
  170. +57 −9 lib/form/radio.php
  171. +50 −24 lib/form/recaptcha.php
  172. +25 −6 lib/form/searchableselector.php
  173. +73 −22 lib/form/select.php
  174. +113 −185 lib/form/selectgroups.php
  175. +80 −24 lib/form/selectwithlink.php
  176. +41 −17 lib/form/selectyesno.php
  177. +54 −26 lib/form/simpletest/testduration.php
  178. +53 −9 lib/form/static.php
  179. +48 −12 lib/form/submit.php
  180. +52 −0 lib/form/submitlink.php
  181. +81 −36 lib/form/tags.php
  182. +60 −11 lib/form/text.php
  183. +65 −23 lib/form/textarea.php
  184. +61 −12 lib/form/url.php
  185. +59 −12 lib/form/warning.php
  186. +273 −260 lib/formslib.php
  187. +188 −12 lib/grade/constants.php
  188. +120 −122 lib/grade/grade_category.php
  189. +80 −55 lib/grade/grade_grade.php
  190. +192 −121 lib/grade/grade_item.php
  191. +75 −34 lib/grade/grade_object.php
  192. +43 −21 lib/grade/grade_outcome.php
  193. +35 −14 lib/grade/grade_scale.php
  194. +18 −27 lib/grade/simpletest/testgradecategory.php
  195. +18 −27 lib/grade/simpletest/testgradegrades.php
  196. +18 −27 lib/grade/simpletest/testgradeitem.php
  197. +18 −27 lib/grade/simpletest/testgradeoutcome.php
  198. +18 −27 lib/grade/simpletest/testgradescale.php
  199. +126 −122 lib/gradelib.php
  200. +51 −44 lib/grouplib.php
  201. +35 −35 lib/messagelib.php
  202. +72 −36 lib/moodlelib.php
  203. +37 −20 lib/outputactions.php
  204. +536 −331 lib/outputcomponents.php
  205. +43 −27 lib/outputfactories.php
  206. +122 −95 lib/outputlib.php
  207. +262 −92 lib/outputrenderers.php
  208. +88 −52 lib/outputrequirementslib.php
  209. +479 −183 lib/pagelib.php
  210. +2 −2 lib/pluginlib.php
  211. +120 −52 lib/rsslib.php
  212. +8 −8 lib/simpletest/testmoodlelib.php
  213. +4 −4 message/defaultoutputs.php
  214. +4 −6 message/discussion.php
  215. +3 −4 message/edit.php
  216. +14 −6 message/externallib.php
  217. +6 −4 message/index.php
  218. +12 −18 message/lib.php
  219. +25 −0 message/output/email/db/install.php
  220. +22 −26 message/output/email/db/upgrade.php
  221. +4 −5 message/output/email/lang/en/message_email.php
  222. +19 −28 message/output/email/lib.php
  223. +36 −34 message/output/email/message_output_email.php
  224. +4 −5 message/output/email/settings.php
  225. +2 −3 message/output/email/version.php
  226. +26 −0 message/output/jabber/db/install.php
  227. +22 −26 message/output/jabber/db/upgrade.php
  228. +4 −5 message/output/jabber/lang/en/message_jabber.php
  229. +17 −26 message/output/jabber/lib.php
  230. +35 −33 message/output/jabber/message_output_jabber.php
  231. +2 −3 message/output/jabber/settings.php
  232. +3 −4 message/output/jabber/version.php
  233. +66 −37 message/output/lib.php
  234. +25 −0 message/output/popup/db/install.php
  235. +22 −26 message/output/popup/db/upgrade.php
  236. +1 −2  message/output/popup/lang/en/message_popup.php
  237. +18 −27 message/output/popup/lib.php
  238. +30 −6 message/output/popup/message_output_popup.php
  239. +4 −5 message/output/popup/version.php
  240. +16 −16 message/renderer.php
  241. +33 −2 message/send_form.php
  242. +1 −1  mnet/peer.php
  243. +27 −1 mod/assignment/grade.php
  244. +32 −9 mod/assignment/lib.php
  245. +12 −0 mod/assignment/type/upload/assignment.class.php
  246. +12 −0 mod/assignment/type/uploadsingle/assignment.class.php
  247. +5 −6 mod/data/lib.php
  248. +43 −8 mod/data/rsslib.php
  249. +15 −12 mod/forum/lib.php
  250. +53 −23 mod/forum/rsslib.php
  251. +5 −4 mod/glossary/db/install.xml
  252. +15 −0 mod/glossary/db/upgrade.php
  253. +3 −4 mod/glossary/formats/entrylist/entrylist_format.php
  254. +3 −0  mod/glossary/lang/en/glossary.php
  255. +12 −14 mod/glossary/lib.php
  256. +6 −0 mod/glossary/mod_form.php
  257. +42 −6 mod/glossary/rsslib.php
  258. +2 −13 mod/glossary/showentry.php
  259. +1 −1  mod/glossary/version.php
  260. +5 −0 mod/glossary/view.php
  261. +39 −6 mod/lesson/backup/moodle2/restore_lesson_stepslib.php
  262. +5 −6 mod/lesson/grade.php
  263. +1 −0  mod/lesson/lang/en/lesson.php
  264. +6 −5 mod/lesson/lib.php
  265. +3 −13 mod/lesson/renderer.php
  266. +1 −0  mod/lesson/styles.css
  267. +2 −0  mod/lti/lib.php
  268. +4 −4 mod/quiz/grade.php
  269. +5 −1 mod/quiz/lib.php
  270. +4 −4 mod/scorm/datamodels/debug.js.php
  271. +0 −14 mod/scorm/datamodels/scorm_datamodels.js
  272. +9 −0 mod/scorm/grade.php
  273. +1 −1  mod/scorm/lang/en/scorm.php
  274. +4 −6 mod/scorm/lib.php
  275. +8 −19 mod/scorm/locallib.php
  276. +17 −12 mod/scorm/mod_form.php
  277. +5 −5 mod/scorm/module.js
  278. +0 −1  mod/scorm/report/basic/report.php
  279. +0 −1  mod/scorm/report/interactions/report.php
  280. +1 −0  mod/scorm/styles.css
  281. +1 −0  mod/workshop/lib.php
  282. +1 −1  repository/filepicker.js
  283. +17 −8 rss/file.php
  284. +14 −9 rss/renderer.php
  285. +6 −2 theme/afterburner/style/afterburner_layout.css
  286. +3 −3 theme/arialist/style/settings.css
  287. +2 −0  theme/standard/style/core.css
  288. +2 −2 version.php
  289. +11 −7 webservice/lib.php
  290. +17 −13 webservice/rest/locallib.php
  291. +0 −3  webservice/rest/server.php
  292. +1 −1  webservice/soap/locallib.php
View
5 admin/mnet/peer_forms.php
@@ -98,6 +98,7 @@ function definition() {
$mform->addElement('textarea', 'public_key', get_string('publickey', 'mnet'), array('rows' => 17, 'cols' => 100, 'class' => 'smalltext'));
$mform->setType('public_key', PARAM_PEM);
+ $mform->addRule('public_key', get_string('required'), 'required');
// finished with form controls, now the static informational stuff
if ($mnet_peer && !empty($mnet_peer->bootstrapped)) {
@@ -160,7 +161,9 @@ function validation($data) {
}
$mnet_peer = new mnet_peer(); // idiotic api
$mnet_peer->wwwroot = $data['wwwroot']; // just hard-set this rather than bootstrap the object
- if (!$credentials = $mnet_peer->check_credentials($data['public_key'])) {
+ if (empty($data['public_key'])) {
+ $errors['public_key'] = get_string('publickeyrequired', 'mnet');
+ } else if (!$credentials = $mnet_peer->check_credentials($data['public_key'])) {
$errmsg = '';
foreach ($mnet_peer->error as $err) {
$errmsg .= $err['code'] . ': ' . $err['text'].'<br />';
View
2  admin/settings/grades.php
@@ -58,6 +58,8 @@
GRADE_NAVMETHOD_TABS => new lang_string('tabs', 'grades'),
GRADE_NAVMETHOD_COMBO => new lang_string('combo', 'grades'))));
+ $temp->add(new admin_setting_configcheckbox('recovergradesdefault', new lang_string('recovergradesdefault', 'grades'), new lang_string('recovergradesdefault_help', 'grades'), 0));
+
$temp->add(new admin_setting_special_gradeexport());
$temp->add(new admin_setting_special_gradelimiting());
View
30 admin/tool/customlang/lang/en/tool_customlang.php
@@ -16,7 +16,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * Strings for Language customization admin tool
+ * Strings for Language customisation admin tool
*
* @package tool
* @subpackage customlang
@@ -26,36 +26,36 @@
defined('MOODLE_INTERNAL') || die();
-$string['checkin'] = 'Check in strings into disk';
-$string['checkout'] = 'Check out strings into the translator';
-$string['checkoutdone'] = 'Strings checked out successfully into the translator';
-$string['checkoutinprogress'] = 'Checking out strings into the translator';
-$string['confirmcheckin'] = 'You are about to check in modified strings into your local language pack. This will export the customized strings from the translator into the data directory and Moodle will start using the modified strings. Press \'Continue\' button to proceed check in.';
+$string['checkin'] = 'Save strings to language pack';
+$string['checkout'] = 'Open language pack for editing';
+$string['checkoutdone'] = 'Language pack loaded';
+$string['checkoutinprogress'] = 'Loading language pack';
+$string['confirmcheckin'] = 'You are about to save modifications to your local language pack. This will export the customised strings from the translator into you Moodle data directory and Moodle will start using the modified strings. Press \'Continue\' to proceed with saving.';
$string['customlang:edit'] = 'Edit local translation';
$string['customlang:view'] = 'View local translation';
$string['filter'] = 'Filter strings';
$string['filtercomponent'] = 'Show strings of these components';
-$string['filtercustomized'] = 'Customized only';
+$string['filtercustomized'] = 'Customised only';
$string['filtermodified'] = 'Modified only';
$string['filteronlyhelps'] = 'Help only';
$string['filtershowstrings'] = 'Show strings';
$string['filterstringid'] = 'String identifier';
$string['filtersubstring'] = 'Only strings containing';
$string['headingcomponent'] = 'Component';
-$string['headinglocal'] = 'Local customization';
+$string['headinglocal'] = 'Local customisation';
$string['headingstandard'] = 'Standard text';
$string['headingstringid'] = 'String';
-$string['markinguptodate'] = 'Marking the customization as up-to-date';
-$string['markinguptodate_help'] = 'The customized translation may get outdated if either the English original or the master translation has modified since the string was customized on your site. Review the customized translation. If you find it up-to-date, click the checkbox. Edit it otherwise.';
+$string['markinguptodate'] = 'Marking the customisation as up-to-date';
+$string['markinguptodate_help'] = 'The customised translation may get outdated if either the English original or the master translation has modified since the string was customised on your site. Review the customised translation. If you find it up-to-date, click the checkbox. Edit it otherwise.';
$string['markuptodate'] = 'mark as up-to-date';
-$string['modifiedno'] = 'There are no modified strings to check in.';
-$string['modifiednum'] = 'There are {$a} modified strings. You must check in them into disk to store them permanently.';
+$string['modifiedno'] = 'There are no modified strings to save.';
+$string['modifiednum'] = 'There are {$a} modified strings. Do you wish to save these changes to your local language pack?';
$string['nostringsfound'] = 'No strings found, please modify the filter settings';
$string['placeholder'] = 'Placeholders';
$string['placeholder_help'] = 'Placeholders are special statements like `{$a}` or `{$a->something}` within the string. They are replaced with a value when the string is actually printed.
It is important to copy them exactly as they are in the original string. Do not translate them nor change their left-to-right orientation.';
$string['placeholderwarning'] = 'string contains a placeholder';
-$string['pluginname'] = 'Language customization';
-$string['savecheckin'] = 'Save and check in strings into files';
-$string['savecontinue'] = 'Save and continue editing';
+$string['pluginname'] = 'Language customisation';
+$string['savecheckin'] = 'Save changes to the language pack';
+$string['savecontinue'] = 'Apply changes and continue editing';
View
1  backup/cc/cc_includes.php
@@ -39,4 +39,5 @@
require_once($CFG->dirroot .'/backup/cc/cc_lib/cc_converter_resource.php');
require_once($CFG->dirroot .'/backup/cc/cc_lib/cc_converter_quiz.php');
require_once($CFG->dirroot .'/backup/cc/cc_lib/cc_converter_page.php');
+require_once($CFG->dirroot .'/backup/cc/cc_lib/cc_converter_label.php');
require_once($CFG->dirroot .'/backup/cc/cc_lib/cc_convert_moodle2.php');
View
2  backup/cc/cc_lib/cc_asssesment.php
@@ -1821,7 +1821,7 @@ public function set_section(cc_assesment_section $object) {
}
public function set_title($value) {
- $this->assessment_title = $value;
+ $this->assessment_title = self::safexml($value);
}
protected function on_save() {
View
8 backup/cc/cc_lib/cc_basiclti.php
@@ -55,10 +55,10 @@ class basicltil1_resurce_file extends general_cc_file {
protected $cartridge_icon = null;
public function set_title($title) {
- $this->title = $title;
+ $this->title = self::safexml($title);
}
public function set_description($description) {
- $this->description = $description;
+ $this->description = self::safexml($description);
}
public function set_launch_url ($url) {
$this->launch_url = $url;
@@ -77,11 +77,11 @@ public function set_vendor_code ($code) {
$this->vendor = true;
}
public function set_vendor_name ($name) {
- $this->vendor_name = $name;
+ $this->vendor_name = self::safexml($name);
$this->vendor = true;
}
public function set_vendor_description ($desc) {
- $this->vendor_description = $desc;
+ $this->vendor_description = self::safexml($desc);
$this->vendor = true;
}
public function set_vendor_url ($url) {
View
11 backup/cc/cc_lib/cc_convert_moodle2.php
@@ -80,9 +80,17 @@ public static function convert($packagedir, $outdir) {
if ($docp->load($moodle_backup)) {
//sections
$sections = array();
+ $coursef = new XMLGenericDocument();
+ $course_file = $dir . DIRECTORY_SEPARATOR .'course' . DIRECTORY_SEPARATOR . 'course.xml';
+ $coursef->load($course_file);
+ $numsections = (int)$coursef->nodeValue('/course/numsections');
$section_list = $docp->nodeList('/moodle_backup/information/contents/sections/section');
if (!empty($section_list)) {
+ $count = 0;
foreach ($section_list as $node) {
+ if ($count > $numsections) {
+ break;
+ }
$sectionid = $docp->nodeValue('sectionid', $node);
$sectiontitle = $docp->nodeValue('title' , $node);
$sectionpath = $docp->nodeValue('directory', $node);
@@ -92,7 +100,7 @@ public static function convert($packagedir, $outdir) {
DIRECTORY_SEPARATOR .
$sectionpath .
DIRECTORY_SEPARATOR .
- 'section.xml';
+ 'section.xml';
if ($secp->load($section_file)) {
$rawvalue = $secp->nodeValue('/section/sequence');
if ($rawvalue != '$@NULL@$') {
@@ -100,6 +108,7 @@ public static function convert($packagedir, $outdir) {
}
}
$sections[$sectionid] = array($sectiontitle, $sequence);
+ $count++;
}
}
//organization title
View
39 backup/cc/cc_lib/cc_converter_label.php
@@ -0,0 +1,39 @@
+<?php
+// 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/>.
+/**
+ * @package backup-convert
+ * @subpackage cc-library
+ * @copyright 2012 Darko Miletic <dmiletic@moodlerooms.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+require_once 'cc_converters.php';
+require_once 'cc_general.php';
+
+class cc_converter_label extends cc_converter {
+
+ public function __construct(cc_i_item &$item, cc_i_manifest &$manifest, $rootpath, $path){
+ $this->defaultfile = 'label.xml';
+ parent::__construct($item, $manifest, $rootpath, $path);
+ }
+
+ public function convert($outdir) {
+ $resitem = new cc_item();
+ $resitem->title = $this->doc->nodeValue('/activity/label/name');
+ $this->item->add_child_item($resitem);
+ return true;
+ }
+}
View
4 backup/cc/cc_lib/cc_forum.php
@@ -37,11 +37,11 @@ class forum1_resurce_file extends general_cc_file {
protected $attachments = array();
public function set_title($title) {
- $this->title = $title;
+ $this->title = self::safexml($title);
}
public function set_text($text, $type='text/plain') {
- $this->text = $text;
+ $this->text = self::safexml($text);
$this->text_type = $type;
}
View
4 backup/cc/cc_lib/cc_page.php
@@ -35,11 +35,11 @@ public function set_content($value) {
}
public function set_title($value) {
- $this->title = $value;
+ $this->title = self::safexml($value);
}
public function set_intro($value) {
- $this->intro = htmlspecialchars(strip_tags($value), ENT_COMPAT, 'UTF-8', false);
+ $this->intro = self::safexml(strip_tags($value));
}
protected function on_create() {
View
22 backup/cc/cc_lib/cc_resources.php
@@ -183,20 +183,14 @@ public function process_resource($manifestroot, &$fname, $folder) {
throw new Exception('The file doesnt exist!');
}
- //TODO: ver el tema de fpatch con el tema de unix y windows
- //$fpathtocheck = $this->adjust_path($manifestroot,$fname);
- //!empty($fpathtocheck) &&
- if (GetDepFiles($manifestroot, $fname, $this->folder, $this->files)) {
- array_unshift($this->files,$folder.$fname);
- $this->init_empty_new();
- $this->href = $folder.$fname;
- $this->identifierref = $folder.$fname;
- $this->filename = $fname;
- $this->isempty = false;
- $this->folder = $folder;
- } else {
- $this->init_clean();
- }
+ GetDepFiles($manifestroot, $fname, $this->folder, $this->files);
+ array_unshift($this->files,$folder.$fname);
+ $this->init_empty_new();
+ $this->href = $folder.$fname;
+ $this->identifierref = $folder.$fname;
+ $this->filename = $fname;
+ $this->isempty = false;
+ $this->folder = $folder;
}
public function adjust_path($mroot, $fname) {
View
2  backup/cc/cc_lib/cc_weblink.php
@@ -44,7 +44,7 @@ class url1_resurce_file extends general_cc_file {
* @param string $title
*/
public function set_title($title) {
- $this->title = htmlentities($title);
+ $this->title = self::safexml($title);
}
/**
View
12 backup/cc/cc_lib/xmlbase.php
@@ -41,6 +41,18 @@ class XMLGenericDocument {
private $is_html = false;
+ /**
+ * @param string $value
+ * @return string
+ */
+ public static function safexml($value) {
+ $result = htmlspecialchars(html_entity_decode($value, ENT_QUOTES, 'UTF-8'),
+ ENT_NOQUOTES,
+ 'UTF-8',
+ false);
+ return $result;
+ }
+
function __construct($ch = 'UTF-8',$validatenow=true){
$this->charset = $ch;
$this->documentInit();
View
23 backup/moodle2/backup_plan_builder.class.php
@@ -123,12 +123,23 @@ static protected function build_activity_plan($controller, $id) {
// Add the activity task, responsible for outputting
// all the module related information
- $plan->add_task(backup_factory::get_backup_activity_task($controller->get_format(), $id));
-
- // For the given activity, add as many block tasks as necessary
- $blockids = backup_plan_dbops::get_blockids_from_moduleid($id);
- foreach ($blockids as $blockid) {
- $plan->add_task(backup_factory::get_backup_block_task($controller->get_format(), $blockid, $id));
+ try {
+ $plan->add_task(backup_factory::get_backup_activity_task($controller->get_format(), $id));
+
+ // For the given activity, add as many block tasks as necessary
+ $blockids = backup_plan_dbops::get_blockids_from_moduleid($id);
+ foreach ($blockids as $blockid) {
+ try {
+ $plan->add_task(backup_factory::get_backup_block_task($controller->get_format(), $blockid, $id));
+ } catch (backup_task_exception $e) {
+ $a = stdClass();
+ $a->mid = $id;
+ $a->bid = $blockid;
+ $controller->log(get_string('error_block_for_module_not_found', 'backup', $a), backup::LOG_WARNING);
+ }
+ }
+ } catch (backup_task_exception $e) {
+ $controller->log(get_string('error_course_module_not_found', 'backup', $id), backup::LOG_WARNING);
}
}
View
6 backup/moodle2/restore_stepslib.php
@@ -1124,6 +1124,12 @@ public function process_course($data) {
unset($data->idnumber);
}
+ // Any empty value for course->hiddensections will lead to 0 (default, show collapsed).
+ // It has been reported that some old 1.9 courses may have it null leading to DB error. MDL-31532
+ if (empty($data->hiddensections)) {
+ $data->hiddensections = 0;
+ }
+
// Only restrict modules if original course was and target site too for new courses
$data->restrictmodules = $data->restrictmodules && !empty($CFG->restrictmodulesfor) && $CFG->restrictmodulesfor == 'all';
View
3  blocks/community/communitycourse.php
@@ -110,6 +110,9 @@
$sizeinfo->total = number_format($backupsize / 1000000, 2);
echo html_writer::tag('div', get_string('downloadingsize', 'block_community', $sizeinfo),
array('class' => 'textinfo'));
+ if (ob_get_level()) {
+ ob_flush();
+ }
flush();
$filenames = $communitymanager->block_community_download_course_backup($course);
echo html_writer::tag('div', get_string('downloaded', 'block_community'),
View
1  blocks/dock.js
@@ -539,6 +539,7 @@ M.core_dock.fixTitleOrientation = function(item, title, text) {
svg.appendChild(txt);
title.append(svg);
+ title.append(Y.Node.create('<span class="accesshide">'+text+'</span>'));
item.on('dockeditem:drawcomplete', function(txt, title){
txt.setAttribute('fill', Y.one(title).getStyle('color'));
View
85 blog/rsslib.php
@@ -1,8 +1,41 @@
<?php
+// 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/>.
+
+/**
+ * Blog RSS Management
+ *
+ * @package core_blog
+ * @category rss
+ * @copyright 2010 Andrew Davis
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
require_once($CFG->dirroot.'/lib/rsslib.php');
require_once($CFG->dirroot .'/blog/lib.php');
+/**
+ * Build the URL for the RSS feed
+ *
+ * @param int $contextid The context under which the URL should be created
+ * @param int $userid The id of the user requesting the RSS Feed
+ * @param string $filtertype The source of the RSS feed (site/course/group/user)
+ * @param int $filterselect The id of the item defined by $filtertype
+ * @param int $tagid The id of the row in the tag table that identifies the RSS Feed
+ * @return string
+ */
function blog_rss_get_url($contextid, $userid, $filtertype, $filterselect=0, $tagid=0) {
$componentname = 'blog';
@@ -29,8 +62,15 @@ function blog_rss_get_url($contextid, $userid, $filtertype, $filterselect=0, $ta
return rss_get_url($contextid, $userid, $componentname, $additionalargs);
}
-// This function returns the icon (from theme) with the link to rss/file.php
-// needs some hacking to rss/file.php
+/**
+ * Print the link for the RSS feed with the correct RSS icon (Theme based)
+ *
+ * @param stdClass $context The context under which the URL should be created
+ * @param string $filtertype The source of the RSS feed (site/course/group/user)
+ * @param int $filterselect The id of the item defined by $filtertype
+ * @param int $tagid The id of the row in the tag table that identifies the RSS Feed
+ * @param string $tooltiptext The tooltip to be displayed with the link
+ */
function blog_rss_print_link($context, $filtertype, $filterselect=0, $tagid=0, $tooltiptext='') {
global $CFG, $USER, $OUTPUT;
@@ -45,6 +85,15 @@ function blog_rss_print_link($context, $filtertype, $filterselect=0, $tagid=0, $
print '<div class="mdl-right"><a href="'. $url .'"><img src="'. $rsspix .'" title="'. strip_tags($tooltiptext) .'" alt="'.get_string('rss').'" /></a></div>';
}
+/**
+ * Build the URL for the RSS feed amd add it as a header
+ *
+ * @param stdClass $context The context under which the URL should be created
+ * @param string $title Name for the link to be added to the page header
+ * @param string $filtertype The source of the RSS feed (site/course/group/user)
+ * @param int $filterselect The id of the item defined by $filtertype
+ * @param int $tagid The id of the row in the tag table that identifies the RSS Feed
+ */
function blog_rss_add_http_header($context, $title, $filtertype, $filterselect=0, $tagid=0) {
global $PAGE, $USER, $CFG;
@@ -63,8 +112,9 @@ function blog_rss_add_http_header($context, $title, $filtertype, $filterselect=0
/**
* Utility function to extract parameters needed to generate RSS URLs from the blog filters
- * @param <type> $filters
- * @return array array containing the id of the user/course/group, the relevant context and the filter type (site/user/course/group)
+ *
+ * @param array $filters filters for the blog
+ * @return array array containing the id of the user/course/group, the relevant context and the filter type: site/user/course/group
*/
function blog_rss_get_params($filters) {
$thingid = $rsscontext = $filtertype = null;
@@ -99,8 +149,12 @@ function blog_rss_get_params($filters) {
return array($thingid, $rsscontext, $filtertype);
}
-
-// Generate any blog RSS feed via one function (called by ../rss/file.php)
+/**
+ * Generate any blog RSS feed via one function
+ *
+ * @param stdClass $context The context of the blog for which the feed it being generated
+ * @param array $args An array of arguements needed to build the feed (contextid, token, componentname, type, id, tagid)
+ */
function blog_rss_get_feed($context, $args) {
global $CFG, $SITE, $DB;
@@ -219,7 +273,14 @@ function blog_rss_get_feed($context, $args) {
}
}
-
+/**
+ * Retrieve the location and file name of a cached RSS feed
+ *
+ * @param string $type The source of the RSS feed (site/course/group/user)
+ * @param int $id The id of the item defined by $type
+ * @param int $tagid The id of the row in the tag table that identifies the RSS Feed
+ * @return string
+ */
function blog_rss_file_name($type, $id, $tagid=0) {
global $CFG;
@@ -230,7 +291,15 @@ function blog_rss_file_name($type, $id, $tagid=0) {
}
}
-//This function saves to file the rss feed specified in the parameters
+/**
+ * This function saves to file the rss feed specified in the parameters
+ *
+ * @param string $type The source of the RSS feed (site/course/group/user)
+ * @param int $id The id of the item defined by $type
+ * @param int $tagid The id of the row in the tag table that identifies the RSS Feed
+ * @param string $contents The contents of the RSS Feed file
+ * @return bool whether the save was successful or not
+ */
function blog_rss_save_file($type, $id, $tagid=0, $contents='') {
global $CFG;
View
3  course/publish/backup.php
@@ -100,6 +100,9 @@
echo $OUTPUT->heading(get_string('sendingcourse', 'hub'), 3, 'main');
$renderer = $PAGE->get_renderer('core', 'publish');
echo $renderer->sendingbackupinfo($backupfile);
+if (ob_get_level()) {
+ ob_flush();
+}
flush();
//send backup file to the hub
View
2  enrol/ldap/lang/en/enrol_ldap.php
@@ -92,7 +92,7 @@
$string['pluginname'] = 'LDAP enrolments';
$string['pluginname_desc'] = '<p>You can use an LDAP server to control your enrolments. It is assumed your LDAP tree contains groups that map to the courses, and that each of those groups/courses will have membership entries to map to students.</p><p>It is assumed that courses are defined as groups in LDAP, with each group having multiple membership fields (<em>member</em> or <em>memberUid</em>) that contain a uniqueidentification of the user.</p><p>To use LDAP enrolment, your users <strong>must</strong> to have a valid idnumber field. The LDAP groups must have that idnumber in the member fields for a user to be enrolled in the course. This will usually work well if you are already using LDAP Authentication.</p><p>Enrolments will be updated when the user logs in. You can also run a script to keep enrolments in synch. Look in <em>enrol/ldap/cli/sync.php</em>.</p><p>This plugin can also be set to automatically create new courses when new groups appear in LDAP.</p>';
$string['pluginnotenabled'] = 'Plugin not enabled!';
-$string['role_mapping'] = '<p>For each rol that you want to assign from LDAP, you need to specify the list of contexts where the role courses\'s groups are located. Separate different contexts with \';\'.</p><p>You also need to specify the attribute your LDAP server uses to hold the members of a group. Usually \'member\' or \'memberUid\'</p>';
+$string['role_mapping'] = '<p>For each role that you want to assign from LDAP, you need to specify the list of contexts where the role courses\'s groups are located. Separate different contexts with \';\'.</p><p>You also need to specify the attribute your LDAP server uses to hold the members of a group. Usually \'member\' or \'memberUid\'</p>';
$string['role_mapping_key'] = 'Map roles from LDAP ';
$string['roles'] = 'Role mapping';
$string['server_settings'] = 'LDAP server settings';
View
8 enrol/manual/lib.php
@@ -224,8 +224,14 @@ public function get_manual_enrol_button(course_enrolment_manager $manager) {
'url' => $manager->get_moodlepage()->url->out(false),
'optionsStartDate' => $startdateoptions,
'defaultRole' => $instance->roleid,
- 'disableGradeHistory' => $CFG->disablegradehistory
+ 'disableGradeHistory' => $CFG->disablegradehistory,
+ 'recoverGradesDefault'=> ''
);
+
+ if ($CFG->recovergradesdefault) {
+ $arguments['recoverGradesDefault'] = ' checked="checked"';
+ }
+
$function = 'M.enrol_manual.quickenrolment.init';
$button->require_yui_module($modules, $function, array($arguments));
$button->strings_for_js(array(
View
8 enrol/manual/yui/quickenrolment/quickenrolment.js
@@ -21,7 +21,8 @@ YUI.add('moodle-enrol_manual-quickenrolment', function(Y) {
DEFAULTSTARTDATE : 'defaultStartDate',
DEFAULTDURATION : 'defaultDuration',
ASSIGNABLEROLES : 'assignableRoles',
- DISABLEGRADEHISTORY : 'disableGradeHistory'
+ DISABLEGRADEHISTORY : 'disableGradeHistory',
+ RECOVERGRADESDEFAULT : 'recoverGradesDefault'
};
/** CSS classes for nodes in structure **/
var CSS = {
@@ -78,7 +79,7 @@ YUI.add('moodle-enrol_manual-quickenrolment', function(Y) {
if (this.get(UEP.DISABLEGRADEHISTORY) != true) {
recovergrades = create('<div class="'+CSS.ENROLMENTOPTION+' '+CSS.RECOVERGRADES+'"></div>')
.append(create('<label class="'+CSS.RECOVERGRADESTITLE+'" for="'+CSS.RECOVERGRADES+'">'+M.str.enrol.recovergrades+'</label>'))
- .append(create('<input type="checkbox" id="'+CSS.RECOVERGRADES+'" name="'+CSS.RECOVERGRADES+'" />'))
+ .append(create('<input type="checkbox" id="'+CSS.RECOVERGRADES+'" name="'+CSS.RECOVERGRADES+'"'+ this.get(UEP.RECOVERGRADESDEFAULT) +' />'))
}
this.set(UEP.BASE, create('<div class="'+CSS.PANEL+' '+CSS.HIDDEN+'"></div>')
@@ -504,6 +505,9 @@ YUI.add('moodle-enrol_manual-quickenrolment', function(Y) {
},
disableGradeHistory : {
value : 0
+ },
+ recoverGradesDefault : {
+ value : ''
}
}
});
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
2  grade/grading/form/rubric/styles.css
@@ -49,6 +49,8 @@
.gradingform_rubric_editform .status.ready {background-color:#e7f1c3;border-color:#AAEEAA;}
.gradingform_rubric_editform .status.draft {background-color:#f3f2aa;border-color:#EEEE22;}
+.gradingform_rubric {overflow:auto;padding-bottom:1.5em;max-width:720px;position:relative;}
+
.gradingform_rubric.editor .criterion .controls,
.gradingform_rubric .criterion .description,
.gradingform_rubric .criterion .levels,
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
*/