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 c218d6a076ca5aac12ea8a2a246941436d174389 2 parents 035c81c + 23778a4
@pcharsle pcharsle authored
Showing with 2,764 additions and 2,096 deletions.
  1. +4 −0 admin/cli/upgrade.php
  2. +1 −0  admin/environment.xml
  3. +2 −2 admin/index.php
  4. +1 −1  admin/mnet/access_control.php
  5. +2 −2 admin/roles/lib.php
  6. +2 −2 admin/settings.php
  7. +0 −2  admin/settings/courses.php
  8. +1 −2  admin/tool/customlang/db/access.php
  9. +8 −8 admin/tool/customlang/db/install.xml
  10. +3 −2 admin/tool/unittest/db/access.php
  11. +5 −9 admin/tool/uploaduser/locallib.php
  12. +1 −2  admin/tool/uploaduser/user_form.php
  13. +3 −5 admin/tool/xmldb/actions/check_bigints/check_bigints.class.php
  14. +1 −1  admin/tool/xmldb/actions/create_xml_file/create_xml_file.class.php
  15. +0 −5 admin/tool/xmldb/actions/edit_field/edit_field.class.php
  16. +0 −16 admin/tool/xmldb/actions/edit_field/edit_field.js
  17. +0 −4 admin/tool/xmldb/actions/edit_field_save/edit_field_save.class.php
  18. +0 −1  admin/tool/xmldb/actions/generate_documentation/xmldb.xsl
  19. +0 −1  admin/tool/xmldb/actions/new_table/new_table.class.php
  20. +0 −56 admin/tool/xmldb/actions/view_table_php/view_table_php.class.php
  21. +0 −1  admin/tool/xmldb/lang/en/tool_xmldb.php
  22. +5 −6 auth/cas/auth.php
  23. +31 −43 auth/ldap/auth.php
  24. +1 −3 backup/converter/moodle1/handlerlib.php
  25. +1 −5 backup/converter/moodle1/lib.php
  26. +67 −17 backup/moodle2/backup_activity_task.class.php
  27. +7 −4 backup/moodle2/backup_block_task.class.php
  28. +7 −4 backup/moodle2/backup_course_task.class.php
  29. +5 −4 backup/moodle2/backup_coursereport_plugin.class.php
  30. +9 −4 backup/moodle2/backup_custom_fields.php
  31. +9 −4 backup/moodle2/backup_default_block_task.class.php
  32. +10 −5 backup/moodle2/backup_final_task.class.php
  33. +9 −4 backup/moodle2/backup_format_plugin.class.php
  34. +7 −5 backup/moodle2/backup_gradingform_plugin.class.php
  35. +9 −4 backup/moodle2/backup_plagiarism_plugin.class.php
  36. +7 −4 backup/moodle2/backup_plan_builder.class.php
  37. +9 −4 backup/moodle2/backup_plugin.class.php
  38. +9 −4 backup/moodle2/backup_qtype_plugin.class.php
  39. +5 −4 backup/moodle2/backup_report_plugin.class.php
  40. +9 −11 backup/moodle2/backup_root_task.class.php
  41. +9 −4 backup/moodle2/backup_section_task.class.php
  42. +16 −11 backup/moodle2/backup_settingslib.php
  43. +14 −11 backup/moodle2/backup_stepslib.php
  44. +8 −4 backup/moodle2/backup_subplugin.class.php
  45. +9 −4 backup/moodle2/backup_theme_plugin.class.php
  46. +9 −4 backup/moodle2/backup_xml_transformer.class.php
  47. +9 −4 backup/moodle2/restore_activity_task.class.php
  48. +9 −4 backup/moodle2/restore_block_task.class.php
  49. +9 −4 backup/moodle2/restore_course_task.class.php
  50. +5 −4 backup/moodle2/restore_coursereport_plugin.class.php
  51. +9 −4 backup/moodle2/restore_default_block_task.class.php
  52. +9 −4 backup/moodle2/restore_final_task.class.php
  53. +9 −4 backup/moodle2/restore_format_plugin.class.php
  54. +6 −4 backup/moodle2/restore_gradingform_plugin.class.php
  55. +9 −4 backup/moodle2/restore_plagiarism_plugin.class.php
  56. +7 −4 backup/moodle2/restore_plan_builder.class.php
  57. +9 −4 backup/moodle2/restore_plugin.class.php
  58. +9 −4 backup/moodle2/restore_qtype_plugin.class.php
  59. +5 −4 backup/moodle2/restore_report_plugin.class.php
  60. +8 −17 backup/moodle2/restore_root_task.class.php
  61. +12 −9 backup/moodle2/restore_section_task.class.php
  62. +9 −11 backup/moodle2/restore_settingslib.php
  63. +9 −8 backup/moodle2/restore_stepslib.php
  64. +9 −4 backup/moodle2/restore_subplugin.class.php
  65. +5 −4 backup/moodle2/restore_theme_plugin.class.php
  66. +1 −1  backup/restorelib.php
  67. +0 −1  backup/util/dbops/backup_controller_dbops.class.php
  68. +3 −3 backup/util/dbops/backup_plan_dbops.class.php
  69. +1 −5 backup/util/dbops/restore_dbops.class.php
  70. +1 −2  backup/util/helper/backup_cron_helper.class.php
  71. +15 −15 backup/util/settings/backup_setting.class.php
  72. +9 −0 backup/util/settings/base_setting.class.php
  73. +11 −6 backup/util/settings/root/root_backup_setting.class.php
  74. +9 −1 backup/util/ui/renderer.php
  75. +28 −13 backup/util/ui/restore_ui_components.php
  76. +2 −2 blocks/community/communitycourse.php
  77. +3 −3 blocks/community/db/install.xml
  78. +3 −3 blocks/community/locallib.php
  79. +1 −1  blocks/community/renderer.php
  80. +9 −9 blocks/community/yui/imagegallery/imagegallery.js
  81. +1 −1  blocks/completionstatus/block_completionstatus.php
  82. +0 −1  blocks/completionstatus/lang/en/block_completionstatus.php
  83. +1 −1  blocks/course_list/block_course_list.php
  84. +1 −1  blocks/course_list/lang/en/block_course_list.php
  85. +3 −3 blocks/dock.js
  86. +10 −3 blocks/html/lib.php
  87. +46 −42 blocks/navigation/block_navigation.php
  88. +4 −4 blocks/navigation/edit_form.php
  89. +50 −3 blocks/navigation/renderer.php
  90. +1 −2  blocks/navigation/version.php
  91. +23 −22 blocks/online_users/db/access.php
  92. +7 −5 blocks/participants/block_participants.php
  93. +1 −1  blocks/private_files/block_private_files.php
  94. +1 −1  blocks/private_files/lang/en/block_private_files.php
  95. +3 −6 blocks/rss_client/block_rss_client.php
  96. +24 −28 blocks/rss_client/db/access.php
  97. +4 −4 blocks/rss_client/db/install.xml
  98. +1 −1  blocks/rss_client/editfeed.php
  99. +1 −2  blocks/rss_client/lang/en/block_rss_client.php
  100. +1 −1  blocks/rss_client/managefeeds.php
  101. +1 −1  blocks/rss_client/viewfeed.php
  102. +1 −1  blocks/section_links/config_instance.html
  103. +1 −1  blocks/selfcompletion/block_selfcompletion.php
  104. +0 −1  blocks/selfcompletion/lang/en/block_selfcompletion.php
  105. +3 −6 blog/lib.php
  106. +3 −3 calendar/delete.php
  107. +3 −3 calendar/event.php
  108. +3 −3 calendar/lib.php
  109. +3 −2 cohort/lib.php
  110. +6 −6 course/completion.php
  111. +1 −1  course/format/topics/format.php
  112. +1 −1  course/info.php
  113. +25 −8 course/lib.php
  114. +1 −1  course/publish/forms.php
  115. +4 −4 course/publish/index.php
  116. +1 −1  course/publish/lib.php
  117. +2 −2 course/publish/metadata.php
  118. +2 −2 course/publish/renderer.php
  119. +1 −4 course/rest.php
  120. +7 −4 course/view.php
  121. +25 −0 enrol/authorize/db/access.php
  122. +15 −15 enrol/authorize/db/install.xml
  123. +1 −3 enrol/category/db/access.php
  124. +6 −7 enrol/category/db/events.php
  125. +2 −2 enrol/cohort/ajax.php
  126. +1 −3 enrol/cohort/db/access.php
  127. +4 −5 enrol/cohort/db/events.php
  128. +13 −0 enrol/database/db/access.php
  129. +1 −0  enrol/database/lang/en/enrol_database.php
  130. +39 −2 enrol/database/lib.php
  131. +2 −2 enrol/database/version.php
  132. +15 −2 enrol/externallib.php
  133. +8 −8 enrol/flatfile/db/install.xml
  134. +1 −3 enrol/guest/db/access.php
  135. +1 −2  enrol/guest/locallib.php
  136. +1 −3 enrol/ldap/db/access.php
  137. +1 −2  enrol/ldap/lib.php
  138. +2 −2 enrol/ldap/settingslib.php
  139. +2 −2 enrol/locallib.php
  140. +1 −3 enrol/manual/db/access.php
  141. +4 −4 enrol/manual/db/services.php
  142. +1 −3 enrol/meta/db/access.php
  143. +4 −5 enrol/meta/db/events.php
  144. +1 −3 enrol/paypal/db/access.php
  145. +6 −6 enrol/paypal/db/install.xml
  146. +1 −3 enrol/self/db/access.php
  147. +1 −2  enrol/self/locallib.php
  148. +2 −2 filter/algebra/AlgParser.pm
  149. +7 −8 grade/edit/scale/edit_form.php
  150. +10 −1 grade/export/ods/db/access.php
  151. +10 −1 grade/export/txt/db/access.php
  152. +10 −1 grade/export/xls/db/access.php
  153. +10 −1 grade/export/xml/db/access.php
  154. +14 −14 grade/grading/form/rubric/db/install.xml
  155. +10 −1 grade/import/csv/db/access.php
  156. +2 −3 grade/import/csv/index.php
  157. +1 −2  grade/import/grade_import_form.php
  158. +10 −1 grade/import/xml/db/access.php
  159. +2 −0  grade/report/grader/db/access.php
  160. +1 −1  grade/report/grader/lib.php
  161. +2 −0  grade/report/outcomes/db/access.php
  162. +2 −0  grade/report/overview/db/access.php
  163. +1 −1  grade/report/overview/renderer.php
  164. +2 −0  grade/report/user/db/access.php
  165. +1 −3 group/group_form.php
  166. +1 −3 group/grouping_form.php
  167. +5 −5 index.php
  168. +44 −0 install/lang/ca_valencia/admin.php
  169. +35 −0 install/lang/ca_valencia/langconfig.php
  170. +34 −0 install/lang/en_ar/langconfig.php
  171. +2 −1  install/lang/eu/install.php
  172. +2 −0  install/lang/hr/install.php
  173. +33 −0 install/lang/kl/langconfig.php
  174. +1 −1  install/lang/nl/install.php
  175. +2 −2 install/lang/pt/admin.php
  176. +4 −4 install/lang/pt/error.php
  177. +22 −22 install/lang/pt/install.php
  178. +1 −3 iplookup/lib.php
  179. +1 −0  lang/en/admin.php
  180. +1 −1  lang/en/auth.php
  181. +0 −3  lang/en/backup.php
  182. +2 −0  lang/en/moodle.php
  183. +1 −0  lang/en/question.php
  184. +230 −107 lib/accesslib.php
  185. +28 −51 lib/adminlib.php
  186. +4 −4 lib/bennu/iCalendar_rfc2445.php
  187. +1 −0  lib/bennu/readme_moodle.txt
  188. +48 −30 lib/conditionlib.php
  189. +29 −2 lib/csslib.php
  190. +2 −4 lib/csvlib.class.php
  191. +4 −5 lib/datalib.php
  192. +2 −3 lib/db/access.php
  193. +5 −7 lib/db/events.php
  194. +884 −884 lib/db/install.xml
  195. +1 −1  lib/db/log.php
  196. +4 −4 lib/db/services.php
  197. +18 −0 lib/db/upgrade.php
  198. +52 −0 lib/db/upgradelib.php
  199. +2 −1  lib/ddl/database_manager.php
  200. +0 −1  lib/ddl/mssql_sql_generator.php
  201. +0 −1  lib/ddl/oracle_sql_generator.php
  202. +0 −1  lib/ddl/postgres_sql_generator.php
  203. +4 −4 lib/ddl/simpletest/fixtures/invalid.xml
  204. +2 −2 lib/ddl/simpletest/fixtures/xmldb_table.xml
  205. +1 −14 lib/ddl/simpletest/testddl.php
  206. +1 −10 lib/ddl/sql_generator.php
  207. +0 −1  lib/ddl/sqlite_sql_generator.php
  208. +37 −0 lib/deprecatedlib.php
  209. +1 −0  lib/dml/database_column_info.php
  210. +2 −1  lib/dml/moodle_database.php
  211. +1 −1  lib/dml/mssql_native_moodle_database.php
  212. +9 −3 lib/dml/mysqli_native_moodle_database.php
  213. +2 −2 lib/dml/oci_native_moodle_database.php
  214. +1 −1  lib/dml/pdo_moodle_database.php
  215. +1 −1  lib/dml/pgsql_native_moodle_database.php
  216. +1 −1  lib/dml/sqlsrv_native_moodle_database.php
  217. +1 −1  lib/editor/tinymce/lib.php
  218. +2 −2 lib/editor/tinymce/readme_moodle.txt
  219. +0 −1  lib/editor/tinymce/tiny_mce/3.4.6/jquery.tinymce.js
  220. +0 −1  lib/editor/tinymce/tiny_mce/3.4.6/plugins/autoresize/editor_plugin.js
  221. +0 −1  lib/editor/tinymce/tiny_mce/3.4.6/plugins/contextmenu/editor_plugin.js
  222. +0 −41 lib/editor/tinymce/tiny_mce/3.4.6/plugins/emotions/emotions.htm
  223. +0 −22 lib/editor/tinymce/tiny_mce/3.4.6/plugins/emotions/js/emotions.js
  224. +0 −1  lib/editor/tinymce/tiny_mce/3.4.6/plugins/emotions/langs/en_dlg.js
  225. +0 −1  lib/editor/tinymce/tiny_mce/3.4.6/plugins/lists/editor_plugin.js
  226. BIN  lib/editor/tinymce/tiny_mce/3.4.6/plugins/media/moxieplayer.swf
  227. +0 −1  lib/editor/tinymce/tiny_mce/3.4.6/plugins/wordcount/editor_plugin.js
  228. +0 −1  lib/editor/tinymce/tiny_mce/3.4.6/themes/advanced/editor_template.js
  229. +0 −1  lib/editor/tinymce/tiny_mce/3.4.6/themes/advanced/langs/en_dlg.js
  230. +0 −1  lib/editor/tinymce/tiny_mce/3.4.6/tiny_mce.js
  231. +0 −1  lib/editor/tinymce/tiny_mce/3.4.6/tiny_mce_jquery.js
  232. +0 −1  lib/editor/tinymce/tiny_mce/3.4.6/tiny_mce_prototype.js
  233. +1 −0  lib/editor/tinymce/tiny_mce/3.4.9/jquery.tinymce.js
  234. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/langs/en.js
  235. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/license.txt
  236. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advhr/css/advhr.css
  237. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advhr/editor_plugin.js
  238. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advhr/editor_plugin_src.js
  239. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advhr/js/rule.js
  240. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advhr/langs/en_dlg.js
  241. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advhr/rule.htm
  242. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advimage/css/advimage.css
  243. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advimage/editor_plugin.js
  244. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advimage/editor_plugin_src.js
  245. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advimage/image.htm
  246. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advimage/img/sample.gif
  247. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advimage/js/image.js
  248. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advimage/langs/en_dlg.js
  249. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advlink/css/advlink.css
  250. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advlink/editor_plugin.js
  251. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advlink/editor_plugin_src.js
  252. +8 −1 lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advlink/js/advlink.js
  253. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advlink/langs/en_dlg.js
  254. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advlink/link.htm
  255. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advlist/editor_plugin.js
  256. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/advlist/editor_plugin_src.js
  257. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/autolink/editor_plugin.js
  258. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/autolink/editor_plugin_src.js
  259. +1 −0  lib/editor/tinymce/tiny_mce/3.4.9/plugins/autoresize/editor_plugin.js
  260. +20 −38 lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/autoresize/editor_plugin_src.js
  261. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/autosave/editor_plugin.js
  262. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/autosave/editor_plugin_src.js
  263. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/autosave/langs/en.js
  264. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/bbcode/editor_plugin.js
  265. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/bbcode/editor_plugin_src.js
  266. +1 −0  lib/editor/tinymce/tiny_mce/3.4.9/plugins/contextmenu/editor_plugin.js
  267. +1 −0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/contextmenu/editor_plugin_src.js
  268. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/directionality/editor_plugin.js
  269. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/directionality/editor_plugin_src.js
  270. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/dragmath/dragmath.php
  271. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/dragmath/editor_plugin.js
  272. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/dragmath/editor_plugin_src.js
  273. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/dragmath/img/dragmath.gif
  274. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/dragmath/js/dragmath.js
  275. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/dragmath/langs/en_dlg.js
  276. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/editor_plugin.js
  277. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/editor_plugin_src.js
  278. +42 −0 lib/editor/tinymce/tiny_mce/3.4.9/plugins/emotions/emotions.htm
  279. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-cool.gif
  280. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-cry.gif
  281. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-embarassed.gif
  282. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-foot-in-mouth.gif
  283. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-frown.gif
  284. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-innocent.gif
  285. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-kiss.gif
  286. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-laughing.gif
  287. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-money-mouth.gif
  288. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-sealed.gif
  289. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-smile.gif
  290. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-surprised.gif
  291. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-tongue-out.gif
  292. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-undecided.gif
  293. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-wink.gif
  294. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/emotions/img/smiley-yell.gif
  295. +43 −0 lib/editor/tinymce/tiny_mce/3.4.9/plugins/emotions/js/emotions.js
  296. +1 −0  lib/editor/tinymce/tiny_mce/3.4.9/plugins/emotions/langs/en_dlg.js
  297. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/example/dialog.htm
  298. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/example/editor_plugin.js
  299. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/example/editor_plugin_src.js
  300. 0  lib/editor/tinymce/tiny_mce/{3.4.6 → 3.4.9}/plugins/example/img/example.gif
