Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge remote branch 'origin/master' into rubric

Conflicts:
	lib/db/install.xml
	lib/db/upgrade.php
	version.php
  • Loading branch information...
commit e8004aadc8e426f628a840d1ce396cb4be80b745 2 parents afc766a + 9086337
David Mudrák authored October 07, 2011

Showing 210 changed files with 19,564 additions and 1,312 deletions. Show diff stats Hide diff stats

  1. 34  admin/tool/xmldb/actions/XMLDBAction.class.php
  2. 58  admin/tool/xmldb/actions/XMLDBCheckAction.class.php
  3. 34  admin/tool/xmldb/actions/check_bigints/check_bigints.class.php
  4. 24  admin/tool/xmldb/actions/check_defaults/check_defaults.class.php
  5. 20  admin/tool/xmldb/actions/check_foreign_keys/check_foreign_keys.class.php
  6. 32  admin/tool/xmldb/actions/check_indexes/check_indexes.class.php
  7. 24  admin/tool/xmldb/actions/create_xml_file/create_xml_file.class.php
  8. 30  admin/tool/xmldb/actions/delete_field/delete_field.class.php
  9. 30  admin/tool/xmldb/actions/delete_index/delete_index.class.php
  10. 30  admin/tool/xmldb/actions/delete_key/delete_key.class.php
  11. 22  admin/tool/xmldb/actions/delete_table/delete_table.class.php
  12. 20  admin/tool/xmldb/actions/delete_xml_file/delete_xml_file.class.php
  13. 68  admin/tool/xmldb/actions/edit_field/edit_field.class.php
  14. 95  admin/tool/xmldb/actions/edit_field/edit_field.js
  15. 62  admin/tool/xmldb/actions/edit_field_save/edit_field_save.class.php
  16. 46  admin/tool/xmldb/actions/edit_index/edit_index.class.php
  17. 64  admin/tool/xmldb/actions/edit_index_save/edit_index_save.class.php
  18. 58  admin/tool/xmldb/actions/edit_key/edit_key.class.php
  19. 80  admin/tool/xmldb/actions/edit_key/edit_key.js
  20. 82  admin/tool/xmldb/actions/edit_key_save/edit_key_save.class.php
  21. 115  admin/tool/xmldb/actions/edit_table/edit_table.class.php
  22. 48  admin/tool/xmldb/actions/edit_table_save/edit_table_save.class.php
  23. 75  admin/tool/xmldb/actions/edit_xml_file/edit_xml_file.class.php
  24. 26  admin/tool/xmldb/actions/edit_xml_file_save/edit_xml_file_save.class.php
  25. 14  admin/tool/xmldb/actions/generate_all_documentation/generate_all_documentation.class.php
  26. 18  admin/tool/xmldb/actions/generate_documentation/generate_documentation.class.php
  27. 24  admin/tool/xmldb/actions/get_db_directories/get_db_directories.class.php
  28. 30  admin/tool/xmldb/actions/load_xml_file/load_xml_file.class.php
  29. 24  admin/tool/xmldb/actions/load_xml_files/load_xml_files.class.php
  30. 78  admin/tool/xmldb/actions/main_view/main_view.class.php
  31. 40  admin/tool/xmldb/actions/move_updown_field/move_updown_field.class.php
  32. 40  admin/tool/xmldb/actions/move_updown_index/move_updown_index.class.php
  33. 40  admin/tool/xmldb/actions/move_updown_key/move_updown_key.class.php
  34. 40  admin/tool/xmldb/actions/move_updown_table/move_updown_table.class.php
  35. 31  admin/tool/xmldb/actions/new_field/new_field.class.php
  36. 31  admin/tool/xmldb/actions/new_index/new_index.class.php
  37. 31  admin/tool/xmldb/actions/new_key/new_key.class.php
  38. 29  admin/tool/xmldb/actions/new_table/new_table.class.php
  39. 68  admin/tool/xmldb/actions/new_table_from_mysql/new_table_from_mysql.class.php
  40. 22  admin/tool/xmldb/actions/revert_changes/revert_changes.class.php
  41. 30  admin/tool/xmldb/actions/save_xml_file/save_xml_file.class.php
  42. 24  admin/tool/xmldb/actions/template/template.class.php
  43. 23  admin/tool/xmldb/actions/unload_xml_file/unload_xml_file.class.php
  44. 36  admin/tool/xmldb/actions/view_field_xml/view_field_xml.class.php
  45. 36  admin/tool/xmldb/actions/view_index_xml/view_index_xml.class.php
  46. 36  admin/tool/xmldb/actions/view_key_xml/view_key_xml.class.php
  47. 26  admin/tool/xmldb/actions/view_reserved_words/view_reserved_words.class.php
  48. 91  admin/tool/xmldb/actions/view_structure_php/view_structure_php.class.php
  49. 23  admin/tool/xmldb/actions/view_structure_sql/view_structure_sql.class.php
  50. 28  admin/tool/xmldb/actions/view_structure_xml/view_structure_xml.class.php
  51. 257  admin/tool/xmldb/actions/view_table_php/view_table_php.class.php
  52. 54  admin/tool/xmldb/actions/view_table_php/view_table_php.js
  53. 25  admin/tool/xmldb/actions/view_table_sql/view_table_sql.class.php
  54. 32  admin/tool/xmldb/actions/view_table_xml/view_table_xml.class.php
  55. 26  admin/tool/xmldb/actions/view_xml/view_xml.class.php
  56. 30  admin/tool/xmldb/index.php
  57. 2  backup/moodle2/backup_course_task.class.php
  58. 2  backup/moodle2/restore_course_task.class.php
  59. 24  backup/util/helper/backup_cron_helper.class.php
  60. 1  blocks/search/block_search.php
  61. 4  course/lib.php
  62. 2  grade/import/xml/grade_import_form.php
  63. 1  install/lang/bg/admin.php
  64. 1  install/lang/bg/error.php
  65. 1  install/lang/bg/install.php
  66. 3  install/lang/ru/error.php
  67. 1  lang/en/search.php
  68. 10  lib/db/install.xml
  69. 53  lib/db/upgrade.php
  70. 16  lib/dml/mysqli_native_moodle_database.php
  71. 6  lib/dml/pgsql_native_moodle_database.php
  72. 34  lib/dml/simpletest/testdml.php
  73. 59  lib/enrollib.php
  74. 2  lib/form/editor.php
  75. 1  lib/form/filemanager.php
  76. 19  lib/form/filepicker.js
  77. 4  lib/form/filepicker.php
  78. 24  lib/form/form.js
  79. 49  lib/formslib.php
  80. 2  lib/portfoliolib.php
  81. 2  lib/setup.php
  82. 2  lib/thirdpartylibs.xml
  83. 199  lib/yui/3.4.1/build/align-plugin/align-plugin-debug.js
  84. 7  lib/yui/3.4.1/build/align-plugin/align-plugin-min.js
  85. 199  lib/yui/3.4.1/build/align-plugin/align-plugin.js
  86. 676  lib/yui/3.4.1/build/anim-base/anim-base-debug.js
  87. 7  lib/yui/3.4.1/build/anim-base/anim-base-min.js
  88. 675  lib/yui/3.4.1/build/anim-base/anim-base.js
  89. 54  lib/yui/3.4.1/build/anim-color/anim-color-debug.js
  90. 7  lib/yui/3.4.1/build/anim-color/anim-color-min.js
  91. 54  lib/yui/3.4.1/build/anim-color/anim-color.js
  92. 63  lib/yui/3.4.1/build/anim-curve/anim-curve-debug.js
  93. 7  lib/yui/3.4.1/build/anim-curve/anim-curve-min.js
  94. 63  lib/yui/3.4.1/build/anim-curve/anim-curve.js
  95. 356  lib/yui/3.4.1/build/anim-easing/anim-easing-debug.js
  96. 7  lib/yui/3.4.1/build/anim-easing/anim-easing-min.js
  97. 356  lib/yui/3.4.1/build/anim-easing/anim-easing.js
  98. 32  lib/yui/3.4.1/build/anim-node-plugin/anim-node-plugin-debug.js
  99. 7  lib/yui/3.4.1/build/anim-node-plugin/anim-node-plugin-min.js
  100. 32  lib/yui/3.4.1/build/anim-node-plugin/anim-node-plugin.js
  101. 44  lib/yui/3.4.1/build/anim-scroll/anim-scroll-debug.js
  102. 7  lib/yui/3.4.1/build/anim-scroll/anim-scroll-min.js
  103. 44  lib/yui/3.4.1/build/anim-scroll/anim-scroll.js
  104. 32  lib/yui/3.4.1/build/anim-xy/anim-xy-debug.js
  105. 7  lib/yui/3.4.1/build/anim-xy/anim-xy-min.js
  106. 32  lib/yui/3.4.1/build/anim-xy/anim-xy.js
  107. 365  lib/yui/3.4.1/build/array-extras/array-extras-debug.js
  108. 7  lib/yui/3.4.1/build/array-extras/array-extras-min.js
  109. 364  lib/yui/3.4.1/build/array-extras/array-extras.js
  110. 46  lib/yui/3.4.1/build/array-invoke/array-invoke-debug.js
  111. 7  lib/yui/3.4.1/build/array-invoke/array-invoke-min.js
  112. 46  lib/yui/3.4.1/build/array-invoke/array-invoke.js
  113. 90  lib/yui/3.4.1/build/arraylist-add/arraylist-add-debug.js
  114. 7  lib/yui/3.4.1/build/arraylist-add/arraylist-add-min.js
  115. 90  lib/yui/3.4.1/build/arraylist-add/arraylist-add.js
  116. 49  lib/yui/3.4.1/build/arraylist-filter/arraylist-filter-debug.js
  117. 7  lib/yui/3.4.1/build/arraylist-filter/arraylist-filter-min.js
  118. 49  lib/yui/3.4.1/build/arraylist-filter/arraylist-filter.js
  119. 218  lib/yui/3.4.1/build/arraylist/arraylist-debug.js
  120. 7  lib/yui/3.4.1/build/arraylist/arraylist-min.js
  121. 218  lib/yui/3.4.1/build/arraylist/arraylist.js
  122. 69  lib/yui/3.4.1/build/arraysort/arraysort-debug.js
  123. 7  lib/yui/3.4.1/build/arraysort/arraysort-min.js
  124. 69  lib/yui/3.4.1/build/arraysort/arraysort.js
  125. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/arrows.png
  126. 7  lib/yui/3.4.1/build/assets/skins/sam/autocomplete-list.css
  127. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/bg.png
  128. 7  lib/yui/3.4.1/build/assets/skins/sam/calendar-base.css
  129. 7  lib/yui/3.4.1/build/assets/skins/sam/calendar.css
  130. 7  lib/yui/3.4.1/build/assets/skins/sam/calendarnavigator.css
  131. 7  lib/yui/3.4.1/build/assets/skins/sam/console-filters.css
  132. 7  lib/yui/3.4.1/build/assets/skins/sam/console.css
  133. 8  lib/yui/3.4.1/build/assets/skins/sam/datatable-base.css
  134. 7  lib/yui/3.4.1/build/assets/skins/sam/dial.css
  135. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/dt-arrow-dn.png
  136. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/dt-arrow-up.png
  137. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/horizontal-menu-submenu-indicator.png
  138. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/horizontal-menu-submenu-toggle.png
  139. 7  lib/yui/3.4.1/build/assets/skins/sam/node-flick.css
  140. 7  lib/yui/3.4.1/build/assets/skins/sam/node-menunav.css
  141. 7  lib/yui/3.4.1/build/assets/skins/sam/overlay.css
  142. 7  lib/yui/3.4.1/build/assets/skins/sam/panel.css
  143. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/rail-x-lines.png
  144. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/rail-x.png
  145. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/rail-y-lines.png
  146. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/rail-y.png
  147. 7  lib/yui/3.4.1/build/assets/skins/sam/resize-base.css
  148. 7  lib/yui/3.4.1/build/assets/skins/sam/scrollview-base.css
  149. 7  lib/yui/3.4.1/build/assets/skins/sam/scrollview-list.css
  150. 7  lib/yui/3.4.1/build/assets/skins/sam/scrollview-scrollbars.css
  151. 29  lib/yui/3.4.1/build/assets/skins/sam/skin.css
  152. 7  lib/yui/3.4.1/build/assets/skins/sam/slider-base.css
  153. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/sprite.png
  154. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/sprite_icons.gif
  155. 7  lib/yui/3.4.1/build/assets/skins/sam/tabview.css
  156. 7  lib/yui/3.4.1/build/assets/skins/sam/test.css
  157. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/thumb-x.png
  158. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/thumb-y.png
  159. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/vertical-menu-submenu-indicator.png
  160. 0  lib/yui/{3.4.1pr1 → 3.4.1}/build/assets/skins/sam/warn_error.png
  161. 7  lib/yui/3.4.1/build/assets/skins/sam/widget-base.css
  162. 7  lib/yui/3.4.1/build/assets/skins/sam/widget-buttons.css
  163. 7  lib/yui/3.4.1/build/assets/skins/sam/widget-stack.css
  164. 528  lib/yui/3.4.1/build/async-queue/async-queue-debug.js
  165. 7  lib/yui/3.4.1/build/async-queue/async-queue-min.js
  166. 528  lib/yui/3.4.1/build/async-queue/async-queue.js
  167. 1,197  lib/yui/3.4.1/build/attribute-base/attribute-base-debug.js
  168. 8  lib/yui/3.4.1/build/attribute-base/attribute-base-min.js
  169. 1,182  lib/yui/3.4.1/build/attribute-base/attribute-base.js
  170. 129  lib/yui/3.4.1/build/attribute-complex/attribute-complex-debug.js
  171. 7  lib/yui/3.4.1/build/attribute-complex/attribute-complex-min.js
  172. 129  lib/yui/3.4.1/build/attribute-complex/attribute-complex.js
  173. 1,642  lib/yui/3.4.1/build/autocomplete-base/autocomplete-base-debug.js
  174. 8  lib/yui/3.4.1/build/autocomplete-base/autocomplete-base-min.js
  175. 1,635  lib/yui/3.4.1/build/autocomplete-base/autocomplete-base.js
  176. 147  lib/yui/3.4.1/build/autocomplete-filters-accentfold/autocomplete-filters-accentfold-debug.js
  177. 7  lib/yui/3.4.1/build/autocomplete-filters-accentfold/autocomplete-filters-accentfold-min.js
  178. 147  lib/yui/3.4.1/build/autocomplete-filters-accentfold/autocomplete-filters-accentfold.js
  179. 245  lib/yui/3.4.1/build/autocomplete-filters/autocomplete-filters-debug.js
  180. 7  lib/yui/3.4.1/build/autocomplete-filters/autocomplete-filters-min.js
  181. 245  lib/yui/3.4.1/build/autocomplete-filters/autocomplete-filters.js
  182. 117  lib/yui/3.4.1/build/autocomplete-highlighters-accentfold/autocomplete-highlighters-accentfold-debug.js
  183. 7  lib/yui/3.4.1/build/autocomplete-highlighters-accentfold/autocomplete-highlighters-accentfold-min.js
  184. 117  lib/yui/3.4.1/build/autocomplete-highlighters-accentfold/autocomplete-highlighters-accentfold.js
  185. 205  lib/yui/3.4.1/build/autocomplete-highlighters/autocomplete-highlighters-debug.js
  186. 7  lib/yui/3.4.1/build/autocomplete-highlighters/autocomplete-highlighters-min.js
  187. 205  lib/yui/3.4.1/build/autocomplete-highlighters/autocomplete-highlighters.js
  188. 194  lib/yui/3.4.1/build/autocomplete-list-keys/autocomplete-list-keys-debug.js
  189. 7  lib/yui/3.4.1/build/autocomplete-list-keys/autocomplete-list-keys-min.js
  190. 194  lib/yui/3.4.1/build/autocomplete-list-keys/autocomplete-list-keys.js
  191. 33  lib/yui/3.4.1/build/autocomplete-list/assets/autocomplete-list-core.css
  192. 56  lib/yui/3.4.1/build/autocomplete-list/assets/skins/night/autocomplete-list-skin.css
  193. 7  lib/yui/3.4.1/build/autocomplete-list/assets/skins/night/autocomplete-list.css
  194. 23  lib/yui/3.4.1/build/autocomplete-list/assets/skins/sam/autocomplete-list-skin.css
  195. 7  lib/yui/3.4.1/build/autocomplete-list/assets/skins/sam/autocomplete-list.css
  196. 901  lib/yui/3.4.1/build/autocomplete-list/autocomplete-list-debug.js
  197. 8  lib/yui/3.4.1/build/autocomplete-list/autocomplete-list-min.js
  198. 901  lib/yui/3.4.1/build/autocomplete-list/autocomplete-list.js
  199. 7  lib/yui/3.4.1/build/autocomplete-list/lang/autocomplete-list.js
  200. 7  lib/yui/3.4.1/build/autocomplete-list/lang/autocomplete-list_en.js
  201. 60  lib/yui/3.4.1/build/autocomplete-plugin/autocomplete-plugin-debug.js
  202. 7  lib/yui/3.4.1/build/autocomplete-plugin/autocomplete-plugin-min.js
  203. 60  lib/yui/3.4.1/build/autocomplete-plugin/autocomplete-plugin.js
  204. 490  lib/yui/3.4.1/build/autocomplete-sources/autocomplete-sources-debug.js
  205. 7  lib/yui/3.4.1/build/autocomplete-sources/autocomplete-sources-min.js
  206. 490  lib/yui/3.4.1/build/autocomplete-sources/autocomplete-sources.js
  207. 627  lib/yui/3.4.1/build/base-base/base-base-debug.js
  208. 7  lib/yui/3.4.1/build/base-base/base-base-min.js
  209. 622  lib/yui/3.4.1/build/base-base/base-base.js