Sorry, we could not display the entire diff because too many files (1,191) changed.
View
4 admin/cli/upgrade.php
@@ -92,6 +92,10 @@
$oldversion = "$CFG->release ($CFG->version)";
$newversion = "$release ($version)";
+if (!moodle_needs_upgrading()) {
+ cli_error(get_string('cliupgradenoneed', 'core_admin', $newversion), 0);
+}
+
// Test environment first.
list($envstatus, $environment_results) = check_moodle_environment(normalize_version($release), ENV_SELECT_RELEASE);
if (!$envstatus) {
View
1  admin/environment.xml
@@ -651,6 +651,7 @@
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
+ <PHP_EXTENSION name="hash" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="40M" level="required">
View
4 admin/index.php
@@ -306,8 +306,8 @@
}
}
- // at this stage there can be only one admin - users may change username, so do not rely on that
- $adminuser = get_complete_user_data('id', $CFG->siteadmins);
+ // at this stage there can be only one admin unless more were added by install - users may change username, so do not rely on that
+ $adminuser = get_complete_user_data('id', reset(explode(',', $CFG->siteadmins)));
if ($adminuser->password === 'adminsetuppending') {
// prevent installation hijacking
View
2  admin/mnet/access_control.php
@@ -103,7 +103,7 @@
$usernames = explode(',', $form->username);
foreach ($usernames as $username) {
- $username = trim(moodle_strtolower($username));
+ $username = trim(textlib::strtolower($username));
if (!empty($username)) {
if (mnet_update_sso_access_control($username, $form->mnet_host_id, $form->accessctrl)) {
if ($form->accessctrl == 'allow') {
View
4 admin/roles/lib.php
@@ -610,8 +610,8 @@ public function read_submitted_permissions() {
$shortname = optional_param('shortname', null, PARAM_RAW);
if (!is_null($shortname)) {
$this->role->shortname = $shortname;
- $this->role->shortname = textlib_get_instance()->specialtoascii($this->role->shortname);
- $this->role->shortname = moodle_strtolower(clean_param($this->role->shortname, PARAM_ALPHANUMEXT));
+ $this->role->shortname = textlib::specialtoascii($this->role->shortname);
+ $this->role->shortname = textlib::strtolower(clean_param($this->role->shortname, PARAM_ALPHANUMEXT));
if (empty($this->role->shortname)) {
$this->errors['shortname'] = get_string('errorbadroleshortname', 'role');
}
View
4 admin/settings.php
@@ -131,8 +131,8 @@
echo '</form>';
}
-$PAGE->requires->yui_module('moodle-core-formslib',
- 'M.core.init_formslib',
+$PAGE->requires->yui_module('moodle-core-formchangechecker',
+ 'M.core_formchangechecker.init',
array(array(
'formid' => 'adminsettings'
))
View
2  admin/settings/courses.php
@@ -97,7 +97,6 @@
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_users', new lang_string('generalusers','backup'), new lang_string('configgeneralusers','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_anonymize', new lang_string('generalanonymize','backup'), new lang_string('configgeneralanonymize','backup'), array('value'=>0, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_role_assignments', new lang_string('generalroleassignments','backup'), new lang_string('configgeneralroleassignments','backup'), array('value'=>1, 'locked'=>0)));
- $temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_user_files', new lang_string('generaluserfiles','backup'), new lang_string('configgeneraluserfiles','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_activities', new lang_string('generalactivities','backup'), new lang_string('configgeneralactivities','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_blocks', new lang_string('generalblocks','backup'), new lang_string('configgeneralblocks','backup'), array('value'=>1, 'locked'=>0)));
$temp->add(new admin_setting_configcheckbox_with_lock('backup/backup_general_filters', new lang_string('generalfilters','backup'), new lang_string('configgeneralfilters','backup'), array('value'=>1, 'locked'=>0)));
@@ -144,7 +143,6 @@
$temp->add(new admin_setting_heading('automatedsettings', new lang_string('automatedsettings','backup'), ''));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_users', new lang_string('generalusers', 'backup'), new lang_string('configgeneralusers', 'backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_role_assignments', new lang_string('generalroleassignments','backup'), new lang_string('configgeneralroleassignments','backup'), 1));
- $temp->add(new admin_setting_configcheckbox('backup/backup_auto_user_files', new lang_string('generaluserfiles', 'backup'), new lang_string('configgeneraluserfiles','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_activities', new lang_string('generalactivities','backup'), new lang_string('configgeneralactivities','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_blocks', new lang_string('generalblocks','backup'), new lang_string('configgeneralblocks','backup'), 1));
$temp->add(new admin_setting_configcheckbox('backup/backup_auto_filters', new lang_string('generalfilters','backup'), new lang_string('configgeneralfilters','backup'), 1));
View
3  admin/tool/customlang/db/access.php
@@ -18,8 +18,7 @@
/**
* Defines the capabilities used by the Language customization admin tool
*
- * @package tool
- * @subpackage customlang
+ * @package tool_customlang
* @copyright 2010 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
16 admin/tool/customlang/db/install.xml
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="admin/tool/customlang/db" VERSION="20110925" COMMENT="XMLDB file for Moodle admin/tool/customlang"
+<XMLDB PATH="admin/tool/customlang/db" VERSION="20120122" COMMENT="XMLDB file for Moodle admin/tool/customlang"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
>
<TABLES>
<TABLE NAME="tool_customlang" COMMENT="Contains the working checkout of all strings and their customization" NEXT="tool_customlang_components">
<FIELDS>
- <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="lang"/>
+ <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" NEXT="lang"/>
<FIELD NAME="lang" TYPE="char" LENGTH="20" NOTNULL="true" SEQUENCE="false" COMMENT="The code of the language this string belongs to. Like en, cs or es" PREVIOUS="id" NEXT="componentid"/>
- <FIELD NAME="componentid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="The id of the component" PREVIOUS="lang" NEXT="stringid"/>
+ <FIELD NAME="componentid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="The id of the component" PREVIOUS="lang" NEXT="stringid"/>
<FIELD NAME="stringid" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="The identifier of the string" PREVIOUS="componentid" NEXT="original"/>
<FIELD NAME="original" TYPE="text" LENGTH="big" NOTNULL="true" SEQUENCE="false" COMMENT="English original of the string" PREVIOUS="stringid" NEXT="master"/>
<FIELD NAME="master" TYPE="text" LENGTH="big" NOTNULL="false" SEQUENCE="false" COMMENT="Master translation of the string as is distributed in the official lang pack, null if not translated" PREVIOUS="original" NEXT="local"/>
<FIELD NAME="local" TYPE="text" LENGTH="big" NOTNULL="false" SEQUENCE="false" COMMENT="Local customization of the string, null if not customized" PREVIOUS="master" NEXT="timemodified"/>
- <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" COMMENT="The timestamp of when the original or master was recently modified" PREVIOUS="local" NEXT="timecustomized"/>
- <FIELD NAME="timecustomized" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="The timestamp of when the value of the local translation was recently modified, null if not customized yet" PREVIOUS="timemodified" NEXT="outdated"/>
- <FIELD NAME="outdated" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Either the English original or the master translation changed and the customization may be outdated" PREVIOUS="timecustomized" NEXT="modified"/>
- <FIELD NAME="modified" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Has the string been modified via the translator?" PREVIOUS="outdated"/>
+ <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="The timestamp of when the original or master was recently modified" PREVIOUS="local" NEXT="timecustomized"/>
+ <FIELD NAME="timecustomized" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="The timestamp of when the value of the local translation was recently modified, null if not customized yet" PREVIOUS="timemodified" NEXT="outdated"/>
+ <FIELD NAME="outdated" TYPE="int" LENGTH="3" NOTNULL="false" DEFAULT="0" SEQUENCE="false" COMMENT="Either the English original or the master translation changed and the customization may be outdated" PREVIOUS="timecustomized" NEXT="modified"/>
+ <FIELD NAME="modified" TYPE="int" LENGTH="3" NOTNULL="false" DEFAULT="0" SEQUENCE="false" COMMENT="Has the string been modified via the translator?" PREVIOUS="outdated"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="fk_component"/>
@@ -28,7 +28,7 @@
</TABLE>
<TABLE NAME="tool_customlang_components" COMMENT="Contains the list of all installed plugins that provide their own language pack" PREVIOUS="tool_customlang">
<FIELDS>
- <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="name"/>
+ <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="The normalized name of the plugin" PREVIOUS="id" NEXT="version"/>
<FIELD NAME="version" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" COMMENT="The checked out version of the plugin, null if the version is unknown" PREVIOUS="name"/>
</FIELDS>
View
5 admin/tool/unittest/db/access.php
@@ -17,12 +17,13 @@
/**
* Unitest caps.
*
- * @package tool
- * @subpackage unittest
+ * @package tool_unittest
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
$capabilities = array(
// Note: do not add managers here, unittests are dangerous and not intended for production sites!!!
View
14 admin/tool/uploaduser/locallib.php
@@ -179,13 +179,11 @@ function uu_validate_user_upload_columns(csv_import_reader $cir, $stdfields, $pr
print_error('csvfewcolumns', 'error', $returnurl);
}
- $textlib = textlib_get_instance(); // profile fields may contain unicode chars
-
// test columns
$processed = array();
foreach ($columns as $key=>$unused) {
$field = $columns[$key];
- $lcfield = $textlib->strtolower($field);
+ $lcfield = textlib::strtolower($field);
if (in_array($field, $stdfields) or in_array($lcfield, $stdfields)) {
// standard fields are only lowercase
$newfield = $lcfield;
@@ -281,8 +279,6 @@ function uu_process_template($template, $user) {
* Internal callback function.
*/
function uu_process_template_callback($username, $firstname, $lastname, $block) {
- $textlib = textlib_get_instance();
-
switch ($block[3]) {
case 'u':
$repl = $username;
@@ -299,18 +295,18 @@ function uu_process_template_callback($username, $firstname, $lastname, $block)
switch ($block[1]) {
case '+':
- $repl = $textlib->strtoupper($repl);
+ $repl = textlib::strtoupper($repl);
break;
case '-':
- $repl = $textlib->strtolower($repl);
+ $repl = textlib::strtolower($repl);
break;
case '~':
- $repl = $textlib->strtotitle($repl);
+ $repl = textlib::strtotitle($repl);
break;
}
if (!empty($block[2])) {
- $repl = $textlib->substr($repl, 0 , $block[2]);
+ $repl = textlib::substr($repl, 0 , $block[2]);
}
return $repl;
View
3  admin/tool/uploaduser/user_form.php
@@ -53,8 +53,7 @@ function definition () {
$mform->setDefault('delimiter_name', 'comma');
}
- $textlib = textlib_get_instance();
- $choices = $textlib->get_encodings();
+ $choices = textlib::get_encodings();
$mform->addElement('select', 'encoding', get_string('encoding', 'tool_uploaduser'), $choices);
$mform->setDefault('encoding', 'UTF-8');
View
8 admin/tool/xmldb/actions/check_bigints/check_bigints.class.php
@@ -23,8 +23,7 @@
/**
* reporting about the ones not physically implemented as BIGINTs
- * and providing one SQL script to fix all them. Also, under MySQL,
- * it performs one check of signed bigints. MDL-11038
+ * and providing one SQL script to fix all them. MDL-11038
*
* @package tool
* @subpackage xmldb
@@ -53,7 +52,6 @@ function init() {
'wrongints' => 'tool_xmldb',
'nowrongintsfound' => 'tool_xmldb',
'yeswrongintsfound' => 'tool_xmldb',
- 'mysqlextracheckbigints' => 'tool_xmldb',
));
// Correct fields must be type bigint for MySQL and int8 for PostgreSQL
@@ -90,8 +88,8 @@ protected function check_table(xmldb_table $xmldb_table, array $metacolumns) {
$metacolumn = $metacolumns[$xmldb_field->getName()];
// Going to check this field in DB
$o.=' <li>' . $this->str['field'] . ': ' . $xmldb_field->getName() . ' ';
- // Detect if the physical field is wrong and, under mysql, check for incorrect signed fields too
- if ($metacolumn->type != $this->correct_type || ($this->dbfamily == 'mysql' && $xmldb_field->getUnsigned() && !$metacolumn->unsigned)) {
+ // Detect if the physical field is wrong
+ if ($metacolumn->type != $this->correct_type) {
$o.='<font color="red">' . $this->str['wrong'] . '</font>';
// Add the wrong field to the list
$obj = new stdClass();
View
2  admin/tool/xmldb/actions/create_xml_file/create_xml_file.class.php
@@ -88,7 +88,7 @@ function invoke() {
$c.= ' <TABLES>' . "\n";
$c.= ' <TABLE NAME="' . $xmltable . '" COMMENT="Default comment for ' . $xmltable .', please edit me">' . "\n";
$c.= ' <FIELDS>' . "\n";
- $c.= ' <FIELD NAME="id" TYPE="int" LENGTH="10" UNSIGNED="true" NOTNULL="true" SEQUENCE="true" />' . "\n";
+ $c.= ' <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" />' . "\n";
$c.= ' </FIELDS>' . "\n";
$c.= ' <KEYS>' . "\n";
$c.= ' <KEY NAME="primary" TYPE="primary" FIELDS="id" />' . "\n";
View
5 admin/tool/xmldb/actions/edit_field/edit_field.class.php
@@ -155,11 +155,6 @@ function invoke() {
// xmldb_field Decimals
$o.= ' <tr valign="top"><td><label for="decimals" accesskey="d">Decimals:</label></td>';
$o.= ' <td colspan="2"><input name="decimals" type="text" size="6" maxlength="6" id="decimals" value="' . s($field->getDecimals()) . '" /><span id="decimalstip"></span></td></tr>';
- // xmldb_field Unsigned
- $unsignedoptions = array (0 => 'signed', 1 => 'unsigned');
- $select = html_writer::select($unsignedoptions, 'unsigned', $field->getUnsigned(), false);
- $o.= ' <tr valign="top"><td><label for="menuunsigned" accesskey="u">Unsigned:</label></td>';
- $o.= ' <td colspan="2">' . $select . '</td></tr>';
// xmldb_field NotNull
$notnulloptions = array (0 => 'null', 'not null');
$select = html_writer::select($notnulloptions, 'notnull', $field->getNotNull(), false);
View
16 admin/tool/xmldb/actions/edit_field/edit_field.js
@@ -50,7 +50,6 @@ function transformForm(event) {
var typeField = document.getElementById('menutype');
var lengthField = document.getElementById('length');
var decimalsField = document.getElementById('decimals');
- var unsignedField = document.getElementById('menuunsigned');
var notnullField = document.getElementById('menunotnull');
var sequenceField = document.getElementById('menusequence');
var defaultField = document.getElementById('default');
@@ -60,15 +59,12 @@ function transformForm(event) {
// Initially, enable everything
decimalsField.disabled = false;
- unsignedField.disabled = false;
notnullField.disabled = false;
sequenceField.disabled = false;
defaultField.disabled = false;
// Based on sequence, disable some items
if (sequenceField.value == '1') {
- unsignedField.disabled = true;
- unsignedField.value = '1';
notnullField.disabled = true;
notnullField.value = '1';
defaultField.disabled = true;
@@ -86,22 +82,16 @@ function transformForm(event) {
case '2': // XMLDB_TYPE_NUMBER
lengthTip.innerHTML = ' 1...20';
decimalsTip.innerHTML = ' 0...length or empty';
- unsignedField.disabled = true;
- unsignedField.value = '0';
break;
case '3': // XMLDB_TYPE_FLOAT
lengthTip.innerHTML = ' 1...20 or empty';
decimalsTip.innerHTML = ' 0...length or empty';
- unsignedField.disabled = true;
- unsignedField.value = '0';
break;
case '4': // XMLDB_TYPE_CHAR
lengthTip.innerHTML = ' 1...1333'; // Hardcoded, yes!
decimalsTip.innerHTML = '';
decimalsField.disabled = true;
decimalsField.value = '';
- unsignedField.disabled = true;
- unsignedField.value = '0';
sequenceField.disabled = true;
sequenceField.value = '0';
break;
@@ -110,8 +100,6 @@ function transformForm(event) {
decimalsTip.innerHTML = '';
decimalsField.disabled = true;
decimalsField.value = '';
- unsignedField.disabled = true;
- unsignedField.value = '0';
sequenceField.disabled = true;
sequenceField.value = '0';
defaultField.disabled = true;
@@ -122,8 +110,6 @@ function transformForm(event) {
decimalsTip.innerHTML = '';
decimalsField.disabled = true;
decimalsField.value = '';
- unsignedField.disabled = true;
- unsignedField.value = '0';
sequenceField.disabled = true;
sequenceField.value = '0';
defaultField.disabled = true;
@@ -136,8 +122,6 @@ function transformForm(event) {
decimalsTip.innerHTML = '';
decimalsField.disabled = true;
decimalsField.value = '';
- unsignedField.disabled = true;
- unsignedField.value = '0';
sequenceField.disabled = true;
sequenceField.value = '0';
defaultField.disabled = true;
View
4 admin/tool/xmldb/actions/edit_field_save/edit_field_save.class.php
@@ -96,7 +96,6 @@ function invoke() {
$type = required_param('type', PARAM_INT);
$length = strtolower(optional_param('length', NULL, PARAM_ALPHANUM));
$decimals = optional_param('decimals', NULL, PARAM_INT);
- $unsigned = optional_param('unsigned', false, PARAM_BOOL);
$notnull = optional_param('notnull', false, PARAM_BOOL);
$sequence = optional_param('sequence', false, PARAM_BOOL);
$default = optional_param('default', NULL, PARAM_PATH);
@@ -112,7 +111,6 @@ function invoke() {
// Perform some automatic assumptions
if ($sequence) {
- $unsigned = true;
$notnull = true;
$default = NULL;
}
@@ -231,7 +229,6 @@ function invoke() {
$tempfield->setType($type);
$tempfield->setLength($length);
$tempfield->setDecimals($decimals);
- $tempfield->setUnsigned($unsigned);
$tempfield->setNotNull($notnull);
$tempfield->setSequence($sequence);
$tempfield->setDefault($default);
@@ -268,7 +265,6 @@ function invoke() {
$field->setType($type);
$field->setLength($length);
$field->setDecimals($decimals);
- $field->setUnsigned($unsigned);
$field->setNotNull($notnull);
$field->setSequence($sequence);
$field->setDefault($default);
View
1  admin/tool/xmldb/actions/generate_documentation/xmldb.xsl
@@ -43,7 +43,6 @@
<td class="cell c1" style="white-space: nowrap;">
<xsl:value-of select="@TYPE"/>
(<xsl:value-of select="@LENGTH"/><xsl:if test="@DECIMALS">, <xsl:value-of select="@DECIMALS"/></xsl:if>)
- <xsl:if test="@UNSIGNED='true'">unsigned </xsl:if>
<xsl:if test="@NOTNULL='true'">not null </xsl:if>
<xsl:if test="@DEFAULT">
<xsl:choose>
View
1  admin/tool/xmldb/actions/new_table/new_table.class.php
@@ -90,7 +90,6 @@ function invoke() {
$field->setType(XMLDB_TYPE_INTEGER);
$field->setLength(10);
$field->setNotNull(true);
- $field->setUnsigned(true);
$field->setSequence(true);
$field->setLoaded(true);
$field->setChanged(true);
View
56 admin/tool/xmldb/actions/view_table_php/view_table_php.class.php
@@ -125,7 +125,6 @@ function invoke() {
$optionspacer . 'rename_field',
$optionspacer . 'change_field_type',
$optionspacer . 'change_field_precision',
- $optionspacer . 'change_field_unsigned',
$optionspacer . 'change_field_notnull',
$optionspacer . 'change_field_default',
$optionspacer . 'drop_enum_from_field', // TODO: Moodle 2.1 - Drop drop_enum_from_field
@@ -218,13 +217,6 @@ function invoke() {
$o.= $this->str['mustselectonefield'];
}
break;
- case 'change_field_unsigned':
- if ($fieldkeyindexinitial == 'f') { //Only if we have got one field
- $o.= s($this->change_field_unsigned_php($structure, $tableparam, $fieldkeyindexparam));
- } else {
- $o.= $this->str['mustselectonefield'];
- }
- break;
case 'change_field_notnull':
if ($fieldkeyindexinitial == 'f') { // Only if we have got one field
$o.= s($this->change_field_notnull_php($structure, $tableparam, $fieldkeyindexparam));
@@ -555,54 +547,6 @@ function change_field_precision_php($structure, $table, $field) {
/**
* This function will generate all the PHP code needed to
- * change the unsigned/signed of one field using XMLDB objects and functions
- *
- * @param xmldb_structure structure object containing all the info
- * @param string table table name
- * @param string field field name to change unsigned/signed
- */
- function change_field_unsigned_php($structure, $table, $field) {
-
- $result = '';
- // Validate if we can do it
- if (!$table = $structure->getTable($table)) {
- return false;
- }
- if (!$field = $table->getField($field)) {
- return false;
- }
- if ($table->getAllErrors()) {
- return false;
- }
-
- // Calculate the unsigned tip text
- $unsigned = $field->getUnsigned() ? 'unsigned' : 'signed';
-
- // Add the standard PHP header
- $result .= XMLDB_PHP_HEADER;
-
- // Add contents
- $result .= XMLDB_LINEFEED;
- $result .= ' // Changing sign of field ' . $field->getName() . ' on table ' . $table->getName() . ' to ' . $unsigned . XMLDB_LINEFEED;
- $result .= ' $table = new xmldb_table(' . "'" . $table->getName() . "'" . ');' . XMLDB_LINEFEED;
- $result .= ' $field = new xmldb_field(' . "'" . $field->getName() . "', " . $field->getPHP(true) . ');' . XMLDB_LINEFEED;
-
- // Launch the proper DDL
- $result .= XMLDB_LINEFEED;
- $result .= ' // Launch change of sign for field ' . $field->getName() . XMLDB_LINEFEED;
- $result .= ' $dbman->change_field_unsigned($table, $field);' . XMLDB_LINEFEED;
-
- // Add the proper upgrade_xxxx_savepoint call
- $result .= $this->upgrade_savepoint_php ($structure);
-
- // Add standard PHP footer
- $result .= XMLDB_PHP_FOOTER;
-
- return $result;
- }
-
- /**
- * This function will generate all the PHP code needed to
* change the nullability of one field using XMLDB objects and functions
*
* @param xmldb_structure structure object containing all the info
View
1  admin/tool/xmldb/lang/en/tool_xmldb.php
@@ -126,7 +126,6 @@
$string['mustselectonefield'] = 'You must select one field to see field related actions!';
$string['mustselectoneindex'] = 'You must select one index to see index related actions!';
$string['mustselectonekey'] = 'You must select one key to see key related actions!';
-$string['mysqlextracheckbigints'] = 'Under MySQL it also looks for incorrectly signed bigints, generating the required SQL to be executed in order to fix all them.';
$string['newfield'] = 'New field';
$string['newindex'] = 'New index';
$string['newkey'] = 'New key';
View
11 auth/cas/auth.php
@@ -51,7 +51,7 @@ function prevent_local_passwords() {
*/
function user_login ($username, $password) {
$this->connectCAS();
- return phpCAS::isAuthenticated() && (trim(moodle_strtolower(phpCAS::getUser())) == $username);
+ return phpCAS::isAuthenticated() && (trim(textlib::strtolower(phpCAS::getUser())) == $username);
}
/**
@@ -336,15 +336,15 @@ function process_config($config) {
set_config('host_url', trim($config->host_url), $this->pluginconfig);
set_config('ldapencoding', trim($config->ldapencoding), $this->pluginconfig);
set_config('contexts', trim($config->contexts), $this->pluginconfig);
- set_config('user_type', moodle_strtolower(trim($config->user_type)), $this->pluginconfig);
- set_config('user_attribute', moodle_strtolower(trim($config->user_attribute)), $this->pluginconfig);
+ set_config('user_type', textlib::strtolower(trim($config->user_type)), $this->pluginconfig);
+ set_config('user_attribute', textlib::strtolower(trim($config->user_attribute)), $this->pluginconfig);
set_config('search_sub', $config->search_sub, $this->pluginconfig);
set_config('opt_deref', $config->opt_deref, $this->pluginconfig);
set_config('bind_dn', trim($config->bind_dn), $this->pluginconfig);
set_config('bind_pw', $config->bind_pw, $this->pluginconfig);
set_config('ldap_version', $config->ldap_version, $this->pluginconfig);
set_config('objectclass', trim($config->objectclass), $this->pluginconfig);
- set_config('memberattribute', moodle_strtolower(trim($config->memberattribute)), $this->pluginconfig);
+ set_config('memberattribute', textlib::strtolower(trim($config->memberattribute)), $this->pluginconfig);
set_config('memberattribute_isdn', $config->memberattribute_isdn, $this->pluginconfig);
set_config('attrcreators', trim($config->attrcreators), $this->pluginconfig);
set_config('groupecreators', trim($config->groupecreators), $this->pluginconfig);
@@ -364,8 +364,7 @@ function iscreator($username) {
return false;
}
- $textlib = textlib_get_instance();
- $extusername = $textlib->convert($username, 'utf-8', $this->config->ldapencoding);
+ $extusername = textlib::convert($username, 'utf-8', $this->config->ldapencoding);
// Test for group creator
if (!empty($this->config->groupecreators)) {
View
74 auth/ldap/auth.php
@@ -133,9 +133,8 @@ function user_login($username, $password) {
return false;
}
- $textlib = textlib_get_instance();
- $extusername = $textlib->convert($username, 'utf-8', $this->config->ldapencoding);
- $extpassword = $textlib->convert($password, 'utf-8', $this->config->ldapencoding);
+ $extusername = textlib::convert($username, 'utf-8', $this->config->ldapencoding);
+ $extpassword = textlib::convert($password, 'utf-8', $this->config->ldapencoding);
// Before we connect to LDAP, check if this is an AD SSO login
// if we succeed in this block, we'll return success early.
@@ -199,8 +198,7 @@ function user_login($username, $password) {
* @return mixed array with no magic quotes or false on error
*/
function get_userinfo($username) {
- $textlib = textlib_get_instance();
- $extusername = $textlib->convert($username, 'utf-8', $this->config->ldapencoding);
+ $extusername = textlib::convert($username, 'utf-8', $this->config->ldapencoding);
$ldapconnection = $this->ldap_connect();
if(!($user_dn = $this->ldap_find_userdn($ldapconnection, $extusername))) {
@@ -245,9 +243,9 @@ function get_userinfo($username) {
continue; // wrong data mapping!
}
if (is_array($entry[$value])) {
- $newval = $textlib->convert($entry[$value][0], $this->config->ldapencoding, 'utf-8');
+ $newval = textlib::convert($entry[$value][0], $this->config->ldapencoding, 'utf-8');
} else {
- $newval = $textlib->convert($entry[$value], $this->config->ldapencoding, 'utf-8');
+ $newval = textlib::convert($entry[$value], $this->config->ldapencoding, 'utf-8');
}
if (!empty($newval)) { // favour ldap entries that are set
$ldapval = $newval;
@@ -298,8 +296,7 @@ function get_userlist() {
* @param string $username
*/
function user_exists($username) {
- $textlib = textlib_get_instance();
- $extusername = $textlib->convert($username, 'utf-8', $this->config->ldapencoding);
+ $extusername = textlib::convert($username, 'utf-8', $this->config->ldapencoding);
// Returns true if given username exists on ldap
$users = $this->ldap_get_userlist('('.$this->config->user_attribute.'='.ldap_filter_addslashes($extusername).')');
@@ -315,9 +312,8 @@ function user_exists($username) {
* @param mixed $plainpass Plaintext password
*/
function user_create($userobject, $plainpass) {
- $textlib = textlib_get_instance();
- $extusername = $textlib->convert($userobject->username, 'utf-8', $this->config->ldapencoding);
- $extpassword = $textlib->convert($plainpass, 'utf-8', $this->config->ldapencoding);
+ $extusername = textlib::convert($userobject->username, 'utf-8', $this->config->ldapencoding);
+ $extpassword = textlib::convert($plainpass, 'utf-8', $this->config->ldapencoding);
switch ($this->config->passtype) {
case 'md5':
@@ -342,7 +338,7 @@ function user_create($userobject, $plainpass) {
}
foreach ($values as $value) {
if (!empty($userobject->$key) ) {
- $newuser[$value] = $textlib->convert($userobject->$key, 'utf-8', $this->config->ldapencoding);
+ $newuser[$value] = textlib::convert($userobject->$key, 'utf-8', $this->config->ldapencoding);
}
}
}
@@ -570,8 +566,7 @@ function user_confirm($username, $confirmsecret) {
function password_expire($username) {
$result = 0;
- $textlib = textlib_get_instance();
- $extusername = $textlib->convert($username, 'utf-8', $this->config->ldapencoding);
+ $extusername = textlib::convert($username, 'utf-8', $this->config->ldapencoding);
$ldapconnection = $this->ldap_connect();
$user_dn = $this->ldap_find_userdn($ldapconnection, $extusername);
@@ -616,7 +611,6 @@ function sync_users($do_updates=true) {
print_string('connectingldap', 'auth_ldap');
$ldapconnection = $this->ldap_connect();
- $textlib = textlib_get_instance();
$dbman = $DB->get_manager();
/// Define table user to be created
@@ -667,7 +661,7 @@ function sync_users($do_updates=true) {
if ($entry = @ldap_first_entry($ldapconnection, $ldap_result)) {
do {
$value = ldap_get_values_len($ldapconnection, $entry, $this->config->user_attribute);
- $value = $textlib->convert($value[0], $this->config->ldapencoding, 'utf-8');
+ $value = textlib::convert($value[0], $this->config->ldapencoding, 'utf-8');
$this->ldap_bulk_insert($value);
} while ($entry = ldap_next_entry($ldapconnection, $entry));
}
@@ -845,7 +839,7 @@ function sync_users($do_updates=true) {
$user->mnethostid = $CFG->mnet_localhost_id;
// get_userinfo_asobj() might have replaced $user->username with the value
// from the LDAP server (which can be mixed-case). Make sure it's lowercase
- $user->username = trim(moodle_strtolower($user->username));
+ $user->username = trim(textlib::strtolower($user->username));
if (empty($user->lang)) {
$user->lang = $CFG->lang;
}
@@ -889,7 +883,7 @@ function update_user_record($username, $updatekeys = false) {
global $CFG, $DB;
// Just in case check text case
- $username = trim(moodle_strtolower($username));
+ $username = trim(textlib::strtolower($username));
// Get the current user record
$user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id));
@@ -934,7 +928,7 @@ function update_user_record($username, $updatekeys = false) {
function ldap_bulk_insert($username) {
global $DB, $CFG;
- $username = moodle_strtolower($username); // usernames are __always__ lowercase.
+ $username = textlib::strtolower($username); // usernames are __always__ lowercase.
$DB->insert_record_raw('tmp_extuser', array('username'=>$username,
'mnethostid'=>$CFG->mnet_localhost_id), false, true);
echo '.';
@@ -947,8 +941,7 @@ function ldap_bulk_insert($username) {
* @return boolean result
*/
function user_activate($username) {
- $textlib = textlib_get_instance();
- $extusername = $textlib->convert($username, 'utf-8', $this->config->ldapencoding);
+ $extusername = textlib::convert($username, 'utf-8', $this->config->ldapencoding);
$ldapconnection = $this->ldap_connect();
@@ -998,8 +991,7 @@ function iscreator($username) {
return null;
}
- $textlib = textlib_get_instance();
- $extusername = $textlib->convert($username, 'utf-8', $this->config->ldapencoding);
+ $extusername = textlib::convert($username, 'utf-8', $this->config->ldapencoding);
$ldapconnection = $this->ldap_connect();
@@ -1057,8 +1049,7 @@ function user_update($olduser, $newuser) {
return true;
}
- $textlib = textlib_get_instance();
- $extoldusername = $textlib->convert($olduser->username, 'utf-8', $this->config->ldapencoding);
+ $extoldusername = textlib::convert($olduser->username, 'utf-8', $this->config->ldapencoding);
$ldapconnection = $this->ldap_connect();
@@ -1112,9 +1103,9 @@ function user_update($olduser, $newuser) {
$ambiguous = false;
}
- $nuvalue = $textlib->convert($newuser->$key, 'utf-8', $this->config->ldapencoding);
+ $nuvalue = textlib::convert($newuser->$key, 'utf-8', $this->config->ldapencoding);
empty($nuvalue) ? $nuvalue = array() : $nuvalue;
- $ouvalue = $textlib->convert($olduser->$key, 'utf-8', $this->config->ldapencoding);
+ $ouvalue = textlib::convert($olduser->$key, 'utf-8', $this->config->ldapencoding);
foreach ($ldapkeys as $ldapkey) {
$ldapkey = $ldapkey;
@@ -1210,9 +1201,8 @@ function user_update_password($user, $newpassword) {
$result = false;
$username = $user->username;
- $textlib = textlib_get_instance();
- $extusername = $textlib->convert($username, 'utf-8', $this->config->ldapencoding);
- $extpassword = $textlib->convert($newpassword, 'utf-8', $this->config->ldapencoding);
+ $extusername = textlib::convert($username, 'utf-8', $this->config->ldapencoding);
+ $extpassword = textlib::convert($newpassword, 'utf-8', $this->config->ldapencoding);
switch ($this->config->passtype) {
case 'md5':
@@ -1380,13 +1370,13 @@ function ldap_attributes () {
$moodleattributes = array();
foreach ($this->userfields as $field) {
if (!empty($this->config->{"field_map_$field"})) {
- $moodleattributes[$field] = moodle_strtolower(trim($this->config->{"field_map_$field"}));
+ $moodleattributes[$field] = textlib::strtolower(trim($this->config->{"field_map_$field"}));
if (preg_match('/,/', $moodleattributes[$field])) {
$moodleattributes[$field] = explode(',', $moodleattributes[$field]); // split ?
}
}
}
- $moodleattributes['username'] = moodle_strtolower(trim($this->config->user_attribute));
+ $moodleattributes['username'] = textlib::strtolower(trim($this->config->user_attribute));
return $moodleattributes;
}
@@ -1435,9 +1425,8 @@ function ldap_get_userlist($filter='*') {
$users = ldap_get_entries_moodle($ldapconnection, $ldap_result);
// Add found users to list
- $textlib = textlib_get_instance();
for ($i = 0; $i < count($users); $i++) {
- $extuser = $textlib->convert($users[$i][$this->config->user_attribute][0],
+ $extuser = textlib::convert($users[$i][$this->config->user_attribute][0],
$this->config->ldapencoding, 'utf-8');
array_push($fresult, $extuser);
}
@@ -1575,8 +1564,7 @@ function ntlmsso_magic($sesskey) {
// (according to my reading of RFC-1945, RFC-2616 and RFC-2617 and
// my local tests), so we need to convert the REMOTE_USER value
// (i.e., what we got from the HTTP WWW-Authenticate header) into UTF-8
- $textlib = textlib_get_instance();
- $username = $textlib->convert($_SERVER['REMOTE_USER'], 'iso-8859-1', 'utf-8');
+ $username = textlib::convert($_SERVER['REMOTE_USER'], 'iso-8859-1', 'utf-8');
switch ($this->config->ntlmsso_type) {
case 'ntlm':
@@ -1592,7 +1580,7 @@ function ntlmsso_magic($sesskey) {
return false; // Should never happen!
}
- $username = moodle_strtolower($username); // Compatibility hack
+ $username = textlib::strtolower($username); // Compatibility hack
set_cache_flag($this->pluginconfig.'/ntlmsess', $sesskey, $username, AUTH_NTLMTIMEOUT);
return true;
}
@@ -1794,8 +1782,8 @@ function process_config($config) {
set_config('host_url', trim($config->host_url), $this->pluginconfig);
set_config('ldapencoding', trim($config->ldapencoding), $this->pluginconfig);
set_config('contexts', trim($config->contexts), $this->pluginconfig);
- set_config('user_type', moodle_strtolower(trim($config->user_type)), $this->pluginconfig);
- set_config('user_attribute', moodle_strtolower(trim($config->user_attribute)), $this->pluginconfig);
+ set_config('user_type', textlib::strtolower(trim($config->user_type)), $this->pluginconfig);
+ set_config('user_attribute', textlib::strtolower(trim($config->user_attribute)), $this->pluginconfig);
set_config('search_sub', $config->search_sub, $this->pluginconfig);
set_config('opt_deref', $config->opt_deref, $this->pluginconfig);
set_config('preventpassindb', $config->preventpassindb, $this->pluginconfig);
@@ -1803,15 +1791,15 @@ function process_config($config) {
set_config('bind_pw', $config->bind_pw, $this->pluginconfig);
set_config('ldap_version', $config->ldap_version, $this->pluginconfig);
set_config('objectclass', trim($config->objectclass), $this->pluginconfig);
- set_config('memberattribute', moodle_strtolower(trim($config->memberattribute)), $this->pluginconfig);
+ set_config('memberattribute', textlib::strtolower(trim($config->memberattribute)), $this->pluginconfig);
set_config('memberattribute_isdn', $config->memberattribute_isdn, $this->pluginconfig);
set_config('creators', trim($config->creators), $this->pluginconfig);
set_config('create_context', trim($config->create_context), $this->pluginconfig);
set_config('expiration', $config->expiration, $this->pluginconfig);
set_config('expiration_warning', trim($config->expiration_warning), $this->pluginconfig);
- set_config('expireattr', moodle_strtolower(trim($config->expireattr)), $this->pluginconfig);
+ set_config('expireattr', textlib::strtolower(trim($config->expireattr)), $this->pluginconfig);
set_config('gracelogins', $config->gracelogins, $this->pluginconfig);
- set_config('graceattr', moodle_strtolower(trim($config->graceattr)), $this->pluginconfig);
+ set_config('graceattr', textlib::strtolower(trim($config->graceattr)), $this->pluginconfig);
set_config('auth_user_create', $config->auth_user_create, $this->pluginconfig);
set_config('forcechangepassword', $config->forcechangepassword, $this->pluginconfig);
set_config('stdchangepassword', $config->stdchangepassword, $this->pluginconfig);
View
4 backup/converter/moodle1/handlerlib.php
@@ -441,7 +441,6 @@ public function on_root_element_end() {
'users' => 0, // @todo how to detect this from moodle.xml?
'anonymize' => 0,
'role_assignments' => 0,
- 'user_files' => 0,
'activities' => 1,
'blocks' => 1,
'filters' => 0,
@@ -1190,8 +1189,7 @@ public function process_question(array $data, array $raw) {
// replay the upgrade step 2010080901 - updating question image
if (!empty($data['image'])) {
- $textlib = textlib_get_instance();
- if ($textlib->substr($textlib->strtolower($data['image']), 0, 7) == 'http://') {
+ if (textlib::substr(textlib::strtolower($data['image']), 0, 7) == 'http://') {
// it is a link, appending to existing question text
$data['questiontext'] .= ' <img src="' . $data['image'] . '" />';
View
6 backup/converter/moodle1/lib.php
@@ -1161,9 +1161,6 @@ class moodle1_file_manager implements loggable {
/** @var string the root of the converter temp directory */
protected $basepath;
- /** @var textlib instance used during the migration */
- protected $textlib;
-
/** @var array of file ids that were migrated by this instance */
protected $fileids = array();
@@ -1187,7 +1184,6 @@ public function __construct(moodle1_converter $converter, $contextid = null, $co
$this->userid = $userid;
// set other useful bits
$this->basepath = $converter->get_tempdir_path();
- $this->textlib = textlib_get_instance();
}
/**
@@ -1218,7 +1214,7 @@ public function migrate_file($sourcepath, $filepath = '/', $filename = null, $so
}
$filepath = clean_param($filepath, PARAM_PATH);
- if ($this->textlib->strlen($filepath) > 255) {
+ if (textlib::strlen($filepath) > 255) {
throw new moodle1_convert_exception('file_path_longer_than_255_chars');
}
View
84 backup/moodle2/backup_activity_task.class.php
@@ -16,17 +16,23 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_activity_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
- * abstract activity task that provides all the properties and common tasks to be performed
- * when one activity is being backup
+ * Provides all the settings and steps to perform one complete backup of the activity
*
- * TODO: Finish phpdocs
+ * Activities are supposed to provide the subclass of this class in their file
+ * mod/MODULENAME/backup/moodle2/backup_MODULENAME_activity_task.class.php
+ * The expected name of the subclass is backup_MODULENAME_activity_task
*/
abstract class backup_activity_task extends backup_task {
@@ -38,6 +44,10 @@
/**
* Constructor - instantiates one object of this class
+ *
+ * @param string $name the task identifier
+ * @param int $moduleid course module id (id in course_modules table)
+ * @param backup_plan|null $plan the backup plan instance this task is part of
*/
public function __construct($name, $moduleid, $plan = null) {
@@ -59,28 +69,43 @@ public function __construct($name, $moduleid, $plan = null) {
parent::__construct($name, $plan);
}
+ /**
+ * @return int the course module id (id in the course_modules table)
+ */
public function get_moduleid() {
return $this->moduleid;
}
+ /**
+ * @return int the course section id (id in the course_sections table)
+ */
public function get_sectionid() {
return $this->sectionid;
}
+ /**
+ * @return string the name of the module, eg 'workshop' (from the modules table)
+ */
public function get_modulename() {
return $this->modulename;
}
+ /**
+ * @return int the id of the activity instance (id in the activity's instances table)
+ */
public function get_activityid() {
return $this->activityid;
}
+ /**
+ * @return int the id of the associated CONTEXT_MODULE instance
+ */
public function get_contextid() {
return $this->contextid;
}
/**
- * Activity tasks have their own directory to write files
+ * @return string full path to the directory where this task writes its files
*/
public function get_taskbasepath() {
return $this->get_basepath() . '/activities/' . $this->modulename . '_' . $this->moduleid;
@@ -184,9 +209,11 @@ public function execute() {
/**
- * Specialisation that, first of all, looks for the setting within
- * the task with the the prefix added and later, delegates to parent
- * without adding anything
+ * Tries to look for the instance specific setting value, task specific setting value or the
+ * common plan setting value - in that order
+ *
+ * @param string $name the name of the setting
+ * @return mixed|null the value of the setting or null if not found
*/
public function get_setting($name) {
$namewithprefix = $this->modulename . '_' . $this->moduleid . '_' . $name;
@@ -211,7 +238,7 @@ public function get_setting($name) {
// Protected API starts here
/**
- * Define the common setting that any backup activity will have
+ * Defines the common setting that any backup activity will have
*/
protected function define_settings() {
@@ -264,21 +291,44 @@ protected function define_settings() {
}
/**
- * Define (add) particular settings that each activity can have
+ * Defines activity specific settings to be added to the common ones
+ *
+ * This method is called from {@link self::define_settings()}. The activity module
+ * author may use it to define additional settings that influence the execution of
+ * the backup.
+ *
+ * Most activities just leave the method empty.
+ *
+ * @see self::define_settings() for the example how to define own settings
*/
abstract protected function define_my_settings();
/**
- * Define (add) particular steps that each activity can have
+ * Defines activity specific steps for this task
+ *
+ * This method is called from {@link self::build()}. Activities are supposed
+ * to call {self::add_step()} in it to include their specific steps in the
+ * backup plan.
*/
abstract protected function define_my_steps();
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the activity instance's scripts into a site-independent form
+ *
+ * The current instance of the activity may be referenced from other places in
+ * the course by URLs like http://my.moodle.site/mod/workshop/view.php?id=42
+ * Obvisouly, such URLs are not valid any more once the course is restored elsewhere.
+ * For this reason the backup file does not store the original URLs but encodes them
+ * into a transportable form. During the restore, the reverse process is applied and
+ * the encoded URLs are replaced with the new ones valid for the target site.
+ *
+ * Every plugin must override this method in its subclass.
+ *
+ * @see backup_xml_transformer class that actually runs the transformation
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
throw new coding_exception('encode_content_links() method needs to be overridden in each subclass of backup_activity_task');
}
-
}
View
11 backup/moodle2/backup_block_task.class.php
@@ -16,12 +16,15 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* abstract block task that provides all the properties and common steps to be performed
* when one block is being backup
View
11 backup/moodle2/backup_course_task.class.php
@@ -16,10 +16,13 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_course_task
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
View
9 backup/moodle2/backup_coursereport_plugin.class.php
@@ -24,10 +24,11 @@
* backed up, a course report should make use of the second and third
* parameters in get_plugin_element().
*
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2011 onwards The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 onwards The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class backup_coursereport_plugin extends backup_plugin {
// Use default parent behaviour
View
13 backup/moodle2/backup_custom_fields.php
@@ -16,12 +16,17 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines various element classes used in specific areas
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Implementation of backup_final_element that provides one interceptor for anonymization of data
*
View
13 backup/moodle2/backup_default_block_task.class.php
@@ -16,12 +16,17 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_default_block_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Default block task to backup blocks that haven't own DB structures to be added
* when one block is being backup
View
15 backup/moodle2/backup_final_task.class.php
@@ -16,12 +16,17 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_final_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Final task that provides all the final steps necessary in order to finish one
* backup (mainly gathering references and creating the main xml) apart from
@@ -59,7 +64,7 @@ public function build() {
// done in a single pass
$this->add_step(new backup_annotate_all_question_files('question_files'));
- // Annotate all the user files (conditionally) (private, profile and icon files)
+ // Annotate all the user files (conditionally) (profile and icon files)
// Because each user has its own context, we need a separate/specialised step here
// This step also ensures that the contexts for all the users exist, so next
// step can be safely executed (join between users and contexts)
View
13 backup/moodle2/backup_format_plugin.class.php
@@ -16,12 +16,17 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_format_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Class extending standard backup_plugin in order to implement some
* helper methods related with the course formats (format plugin)
View
12 backup/moodle2/backup_gradingform_plugin.class.php
@@ -16,10 +16,13 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package core
- * @subpackage backup-moodle2
- * @copyright 2011 David Mudrak <david@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_gradingform_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 David Mudrak <david@moodle.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
@@ -28,5 +31,4 @@
* Base class for all advanced grading form plugins
*/
abstract class backup_gradingform_plugin extends backup_plugin {
-
}
View
13 backup/moodle2/backup_plagiarism_plugin.class.php
@@ -16,12 +16,17 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_plagiarism_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Class extending standard backup_plugin in order to implement some
* helper methods related with the plagiarism plugins (plagiarism plugin)
View
11 backup/moodle2/backup_plan_builder.class.php
@@ -16,10 +16,13 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_plan_builder class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
View
13 backup/moodle2/backup_plugin.class.php
@@ -16,12 +16,17 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Class implementing the plugins support for moodle2 backups
*
View
13 backup/moodle2/backup_qtype_plugin.class.php
@@ -16,12 +16,17 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_qtype_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Class extending standard backup_plugin in order to implement some
* helper methods related with the questions (qtype plugin)