34  admin/tool/xmldb/actions/XMLDBAction.class.php
@@ -126,14 +126,14 @@ function getTitle() {
126 126
      * array parameter
127 127
      */
128 128
     function loadStrings($strings) {
129  
-    /// Load some commonly used strings
  129
+        // Load some commonly used strings
130 130
         if (get_string_manager()->string_exists($this->title, 'tool_xmldb')) {
131 131
             $this->str['title'] = get_string($this->title, 'tool_xmldb');
132 132
         } else {
133 133
             $this->str['title'] = $this->title;
134 134
         }
135 135
 
136  
-    /// Now process the $strings array loading it in the $str atribute
  136
+        // Now process the $strings array loading it in the $str atribute
137 137
         if ($strings) {
138 138
             foreach ($strings as $key => $module) {
139 139
                 $this->str[$key] = get_string($key, $module);
@@ -149,19 +149,19 @@ function invoke() {
149 149
 
150 150
         global $SESSION;
151 151
 
152  
-    /// Sesskey protection
  152
+        // Sesskey protection
153 153
         if ($this->sesskey_protected) {
154 154
             require_sesskey();
155 155
         }
156 156
 
157  
-    /// If we are used any dir, save it in the lastused session object
158  
-    /// Some actions can use it to perform positioning
  157
+        // If we are used any dir, save it in the lastused session object
  158
+        // Some actions can use it to perform positioning
159 159
         if ($lastused = optional_param ('dir', NULL, PARAM_PATH)) {
160 160
             $SESSION->lastused = $lastused;
161 161
         }
162 162
 
163 163
         $this->postaction = optional_param ('postaction', NULL, PARAM_ALPHAEXT);
164  
-    /// Avoid being recursive
  164
+        // Avoid being recursive
165 165
         if ($this->title == $this->postaction) {
166 166
             $this->postaction = NULL;
167 167
         }
@@ -174,12 +174,12 @@ function launch($action) {
174 174
 
175 175
         global $CFG;
176 176
 
177  
-    /// Get the action path and invoke it
  177
+        // Get the action path and invoke it
178 178
         $actionsroot = "$CFG->dirroot/$CFG->admin/tool/xmldb/actions";
179 179
         $actionclass = $action . '.class.php';
180 180
         $actionpath = "$actionsroot/$action/$actionclass";
181 181
 
182  
-    /// Load and invoke the proper action
  182
+        // Load and invoke the proper action
183 183
         $result = false;
184 184
         if (file_exists($actionpath) && is_readable($actionpath)) {
185 185
             require_once($actionpath);
@@ -218,16 +218,16 @@ function upgrade_savepoint_php($structure) {
218 218
 
219 219
         $path = $structure->getPath();
220 220
 
221  
-    /// Trim "db" from path
  221
+        // Trim "db" from path
222 222
         $path = dirname($path);
223 223
 
224  
-    /// Get pluginname, plugindir and plugintype
  224
+        // Get pluginname, plugindir and plugintype
225 225
         $pluginname = basename($path);
226  
-        if ($path == 'lib') { /// exception for lib (not proper plugin)
  226
+        if ($path == 'lib') { // exception for lib (not proper plugin)
227 227
             $plugindir = 'lib';
228 228
             $plugintype = 'lib';
229  
-        } else { /// rest of plugins
230  
-            //TODO: this is not nice and may fail, plugintype should be passed around somehow instead
  229
+        } else { // rest of plugins
  230
+            // TODO: this is not nice and may fail, plugintype should be passed around somehow instead
231 231
             $plugintypes = get_plugin_types(false);
232 232
             $plugindir = dirname($path);
233 233
             $plugindir = str_replace('\\', '/', $plugindir);
@@ -237,22 +237,22 @@ function upgrade_savepoint_php($structure) {
237 237
         $result = '';
238 238
 
239 239
         switch ($plugintype ) {
240  
-            case 'lib': /// has own savepoint function
  240
+            case 'lib': // has own savepoint function
241 241
                 $result = XMLDB_LINEFEED .
242 242
                           '        // Main savepoint reached' . XMLDB_LINEFEED .
243 243
                           '        upgrade_main_savepoint(true, XXXXXXXXXX);' . XMLDB_LINEFEED;
244 244
                 break;
245  
-            case 'mod': /// has own savepoint function
  245
+            case 'mod': // has own savepoint function
246 246
                 $result = XMLDB_LINEFEED .
247 247
                           '        // ' . $pluginname . ' savepoint reached' . XMLDB_LINEFEED .
248 248
                           '        upgrade_mod_savepoint(true, XXXXXXXXXX, ' . "'$pluginname'" . ');' . XMLDB_LINEFEED;
249 249
                 break;
250  
-            case 'block': /// has own savepoint function
  250
+            case 'block': // has own savepoint function
251 251
                 $result = XMLDB_LINEFEED .
252 252
                           '        // ' . $pluginname . ' savepoint reached' . XMLDB_LINEFEED .
253 253
                           '        upgrade_block_savepoint(true, XXXXXXXXXX, ' . "'$pluginname'" . ');' . XMLDB_LINEFEED;
254 254
                 break;
255  
-            default: /// rest of plugins
  255
+            default: // rest of plugins
256 256
                 $result = XMLDB_LINEFEED .
257 257
                           '        // ' . $pluginname . ' savepoint reached' . XMLDB_LINEFEED .
258 258
                           '        upgrade_plugin_savepoint(true, XXXXXXXXXX, ' . "'$plugintype'" . ', ' . "'$pluginname'" . ');' . XMLDB_LINEFEED;
58  admin/tool/xmldb/actions/XMLDBCheckAction.class.php
@@ -43,11 +43,11 @@
43 43
     function init() {
44 44
         parent::init();
45 45
 
46  
-    /// Set own core attributes
  46
+        // Set own core attributes
47 47
 
48  
-    /// Set own custom attributes
  48
+        // Set own custom attributes
49 49
 
50  
-    /// Get needed strings
  50
+        // Get needed strings
51 51
         $this->loadStrings(array(
52 52
             $this->introstr => 'tool_xmldb',
53 53
             'ok' => '',
@@ -73,24 +73,24 @@ function invoke() {
73 73
 
74 74
         $result = true;
75 75
 
76  
-    /// Set own core attributes
  76
+        // Set own core attributes
77 77
         $this->does_generate = ACTION_GENERATE_HTML;
78 78
 
79  
-    /// These are always here
  79
+        // These are always here
80 80
         global $CFG, $XMLDB, $DB, $OUTPUT;
81 81
 
82  
-    /// And we nedd some ddl suff
  82
+        // And we nedd some ddl suff
83 83
         $dbman = $DB->get_manager();
84 84
 
85  
-    /// Here we'll acummulate all the wrong fields found
  85
+        // Here we'll acummulate all the wrong fields found
86 86
         $problemsfound = array();
87 87
 
88  
-    /// Do the job, setting $result as needed
  88
+        // Do the job, setting $result as needed
89 89
 
90  
-    /// Get the confirmed to decide what to do
  90
+        // Get the confirmed to decide what to do
91 91
         $confirmed = optional_param('confirmed', false, PARAM_BOOL);
92 92
 
93  
-    /// If  not confirmed, show confirmation box
  93
+        // If  not confirmed, show confirmation box
94 94
         if (!$confirmed) {
95 95
             $o = '<table class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
96 96
             $o.= '  <tr><td class="generalboxcontent">';
@@ -110,59 +110,59 @@ function invoke() {
110 110
 
111 111
             $this->output = $o;
112 112
         } else {
113  
-        /// The back to edit table button
  113
+            // The back to edit table button
114 114
             $b = ' <p class="centerpara buttons">';
115 115
             $b .= '<a href="index.php">[' . $this->str['back'] . ']</a>';
116 116
             $b .= '</p>';
117 117
 
118  
-        /// Iterate over $XMLDB->dbdirs, loading their XML data to memory
  118
+            // Iterate over $XMLDB->dbdirs, loading their XML data to memory
119 119
             if ($XMLDB->dbdirs) {
120 120
                 $dbdirs =& $XMLDB->dbdirs;
121 121
                 $o='<ul>';
122 122
                 foreach ($dbdirs as $dbdir) {
123  
-                /// Only if the directory exists
  123
+                    // Only if the directory exists
124 124
                     if (!$dbdir->path_exists) {
125 125
                         continue;
126 126
                     }
127  
-                /// Load the XML file
  127
+                    // Load the XML file
128 128
                     $xmldb_file = new xmldb_file($dbdir->path . '/install.xml');
129 129
 
130  
-                /// Only if the file exists
  130
+                    // Only if the file exists
131 131
                     if (!$xmldb_file->fileExists()) {
132 132
                         continue;
133 133
                     }
134  
-                /// Load the XML contents to structure
  134
+                    // Load the XML contents to structure
135 135
                     $loaded = $xmldb_file->loadXMLStructure();
136 136
                     if (!$loaded || !$xmldb_file->isLoaded()) {
137 137
                         echo $OUTPUT->notification('Errors found in XMLDB file: '. $dbdir->path . '/install.xml');
138 138
                         continue;
139 139
                     }
140  
-                /// Arriving here, everything is ok, get the XMLDB structure
  140
+                    // Arriving here, everything is ok, get the XMLDB structure
141 141
                     $structure = $xmldb_file->getStructure();
142 142
 
143 143
                     $o.='    <li>' . str_replace($CFG->dirroot . '/', '', $dbdir->path . '/install.xml');
144  
-                /// Getting tables
  144
+                    // Getting tables
145 145
                     if ($xmldb_tables = $structure->getTables()) {
146 146
                         $o.='        <ul>';
147  
-                    /// Foreach table, process its fields
  147
+                        // Foreach table, process its fields
148 148
                         foreach ($xmldb_tables as $xmldb_table) {
149  
-                        /// Skip table if not exists
  149
+                            // Skip table if not exists
150 150
                             if (!$dbman->table_exists($xmldb_table)) {
151 151
                                 continue;
152 152
                             }
153  
-                        /// Fetch metadata from physical DB. All the columns info.
  153
+                            // Fetch metadata from physical DB. All the columns info.
154 154
                             if (!$metacolumns = $DB->get_columns($xmldb_table->getName())) {
155  
-                            //// Skip table if no metacolumns is available for it
  155
+                                // / Skip table if no metacolumns is available for it
156 156
                                 continue;
157 157
                             }
158  
-                        /// Table processing starts here
  158
+                            // Table processing starts here
159 159
                             $o.='            <li>' . $xmldb_table->getName();
160  
-                        /// Do the specific check.
  160
+                            // Do the specific check.
161 161
                             list($output, $newproblems) = $this->check_table($xmldb_table, $metacolumns);
162 162
                             $o.=$output;
163 163
                             $problemsfound = array_merge($problemsfound, $newproblems);
164 164
                             $o.='    </li>';
165  
-                        /// Give the script some more time (resetting to current if exists)
  165
+                            // Give the script some more time (resetting to current if exists)
166 166
                             if ($currenttl = @ini_get('max_execution_time')) {
167 167
                                 @ini_set('max_execution_time',$currenttl);
168 168
                             }
@@ -174,19 +174,19 @@ function invoke() {
174 174
                 $o.='</ul>';
175 175
             }
176 176
 
177  
-        /// Create a report of the problems found.
  177
+            // Create a report of the problems found.
178 178
             $r = $this->display_results($problemsfound);
179 179
 
180  
-        /// Combine the various bits of output.
  180
+            // Combine the various bits of output.
181 181
             $this->output = $b . $r . $o;
182 182
         }
183 183
 
184  
-    /// Launch postaction if exists (leave this here!)
  184
+        // Launch postaction if exists (leave this here!)
185 185
         if ($this->getPostAction() && $result) {
186 186
             return $this->launch($this->getPostAction());
187 187
         }
188 188
 
189  
-    /// Return ok if arrived here
  189
+        // Return ok if arrived here
190 190
         return $result;
191 191
     }
192 192
 
34  admin/tool/xmldb/actions/check_bigints/check_bigints.class.php
@@ -44,11 +44,11 @@ function init() {
44 44
         $this->introstr = 'confirmcheckbigints';
45 45
         parent::init();
46 46
 
47  
-    /// Set own core attributes
  47
+        // Set own core attributes
48 48
 
49  
-    /// Set own custom attributes
  49
+        // Set own custom attributes
50 50
 
51  
-    /// Get needed strings
  51
+        // Get needed strings
52 52
         $this->loadStrings(array(
53 53
             'wrongints' => 'tool_xmldb',
54 54
             'nowrongintsfound' => 'tool_xmldb',
@@ -56,7 +56,7 @@ function init() {
56 56
             'mysqlextracheckbigints' => 'tool_xmldb',
57 57
         ));
58 58
 
59  
-    /// Correct fields must be type bigint for MySQL and int8 for PostgreSQL
  59
+        // Correct fields must be type bigint for MySQL and int8 for PostgreSQL
60 60
         $this->dbfamily = $DB->get_dbfamily();
61 61
         switch ($this->dbfamily) {
62 62
             case 'mysql':
@@ -74,26 +74,26 @@ protected function check_table(xmldb_table $xmldb_table, array $metacolumns) {
74 74
         $o = '';
75 75
         $wrong_fields = array();
76 76
 
77  
-    /// Get and process XMLDB fields
  77
+        // Get and process XMLDB fields
78 78
         if ($xmldb_fields = $xmldb_table->getFields()) {
79 79
             $o.='        <ul>';
80 80
             foreach ($xmldb_fields as $xmldb_field) {
81  
-            /// If the field isn't integer(10), skip
  81
+                // If the field isn't integer(10), skip
82 82
                 if ($xmldb_field->getType() != XMLDB_TYPE_INTEGER || $xmldb_field->getLength() != 10) {
83 83
                     continue;
84 84
                 }
85  
-            /// If the metadata for that column doesn't exist, skip
  85
+                // If the metadata for that column doesn't exist, skip
86 86
                 if (!isset($metacolumns[$xmldb_field->getName()])) {
87 87
                     continue;
88 88
                 }
89  
-            /// To variable for better handling
  89
+                // To variable for better handling
90 90
                 $metacolumn = $metacolumns[$xmldb_field->getName()];
91  
-            /// Going to check this field in DB
  91
+                // Going to check this field in DB
92 92
                 $o.='            <li>' . $this->str['field'] . ': ' . $xmldb_field->getName() . ' ';
93  
-            /// Detect if the physical field is wrong and, under mysql, check for incorrect signed fields too
  93
+                // Detect if the physical field is wrong and, under mysql, check for incorrect signed fields too
94 94
                 if ($metacolumn->type != $this->correct_type || ($this->dbfamily == 'mysql' && $xmldb_field->getUnsigned() && !$metacolumn->unsigned)) {
95 95
                     $o.='<font color="red">' . $this->str['wrong'] . '</font>';
96  
-                /// Add the wrong field to the list
  96
+                    // Add the wrong field to the list
97 97
                     $obj = new stdClass();
98 98
                     $obj->table = $xmldb_table;
99 99
                     $obj->field = $xmldb_field;
@@ -121,41 +121,41 @@ protected function display_results(array $wrong_fields) {
121 121
         $r.= '  </td></tr>';
122 122
         $r.= '  <tr><td class="generalboxcontent">';
123 123
 
124  
-    /// If we have found wrong integers inform about them
  124
+        // If we have found wrong integers inform about them
125 125
         if (count($wrong_fields)) {
126 126
             $r.= '    <p class="centerpara">' . $this->str['yeswrongintsfound'] . '</p>';
127 127
             $r.= '        <ul>';
128 128
             foreach ($wrong_fields as $obj) {
129 129
                 $xmldb_table = $obj->table;
130 130
                 $xmldb_field = $obj->field;
131  
-            /// MySQL directly supports this
  131
+                // MySQL directly supports this
132 132
 
133 133
 // TODO: move this hack to generators!!
134 134
 
135 135
                 if ($this->dbfamily == 'mysql') {
136 136
                     $sqlarr = $dbman->generator->getAlterFieldSQL($xmldb_table, $xmldb_field);
137  
-            /// PostgreSQL (XMLDB implementation) is a bit, er... imperfect.
  137
+                // PostgreSQL (XMLDB implementation) is a bit, er... imperfect.
138 138
                 } else if ($this->dbfamily == 'postgres') {
139 139
                     $sqlarr = array('ALTER TABLE ' . $DB->get_prefix() . $xmldb_table->getName() .
140 140
                               ' ALTER COLUMN ' . $xmldb_field->getName() . ' TYPE BIGINT;');
141 141
                 }
142 142
                 $r.= '            <li>' . $this->str['table'] . ': ' . $xmldb_table->getName() . '. ' .
143 143
                                           $this->str['field'] . ': ' . $xmldb_field->getName() . '</li>';
144  
-            /// Add to output if we have sentences
  144
+                // Add to output if we have sentences
145 145
                 if ($sqlarr) {
146 146
                     $sqlarr = $dbman->generator->getEndedStatements($sqlarr);
147 147
                     $s.= '<code>' . str_replace("\n", '<br />', implode('<br />', $sqlarr)). '</code><br />';
148 148
                 }
149 149
             }
150 150
             $r.= '        </ul>';
151  
-        /// Add the SQL statements (all together)
  151
+            // Add the SQL statements (all together)
152 152
             $r.= '<hr />' . $s;
153 153
         } else {
154 154
             $r.= '    <p class="centerpara">' . $this->str['nowrongintsfound'] . '</p>';
155 155
         }
156 156
         $r.= '  </td></tr>';
157 157
         $r.= '  <tr><td class="generalboxcontent">';
158  
-    /// Add the complete log message
  158
+        // Add the complete log message
159 159
         $r.= '    <p class="centerpara">' . $this->str['completelogbelow'] . '</p>';
160 160
         $r.= '  </td></tr>';
161 161
         $r.= '</table>';
24  admin/tool/xmldb/actions/check_defaults/check_defaults.class.php
@@ -40,11 +40,11 @@ function init() {
40 40
         $this->introstr = 'confirmcheckdefaults';
41 41
         parent::init();
42 42
 
43  
-    /// Set own core attributes
  43
+        // Set own core attributes
44 44
 
45  
-    /// Set own custom attributes
  45
+        // Set own custom attributes
46 46
 
47  
-    /// Get needed strings
  47
+        // Get needed strings
48 48
         $this->loadStrings(array(
49 49
             'wrongdefaults' => 'tool_xmldb',
50 50
             'nowrongdefaultsfound' => 'tool_xmldb',
@@ -58,7 +58,7 @@ protected function check_table(xmldb_table $xmldb_table, array $metacolumns) {
58 58
         $o = '';
59 59
         $wrong_fields = array();
60 60
 
61  
-        /// Get and process XMLDB fields
  61
+        // Get and process XMLDB fields
62 62
         if ($xmldb_fields = $xmldb_table->getFields()) {
63 63
             $o.='        <ul>';
64 64
             foreach ($xmldb_fields as $xmldb_field) {
@@ -66,15 +66,15 @@ protected function check_table(xmldb_table $xmldb_table, array $metacolumns) {
66 66
                 // Get the default value for the field
67 67
                 $xmldbdefault = $xmldb_field->getDefault();
68 68
 
69  
-                /// If the metadata for that column doesn't exist or 'id' field found, skip
  69
+                // If the metadata for that column doesn't exist or 'id' field found, skip
70 70
                 if (!isset($metacolumns[$xmldb_field->getName()]) or $xmldb_field->getName() == 'id') {
71 71
                     continue;
72 72
                 }
73 73
 
74  
-                /// To variable for better handling
  74
+                // To variable for better handling
75 75
                 $metacolumn = $metacolumns[$xmldb_field->getName()];
76 76
 
77  
-                /// Going to check this field in DB
  77
+                // Going to check this field in DB
78 78
                 $o.='            <li>' . $this->str['field'] . ': ' . $xmldb_field->getName() . ' ';
79 79
 
80 80
                 // get the value of the physical default (or blank if there isn't one)
@@ -90,7 +90,7 @@ protected function check_table(xmldb_table $xmldb_table, array $metacolumns) {
90 90
                     $info = '('.$this->str['expected']." '$xmldbdefault', ".$this->str['actual'].
91 91
                     " '$physicaldefault')";
92 92
                     $o.='<font color="red">' . $this->str['wrong'] . " $info</font>";
93  
-                /// Add the wrong field to the list
  93
+                    // Add the wrong field to the list
94 94
                     $obj = new stdClass();
95 95
                     $obj->table = $xmldb_table;
96 96
                     $obj->field = $xmldb_field;
@@ -120,7 +120,7 @@ protected function display_results(array $wrong_fields) {
120 120
         $r.= '  </td></tr>';
121 121
         $r.= '  <tr><td class="generalboxcontent">';
122 122
 
123  
-    /// If we have found wrong defaults inform about them
  123
+        // If we have found wrong defaults inform about them
124 124
         if (count($wrong_fields)) {
125 125
             $r.= '    <p class="centerpara">' . $this->str['yeswrongdefaultsfound'] . '</p>';
126 126
             $r.= '        <ul>';
@@ -137,21 +137,21 @@ protected function display_results(array $wrong_fields) {
137 137
                                           $this->str['field'] . ': ' . $xmldb_field->getName() . ', ' .
138 138
                                           $this->str['expected'] . ' ' . "'$xmldbdefault'" . ' ' .
139 139
                                           $this->str['actual'] . ' ' . "'$physicaldefault'" . '</li>';
140  
-                /// Add to output if we have sentences
  140
+                // Add to output if we have sentences
141 141
                 if ($sqlarr) {
142 142
                     $sqlarr = $dbman->generator->getEndedStatements($sqlarr);
143 143
                     $s.= '<code>' . str_replace("\n", '<br />', implode('<br />', $sqlarr)) . '</code><br />';
144 144
                 }
145 145
             }
146 146
             $r.= '        </ul>';
147  
-        /// Add the SQL statements (all together)
  147
+            // Add the SQL statements (all together)
148 148
             $r.= '<hr />' . $s;
149 149
         } else {
150 150
             $r.= '    <p class="centerpara">' . $this->str['nowrongdefaultsfound'] . '</p>';
151 151
         }
152 152
         $r.= '  </td></tr>';
153 153
         $r.= '  <tr><td class="generalboxcontent">';
154  
-    /// Add the complete log message
  154
+        // Add the complete log message
155 155
         $r.= '    <p class="centerpara">' . $this->str['completelogbelow'] . '</p>';
156 156
         $r.= '  </td></tr>';
157 157
         $r.= '</table>';
20  admin/tool/xmldb/actions/check_foreign_keys/check_foreign_keys.class.php
@@ -44,11 +44,11 @@ function init() {
44 44
         $this->introstr = 'confirmcheckforeignkeys';
45 45
         parent::init();
46 46
 
47  
-    /// Set own core attributes
  47
+        // Set own core attributes
48 48
 
49  
-    /// Set own custom attributes
  49
+        // Set own custom attributes
50 50
 
51  
-    /// Get needed strings
  51
+        // Get needed strings
52 52
         $this->loadStrings(array(
53 53
             'key' => 'tool_xmldb',
54 54
             'violatedforeignkeys' => 'tool_xmldb',
@@ -67,17 +67,17 @@ protected function check_table(xmldb_table $xmldb_table, array $metacolumns) {
67 67
         $o = '';
68 68
         $violatedkeys = array();
69 69
 
70  
-        /// Keys
  70
+        // Keys
71 71
         if ($xmldb_keys = $xmldb_table->getKeys()) {
72 72
             $o.='        <ul>';
73 73
             foreach ($xmldb_keys as $xmldb_key) {
74  
-            /// We are only interested in foreign keys.
  74
+                // We are only interested in foreign keys.
75 75
                 if (!in_array($xmldb_key->getType(), array(XMLDB_KEY_FOREIGN, XMLDB_KEY_FOREIGN_UNIQUE))) {
76 76
                     continue;
77 77
                 }
78 78
                 $o.='            <li>' . $this->str['key'] . ': ' . $xmldb_key->readableInfo() . ' ';
79 79
 
80  
-            /// Work out the SQL to find key violations.
  80
+                // Work out the SQL to find key violations.
81 81
                 $keyfields = $xmldb_key->getFields();
82 82
                 $reffields = $xmldb_key->getRefFields();
83 83
                 $joinconditions = array();
@@ -103,13 +103,13 @@ protected function check_table(xmldb_table $xmldb_table, array $metacolumns) {
103 103
                         implode(' AND ', $joinconditions) . ' WHERE ' .
104 104
                         implode(' AND ', $nullnessconditions);
105 105
 
106  
-            /// Check there are any problems in the database.
  106
+                // Check there are any problems in the database.
107 107
                 $violations = $DB->count_records_sql($sql, $params);
108 108
                 if ($violations == 0) {
109 109
                     $o.='<font color="green">' . $this->str['ok'] . '</font>';
110 110
                 } else {
111 111
                     $o.='<font color="red">' . $this->str['violations'] . '</font>';
112  
-                /// Add the missing index to the list
  112
+                    // Add the missing index to the list
113 113
                     $violation = new stdClass;
114 114
                     $violation->table = $xmldb_table;
115 115
                     $violation->key = $xmldb_key;
@@ -139,7 +139,7 @@ protected function display_results(array $violatedkeys) {
139 139
         $r.= '  </td></tr>';
140 140
         $r.= '  <tr><td class="generalboxcontent">';
141 141
 
142  
-    /// If we have found wrong integers inform about them
  142
+        // If we have found wrong integers inform about them
143 143
         if (count($violatedkeys)) {
144 144
             $r.= '    <p class="centerpara">' . $this->str['violatedforeignkeysfound'] . '</p>';
145 145
             $r.= '        <ul>';
@@ -156,7 +156,7 @@ protected function display_results(array $violatedkeys) {
156 156
         }
157 157
         $r.= '  </td></tr>';
158 158
         $r.= '  <tr><td class="generalboxcontent">';
159  
-    /// Add the complete log message
  159
+        // Add the complete log message
160 160
         $r.= '    <p class="centerpara">' . $this->str['completelogbelow'] . '</p>';
161 161
         $r.= '  </td></tr>';
162 162
         $r.= '</table>';
32  admin/tool/xmldb/actions/check_indexes/check_indexes.class.php
@@ -40,11 +40,11 @@ function init() {
40 40
         $this->introstr = 'confirmcheckindexes';
41 41
         parent::init();
42 42
 
43  
-    /// Set own core attributes
  43
+        // Set own core attributes
44 44
 
45  
-    /// Set own custom attributes
  45
+        // Set own custom attributes
46 46
 
47  
-    /// Get needed strings
  47
+        // Get needed strings
48 48
         $this->loadStrings(array(
49 49
             'missing' => 'tool_xmldb',
50 50
             'key' => 'tool_xmldb',
@@ -62,20 +62,20 @@ protected function check_table(xmldb_table $xmldb_table, array $metacolumns) {
62 62
         $o = '';
63 63
         $missing_indexes = array();
64 64
 
65  
-    /// Keys
  65
+        // Keys
66 66
         if ($xmldb_keys = $xmldb_table->getKeys()) {
67 67
             $o.='        <ul>';
68 68
             foreach ($xmldb_keys as $xmldb_key) {
69 69
                 $o.='            <li>' . $this->str['key'] . ': ' . $xmldb_key->readableInfo() . ' ';
70  
-            /// Primaries are skipped
  70
+                // Primaries are skipped
71 71
                 if ($xmldb_key->getType() == XMLDB_KEY_PRIMARY) {
72 72
                     $o.='<font color="green">' . $this->str['ok'] . '</font></li>';
73 73
                     continue;
74 74
                 }
75  
-            /// If we aren't creating the keys or the key is a XMLDB_KEY_FOREIGN (not underlying index generated
76  
-            /// automatically by the RDBMS) create the underlying (created by us) index (if doesn't exists)
  75
+                // If we aren't creating the keys or the key is a XMLDB_KEY_FOREIGN (not underlying index generated
  76
+                // automatically by the RDBMS) create the underlying (created by us) index (if doesn't exists)
77 77
                 if (!$dbman->generator->getKeySQL($xmldb_table, $xmldb_key) || $xmldb_key->getType() == XMLDB_KEY_FOREIGN) {
78  
-                /// Create the interim index
  78
+                    // Create the interim index
79 79
                     $xmldb_index = new xmldb_index('anyname');
80 80
                     $xmldb_index->setFields($xmldb_key->getFields());
81 81
                     switch ($xmldb_key->getType()) {
@@ -87,12 +87,12 @@ protected function check_table(xmldb_table $xmldb_table, array $metacolumns) {
87 87
                             $xmldb_index->setUnique(false);
88 88
                             break;
89 89
                     }
90  
-                /// Check if the index exists in DB
  90
+                    // Check if the index exists in DB
91 91
                     if ($dbman->index_exists($xmldb_table, $xmldb_index)) {
92 92
                         $o.='<font color="green">' . $this->str['ok'] . '</font>';
93 93
                     } else {
94 94
                         $o.='<font color="red">' . $this->str['missing'] . '</font>';
95  
-                    /// Add the missing index to the list
  95
+                        // Add the missing index to the list
96 96
                         $obj = new stdClass();
97 97
                         $obj->table = $xmldb_table;
98 98
                         $obj->index = $xmldb_index;
@@ -103,17 +103,17 @@ protected function check_table(xmldb_table $xmldb_table, array $metacolumns) {
103 103
             }
104 104
             $o.='        </ul>';
105 105
         }
106  
-    /// Indexes
  106
+        // Indexes
107 107
         if ($xmldb_indexes = $xmldb_table->getIndexes()) {
108 108
             $o.='        <ul>';
109 109
             foreach ($xmldb_indexes as $xmldb_index) {
110 110
                 $o.='            <li>' . $this->str['index'] . ': ' . $xmldb_index->readableInfo() . ' ';
111  
-            /// Check if the index exists in DB
  111
+                // Check if the index exists in DB
112 112
                 if ($dbman->index_exists($xmldb_table, $xmldb_index)) {
113 113
                     $o.='<font color="green">' . $this->str['ok'] . '</font>';
114 114
                 } else {
115 115
                     $o.='<font color="red">' . $this->str['missing'] . '</font>';
116  
-                /// Add the missing index to the list
  116
+                    // Add the missing index to the list
117 117
                     $obj = new stdClass();
118 118
                     $obj->table = $xmldb_table;
119 119
                     $obj->index = $xmldb_index;
@@ -139,7 +139,7 @@ protected function display_results(array $missing_indexes) {
139 139
         $r.= '  </td></tr>';
140 140
         $r.= '  <tr><td class="generalboxcontent">';
141 141
 
142  
-    /// If we have found missing indexes inform about them
  142
+        // If we have found missing indexes inform about them
143 143
         if (count($missing_indexes)) {
144 144
             $r.= '    <p class="centerpara">' . $this->str['yesmissingindexesfound'] . '</p>';
145 145
             $r.= '        <ul>';
@@ -154,14 +154,14 @@ protected function display_results(array $missing_indexes) {
154 154
 
155 155
             }
156 156
             $r.= '        </ul>';
157  
-        /// Add the SQL statements (all together)
  157
+            // Add the SQL statements (all together)
158 158
             $r.= '<hr />' . $s;
159 159
         } else {
160 160
             $r.= '    <p class="centerpara">' . $this->str['nomissingindexesfound'] . '</p>';
161 161
         }
162 162
         $r.= '  </td></tr>';
163 163
         $r.= '  <tr><td class="generalboxcontent">';
164  
-    /// Add the complete log message
  164
+        // Add the complete log message
165 165
         $r.= '    <p class="centerpara">' . $this->str['completelogbelow'] . '</p>';
166 166
         $r.= '  </td></tr>';
167 167
         $r.= '</table>';
24  admin/tool/xmldb/actions/create_xml_file/create_xml_file.class.php
@@ -35,15 +35,15 @@ class create_xml_file extends XMLDBAction {
35 35
      */
36 36
     function init() {
37 37
         parent::init();
38  
-    /// Set own core attributes
  38
+        // Set own core attributes
39 39
         $this->can_subaction = ACTION_NONE;
40 40
         //$this->can_subaction = ACTION_HAVE_SUBACTIONS;
41 41
 
42  
-    /// Set own custom attributes
  42
+        // Set own custom attributes
43 43
 
44  
-    /// Get needed strings
  44
+        // Get needed strings
45 45
         $this->loadStrings(array(
46  
-        /// 'key' => 'module',
  46
+            // 'key' => 'module',
47 47
         ));
48 48
     }
49 49
 
@@ -57,28 +57,28 @@ function invoke() {
57 57
 
58 58
         $result = true;
59 59
 
60  
-    /// Set own core attributes
  60
+        // Set own core attributes
61 61
         $this->does_generate = ACTION_NONE;
62 62
         //$this->does_generate = ACTION_GENERATE_HTML;
63 63
 
64  
-    /// These are always here
  64
+        // These are always here
65 65
         global $CFG, $XMLDB;
66 66
 
67  
-    /// Do the job, setting result as needed
  67
+        // Do the job, setting result as needed
68 68
 
69  
-    /// Get the dir containing the file
  69
+        // Get the dir containing the file
70 70
         $dirpath = required_param('dir', PARAM_PATH);
71 71
         $dirpath = $CFG->dirroot . $dirpath;
72 72
         $file = $dirpath . '/install.xml';
73 73
 
74  
-    /// Some variables
  74
+        // Some variables
75 75
         $xmlpath = dirname(str_replace($CFG->dirroot . '/', '', $file));
76 76
         $xmlversion = userdate(time(), '%Y%m%d', 99, false);
77 77
         $xmlcomment = 'XMLDB file for Moodle ' . dirname($xmlpath);
78 78
 
79 79
         $xmltable = strtolower(basename(dirname($xmlpath)));
80 80
 
81  
-    /// Initial contents
  81
+        // Initial contents
82 82
         $c = '<?xml version="1.0" encoding="UTF-8" ?>' . "\n";
83 83
         $c.= '  <XMLDB PATH="' . $xmlpath . '" VERSION="' . $xmlversion .'" COMMENT="' . $xmlcomment .'">' . "\n";
84 84
         $c.= '    <TABLES>' . "\n";
@@ -98,12 +98,12 @@ function invoke() {
98 98
             $result = false;
99 99
         }
100 100
 
101  
-    /// Launch postaction if exists
  101
+        // Launch postaction if exists
102 102
         if ($this->getPostAction() && $result) {
103 103
             return $this->launch($this->getPostAction());
104 104
         }
105 105
 
106  
-    /// Return ok if arrived here
  106
+        // Return ok if arrived here
107 107
         return $result;
108 108
     }
109 109
 }
30  admin/tool/xmldb/actions/delete_field/delete_field.class.php
@@ -37,9 +37,9 @@ class delete_field extends XMLDBAction {
37 37
     function init() {
38 38
         parent::init();
39 39
 
40  
-    /// Set own custom attributes
  40
+        // Set own custom attributes
41 41
 
42  
-    /// Get needed strings
  42
+        // Get needed strings
43 43
         $this->loadStrings(array(
44 44
             'confirmdeletefield' => 'tool_xmldb',
45 45
             'yes' => '',
@@ -57,15 +57,15 @@ function invoke() {
57 57
 
58 58
         $result = true;
59 59
 
60  
-    /// Set own core attributes
  60
+        // Set own core attributes
61 61
         $this->does_generate = ACTION_GENERATE_HTML;
62 62
 
63  
-    /// These are always here
  63
+        // These are always here
64 64
         global $CFG, $XMLDB;
65 65
 
66  
-    /// Do the job, setting result as needed
  66
+        // Do the job, setting result as needed
67 67
 
68  
-    /// Get the dir containing the file
  68
+        // Get the dir containing the file
69 69
         $dirpath = required_param('dir', PARAM_PATH);
70 70
         $dirpath = $CFG->dirroot . $dirpath;
71 71
         $tableparam = required_param('table', PARAM_CLEAN);
@@ -73,7 +73,7 @@ function invoke() {
73 73
 
74 74
         $confirmed = optional_param('confirmed', false, PARAM_BOOL);
75 75
 
76  
-    /// If  not confirmed, show confirmation box
  76
+        // If  not confirmed, show confirmation box
77 77
         if (!$confirmed) {
78 78
             $o = '<table width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
79 79
             $o.= '  <tr><td class="generalboxcontent">';
@@ -93,14 +93,14 @@ function invoke() {
93 93
 
94 94
             $this->output = $o;
95 95
         } else {
96  
-        /// Get the edited dir
  96
+            // Get the edited dir
97 97
             if (!empty($XMLDB->editeddirs)) {
98 98
                 if (isset($XMLDB->editeddirs[$dirpath])) {
99 99
                     $dbdir =& $XMLDB->dbdirs[$dirpath];
100 100
                     $editeddir =& $XMLDB->editeddirs[$dirpath];
101 101
                     if ($editeddir) {
102 102
                         $structure =& $editeddir->xml_file->getStructure();
103  
-                    /// Move adjacent fields prev and next attributes
  103
+                        // Move adjacent fields prev and next attributes
104 104
                         $tables =& $structure->getTables();
105 105
                         $table =& $structure->getTable($tableparam);
106 106
                         $fields =& $table->getFields();
@@ -113,14 +113,14 @@ function invoke() {
113 113
                             $next =& $table->getField($field->getNext());
114 114
                             $next->setPrevious($field->getPrevious());
115 115
                         }
116  
-                    /// Remove the field
  116
+                        // Remove the field
117 117
                         $table->deleteField($fieldparam);
118 118
 
119  
-                    /// Recalculate the hash
  119
+                        // Recalculate the hash
120 120
                         $structure->calculateHash(true);
121 121
 
122  
-                    /// If the hash has changed from the original one, change the version
123  
-                    /// and mark the structure as changed
  122
+                        // If the hash has changed from the original one, change the version
  123
+                        // and mark the structure as changed
124 124
                         $origstructure =& $dbdir->xml_file->getStructure();
125 125
                         if ($structure->getHash() != $origstructure->getHash()) {
126 126
                             $structure->setVersion(userdate(time(), '%Y%m%d', 99, false));
@@ -131,12 +131,12 @@ function invoke() {
131 131
             }
132 132
         }
133 133
 
134  
-    /// Launch postaction if exists (leave this here!)
  134
+        // Launch postaction if exists (leave this here!)
135 135
         if ($this->getPostAction() && $result) {
136 136
             return $this->launch($this->getPostAction());
137 137
         }
138 138
 
139  
-    /// Return ok if arrived here
  139
+        // Return ok if arrived here
140 140
         return $result;
141 141
     }
142 142
 }
30  admin/tool/xmldb/actions/delete_index/delete_index.class.php
@@ -37,9 +37,9 @@ class delete_index extends XMLDBAction {
37 37
     function init() {
38 38
         parent::init();
39 39
 
40  
-    /// Set own custom attributes
  40
+        // Set own custom attributes
41 41
 
42  
-    /// Get needed strings
  42
+        // Get needed strings
43 43
         $this->loadStrings(array(
44 44
             'confirmdeleteindex' => 'tool_xmldb',
45 45
             'yes' => '',
@@ -57,15 +57,15 @@ function invoke() {
57 57
 
58 58
         $result = true;
59 59
 
60  
-    /// Set own core attributes
  60
+        // Set own core attributes
61 61
         $this->does_generate = ACTION_GENERATE_HTML;
62 62
 
63  
-    /// These are always here
  63
+        // These are always here
64 64
         global $CFG, $XMLDB;
65 65
 
66  
-    /// Do the job, setting result as needed
  66
+        // Do the job, setting result as needed
67 67
 
68  
-    /// Get the dir containing the file
  68
+        // Get the dir containing the file
69 69
         $dirpath = required_param('dir', PARAM_PATH);
70 70
         $dirpath = $CFG->dirroot . $dirpath;
71 71
         $tableparam = required_param('table', PARAM_PATH);
@@ -73,7 +73,7 @@ function invoke() {
73 73
 
74 74
         $confirmed = optional_param('confirmed', false, PARAM_BOOL);
75 75
 
76  
-    /// If  not confirmed, show confirmation box
  76
+        // If  not confirmed, show confirmation box
77 77
         if (!$confirmed) {
78 78
             $o = '<table width="60" class="generalbox" border="0" cellpadding="5" cellspacing="0" id="notice">';
79 79
             $o.= '  <tr><td class="generalboxcontent">';
@@ -93,14 +93,14 @@ function invoke() {
93 93
 
94 94
             $this->output = $o;
95 95
         } else {
96  
-        /// Get the edited dir
  96
+            // Get the edited dir
97 97
             if (!empty($XMLDB->editeddirs)) {
98 98
                 if (isset($XMLDB->editeddirs[$dirpath])) {
99 99
                     $dbdir =& $XMLDB->dbdirs[$dirpath];
100 100
                     $editeddir =& $XMLDB->editeddirs[$dirpath];
101 101
                     if ($editeddir) {
102 102
                         $structure =& $editeddir->xml_file->getStructure();
103  
-                    /// Move adjacent indexes prev and next attributes
  103
+                        // Move adjacent indexes prev and next attributes
104 104
                         $tables =& $structure->getTables();
105 105
                         $table =& $structure->getTable($tableparam);
106 106
                         $indexes =& $table->getIndexes();
@@ -113,14 +113,14 @@ function invoke() {
113 113
                             $next =& $table->getIndex($index->getNext());
114 114
                             $next->setPrevious($index->getPrevious());
115 115
                         }
116  
-                    /// Remove the index
  116
+                        // Remove the index
117 117
                         $table->deleteIndex($indexparam);
118 118
 
119  
-                    /// Recalculate the hash
  119
+                        // Recalculate the hash
120 120
                         $structure->calculateHash(true);
121 121
 
122  
-                    /// If the hash has changed from the original one, change the version
123  
-                    /// and mark the structure as changed
  122
+                        // If the hash has changed from the original one, change the version
  123
+                        // and mark the structure as changed
124 124
                         $origstructure =& $dbdir->xml_file->getStructure();
125 125
                         if ($structure->getHash() != $origstructure->getHash()) {
126 126
                             $structure->setVersion(userdate(time(), '%Y%m%d', 99, false));
@@ -131,12 +131,12 @@ function invoke() {
131 131
             }
132 132
         }
133 133
 
134  
-    /// Launch postaction if exists (leave this here!)
  134
+        // Launch postaction if exists (leave this here!)
135 135
         if ($this->getPostAction() && $result) {
136 136
             return $this->launch($this->getPostAction());
137 137
         }
138 138
 
139  
-    /// Return ok if arrived here
  139
+        // Return ok if arrived here
140 140
         return $result;
141 141
     }
142 142
 }
30  admin/tool/xmldb/actions/delete_key/delete_key.class.php
@@ -37,9 +37,9 @@ class delete_key extends XMLDBAction {
37 37
     function init() {
38 38
         parent::init();
39 39
 
40  
-    /// Set own custom attributes
  40
+        // Set own custom attributes
41 41
 
42  
-    /// Get needed strings
  42
+        // Get needed strings
43 43
         $this->loadStrings(array(
44 44
             'confirmdeletekey' => 'tool_xmldb',
45 45
             'yes' => '',
@@ -57,15 +57,15 @@ function invoke() {
57 57
 
58 58
         $result = true;
59 59
 
60  
-    /// Set own core attributes
  60
+        // Set own core attributes
61 61
         $this->does_generate = ACTION_GENERATE_HTML;
62 62
 
63  
-    /// These are always here
  63
+        // These are always here
64 64
         global $CFG, $XMLDB;
65 65
 
66  
-    /// Do the job, setting result as needed
  66
+        // Do the job, setting result as needed
67 67
 
68  
-    /// Get the dir containing the file
  68
+    <