Permalink
Browse files

Merge branch 'master' of https://github.com/moodle/moodle

  • Loading branch information...
doraemonyoung committed May 21, 2012
2 parents e891c68 + 4f7f2a8 commit ae4a9ae7792c16d671ae9264edf252055ed94c4e
Showing with 12,492 additions and 3,832 deletions.
  1. +3 −1 admin/index.php
  2. +34 −17 admin/renderer.php
  3. +11 −5 admin/roles/usersroles.php
  4. +16 −14 admin/settings/server.php
  5. +1 −1 admin/tool/dbtransfer/database_transfer_form.php
  6. +19 −8 admin/tool/innodb/index.php
  7. +1 −1 admin/user/user_bulk_download.php
  8. +252 −0 admin/webservice/testclient_forms.php
  9. +7 −2 backup/converter/moodle1/tests/lib_test.php
  10. +11 −4 backup/moodle2/backup_stepslib.php
  11. +5 −4 backup/moodle2/restore_final_task.class.php
  12. +91 −2 backup/moodle2/restore_stepslib.php
  13. +12 −0 backup/util/plan/restore_structure_step.class.php
  14. +6 −27 calendar/lib.php
  15. +6 −1 config-dist.php
  16. +888 −0 course/dndupload.js
  17. +39 −0 course/dndupload.php
  18. +655 −0 course/dnduploadlib.php
  19. +1 −0 course/edit.php
  20. +17 −10 course/editcategory.php
  21. +29 −1 course/editsection.php
  22. +149 −3 course/editsection_form.php
  23. +840 −3 course/externallib.php
  24. +72 −26 course/format/renderer.php
  25. +1 −4 course/format/topics/format.js
  26. +0 −3 course/format/weeks/format.js
  27. +138 −37 course/lib.php
  28. +9 −7 course/moodleform_mod.php
  29. +151 −0 course/renderer.php
  30. +35 −1 course/rest.php
  31. 0 course/style.css
  32. +26 −12 course/view.php
  33. +185 −0 course/yui/modchooser/modchooser.js
  34. +126 −2 course/yui/toolboxes/toolboxes.js
  35. +4 −0 grade/export/grade_export_form.php
  36. +10 −2 grade/export/lib.php
  37. +2 −1 grade/export/ods/export.php
  38. +1 −0 grade/export/ods/grade_export_ods.php
  39. +1 −1 grade/export/ods/index.php
  40. +2 −1 grade/export/txt/export.php
  41. +3 −7 grade/export/txt/grade_export_txt.php
  42. +1 −1 grade/export/txt/index.php
  43. +2 −1 grade/export/xls/export.php
  44. +1 −0 grade/export/xls/grade_export_xls.php
  45. +1 −1 grade/export/xls/index.php
  46. +2 −1 grade/export/xml/export.php
  47. +1 −0 grade/export/xml/grade_export_xml.php
  48. +1 −1 grade/export/xml/index.php
  49. +21 −3 grade/lib.php
  50. +1 −2 grade/report/grader/lib.php
  51. +4 −0 group/delete.php
  52. +554 −0 group/externallib.php
  53. +4 −0 group/group.php
  54. +23 −0 group/group_form.php
  55. +7 −0 group/grouping.php
  56. +23 −0 group/grouping_form.php
  57. +8 −2 group/groupings.php
  58. +19 −0 group/import.php
  59. +5 −0 group/index.php
  60. +24 −0 group/lib.php
  61. +30 −0 group/module.js
  62. +11 −3 index.php
  63. +3 −0 install/lang/ar/admin.php
  64. +1 −1 install/lang/et/admin.php
  65. +37 −0 install/lang/rm_surs/admin.php
  66. +4 −4 install/lang/sr_cr/install.php
  67. +3 −3 install/lang/sr_lt/install.php
  68. +1 −0 install/lang/zh_cn/install.php
  69. +10 −5 iplookup/lib.php
  70. +86 −0 iplookup/tests/geoip_test.php
  71. +60 −0 iplookup/tests/geoplugin_test.php
  72. +2 −2 lang/en/admin.php
  73. +10 −4 lang/en/completion.php
  74. +12 −0 lang/en/condition.php
  75. +6 −0 lang/en/error.php
  76. +2 −0 lang/en/grades.php
  77. +2 −0 lang/en/group.php
  78. +2 −0 lang/en/install.php
  79. +26 −0 lang/en/moodle.php
  80. +8 −1 lang/en/question.php
  81. +1 −0 lang/en/webservice.php
  82. +466 −195 lib/conditionlib.php
  83. +5 −3 lib/cronlib.php
  84. +40 −10 lib/db/install.xml
  85. +111 −8 lib/db/services.php
  86. +91 −0 lib/db/upgrade.php
  87. +4 −7 lib/dml/mysqli_native_moodle_database.php
  88. +6 −2 lib/dml/pgsql_native_moodle_database.php
  89. +5 −1 lib/dml/sqlsrv_native_moodle_database.php
  90. +8 −0 lib/dml/tests/dml_test.php
  91. +1 −0 lib/editor/tinymce/lang/en/editor_tinymce.php
  92. +12 −4 lib/editor/tinymce/lib.php
  93. +4 −1 lib/editor/tinymce/settings.php
  94. +2 −2 lib/editor/tinymce/version.php
  95. +2 −2 lib/excel/test.php
  96. +19 −1 lib/externallib.php
  97. +1 −1 lib/filelib.php
  98. +1 −0 lib/form/yui/dateselector/dateselector.js
  99. +60 −13 lib/grouplib.php
  100. +352 −11 lib/modinfolib.php
  101. +43 −21 lib/moodlelib.php
  102. +62 −24 lib/navigationlib.php
  103. +3 −3 lib/outputrenderers.php
  104. +339 −0 lib/phpunit/classes/advanced_testcase.php
  105. +85 −0 lib/phpunit/classes/arraydataset.php
  106. +78 −0 lib/phpunit/classes/basic_testcase.php
  107. +112 −0 lib/phpunit/classes/block_generator.php
  108. +544 −0 lib/phpunit/classes/data_generator.php
  109. +136 −0 lib/phpunit/classes/database_driver_testcase.php
  110. +67 −0 lib/phpunit/classes/hint_resultprinter.php
  111. +141 −0 lib/phpunit/classes/module_generator.php
  112. +193 −0 lib/phpunit/classes/unittestcase.php
  113. +1,136 −0 lib/phpunit/classes/util.php
  114. +5 −724 lib/phpunit/generatorlib.php
  115. +10 −1,797 lib/phpunit/lib.php
  116. +23 −192 lib/{tests/phpunit_test.php → phpunit/tests/advanced_test.php}
  117. +155 −0 lib/phpunit/tests/basic_test.php
  118. 0 lib/{ → phpunit}/tests/fixtures/sample_dataset.csv
  119. 0 lib/{ → phpunit}/tests/fixtures/sample_dataset.xml
  120. +88 −0 lib/phpunit/tests/generator_test.php
  121. +2 −2 lib/pluginlib.php
  122. +8 −0 lib/setup.php
  123. +8 −1 lib/setuplib.php
  124. +21 −0 lib/tests/code_test.php
  125. +378 −6 lib/tests/conditionlib_test.php
  126. +174 −0 lib/tests/grouplib_test.php
  127. +41 −0 lib/tests/moodlelib_test.php
  128. +3 −2 lib/tests/pagelib_test.php
  129. +1 −1 lib/tests/repositorylib_test.php
  130. +202 −0 lib/yui/chooserdialogue/chooserdialogue.js
  131. +0 −5 mod/assign/adminlib.php
  132. +1 −1 mod/assign/assignmentplugin.php
  133. +28 −2 mod/assign/gradingtable.php
  134. +6 −1 mod/assign/lang/en/assign.php
  135. +2 −2 mod/assign/lib.php
  136. +64 −3 mod/assign/locallib.php
  137. +0 −3 mod/assign/styles.css
  138. +10 −41 mod/assign/upgradelib.php
  139. +1 −1 mod/assignment/lang/en/assignment.php
  140. +2 −2 mod/assignment/tests/generator_test.php
  141. +0 −1 mod/chat/gui_basic/index.php
  142. +12 −2 mod/chat/lang/en/chat.php
  143. +0 −31 mod/chat/lib.php
  144. +10 −1 mod/choice/lang/en/choice.php
  145. +14 −1 mod/data/lang/en/data.php
  146. +85 −50 mod/data/lib.php
  147. +116 −0 mod/data/locallib.php
  148. +3 −3 mod/data/view.php
  149. +2 −2 mod/feedback/edit_form.php
  150. +1 −1 mod/feedback/export.php
  151. +11 −1 mod/feedback/lang/en/feedback.php
  152. +0 −9 mod/feedback/lib.php
  153. +8 −0 mod/folder/lang/en/folder.php
  154. +48 −0 mod/folder/lib.php
  155. +21 −2 mod/forum/lang/en/forum.php
  156. +45 −24 mod/forum/lib.php
  157. +116 −0 mod/forum/locallib.php
  158. +18 −1 mod/glossary/lang/en/glossary.php
  159. +46 −30 mod/glossary/lib.php
  160. +125 −0 mod/glossary/locallib.php
  161. +6 −1 mod/imscp/lang/en/imscp.php
  162. +8 −1 mod/label/lang/en/label.php
  163. +13 −1 mod/lesson/lang/en/lesson.php
  164. +0 −26 mod/lesson/lib.php
  165. +3 −1 mod/lesson/locallib.php
  166. +10 −19 mod/lti/lang/en/lti.php
  167. +0 −15 mod/lti/lib.php
  168. +3 −3 mod/lti/typessettings.php
  169. +10 −1 mod/page/lang/en/page.php
  170. +43 −0 mod/page/lib.php
  171. +136 −1 mod/quiz/db/upgrade.php
  172. +2 −0 mod/quiz/editlib.php
  173. +15 −1 mod/quiz/lang/en/quiz.php
  174. +6 −18 mod/quiz/lib.php
  175. +13 −8 mod/quiz/locallib.php
  176. +11 −0 mod/resource/lang/en/resource.php
  177. +37 −0 mod/resource/lib.php
  178. +9 −1 mod/scorm/lang/en/scorm.php
  179. +3 −0 mod/scorm/module.js
  180. +2 −1 mod/survey/lang/en/survey.php
  181. +0 −33 mod/survey/lib.php
  182. +5 −0 mod/url/lang/en/url.php
  183. +36 −12 mod/url/lib.php
  184. +12 −0 mod/wiki/lang/en/wiki.php
  185. +1 −16 mod/wiki/lib.php
  186. +1 −1 mod/wiki/locallib.php
  187. +7 −4 mod/workshop/form/rubric/lib.php
  188. +1 −1 mod/workshop/form/rubric/tests/lib_test.php
  189. +8 −0 mod/workshop/lang/en/workshop.php
  190. +0 −43 mod/workshop/lib.php
  191. +12 −0 phpunit.xml.dist
  192. BIN pix/t/editstring.png
  193. +3 −1 question/editlib.php
  194. +757 −0 question/engine/simpletest/helpers.php
  195. +5 −2 question/engine/tests/helpers.php
  196. +0 −5 question/engine/upgrade/tests/helper.php
  197. +46 −28 question/preview.php
  198. +1 −0 question/type/calculated/questiontype.php
  199. +25 −35 question/type/match/tests/walkthrough_test.php
  200. +28 −30 question/type/multianswer/tests/upgradelibnewqe_test.php
  201. +4 −4 report/completion/index.php
  202. +1 −1 report/progress/index.php
  203. +31 −5 repository/upload/lib.php
  204. +101 −2 theme/base/style/core.css
  205. +30 −2 theme/base/style/course.css
  206. +4 −0 theme/base/style/question.css
  207. +6 −0 theme/formal_white/style/core.css
  208. +7 −0 theme/formal_white/style/formal_white.css
  209. +1 −1 user/filesedit.php
  210. +2 −2 version.php
  211. +3 −0 webservice/rest/locallib.php
  212. +88 −6 webservice/soap/locallib.php
  213. +15 −3 webservice/xmlrpc/locallib.php
View
@@ -240,7 +240,9 @@
if ($fetchupdates) {
// no sesskey support guaranteed here
- available_update_checker::instance()->fetch();
+ if (empty($CFG->disableupdatenotifications)) {
+ available_update_checker::instance()->fetch();
+ }
redirect($reloadurl);
}
View
@@ -174,21 +174,24 @@ public function upgrade_environment_page($release, $envstatus, $environment_resu
*/
public function upgrade_plugin_check_page(plugin_manager $pluginman, available_update_checker $checker,
$version, $showallplugins, $reloadurl, $continueurl) {
+ global $CFG;
$output = '';
$output .= $this->header();
$output .= $this->box_start('generalbox');
$output .= $this->container_start('generalbox', 'notice');
$output .= html_writer::tag('p', get_string('pluginchecknotice', 'core_plugin'));
- $output .= $this->container_start('checkforupdates');
- $output .= $this->single_button(new moodle_url($reloadurl, array('fetchupdates' => 1)), get_string('checkforupdates', 'core_plugin'));
- if ($timefetched = $checker->get_last_timefetched()) {
- $output .= $this->container(get_string('checkforupdateslast', 'core_plugin',
- userdate($timefetched, get_string('strftimedatetime', 'core_langconfig'))));
+ if (empty($CFG->disableupdatenotifications)) {
+ $output .= $this->container_start('checkforupdates');
+ $output .= $this->single_button(new moodle_url($reloadurl, array('fetchupdates' => 1)), get_string('checkforupdates', 'core_plugin'));
+ if ($timefetched = $checker->get_last_timefetched()) {
+ $output .= $this->container(get_string('checkforupdateslast', 'core_plugin',
+ userdate($timefetched, get_string('strftimedatetime', 'core_langconfig'))));
+ }
+ $output .= $this->container_end();
}
$output .= $this->container_end();
- $output .= $this->container_end();
$output .= $this->plugins_check_table($pluginman, $version, array('full' => $showallplugins));
$output .= $this->box_end();
@@ -227,11 +230,12 @@ public function upgrade_plugin_check_page(plugin_manager $pluginman, available_u
*/
public function admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed,
$cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch) {
+ global $CFG;
$output = '';
$output .= $this->header();
$output .= $this->maturity_info($maturity);
- $output .= $this->available_updates($availableupdates, $availableupdatesfetch);
+ $output .= empty($CFG->disableupdatenotifications) ? $this->available_updates($availableupdates, $availableupdatesfetch) : '';
$output .= $this->insecure_dataroot_warning($insecuredataroot);
$output .= $this->display_errors_warning($errorsdisplayed);
$output .= $this->cron_overdue_warning($cronoverdue);
@@ -256,19 +260,23 @@ public function admin_notifications_page($maturity, $insecuredataroot, $errorsdi
* @return string HTML to output.
*/
public function plugin_management_page(plugin_manager $pluginman, available_update_checker $checker) {
+ global $CFG;
+
$output = '';
$output .= $this->header();
$output .= $this->heading(get_string('pluginsoverview', 'core_admin'));
$output .= $this->plugins_overview_panel($pluginman);
- $output .= $this->container_start('checkforupdates');
- $output .= $this->single_button(new moodle_url($this->page->url, array('fetchremote' => 1)), get_string('checkforupdates', 'core_plugin'));
- if ($timefetched = $checker->get_last_timefetched()) {
- $output .= $this->container(get_string('checkforupdateslast', 'core_plugin',
- userdate($timefetched, get_string('strftimedatetime', 'core_langconfig'))));
+ if (empty($CFG->disableupdatenotifications)) {
+ $output .= $this->container_start('checkforupdates');
+ $output .= $this->single_button(new moodle_url($this->page->url, array('fetchremote' => 1)), get_string('checkforupdates', 'core_plugin'));
+ if ($timefetched = $checker->get_last_timefetched()) {
+ $output .= $this->container(get_string('checkforupdateslast', 'core_plugin',
+ userdate($timefetched, get_string('strftimedatetime', 'core_langconfig'))));
+ }
+ $output .= $this->container_end();
}
- $output .= $this->container_end();
$output .= $this->box($this->plugins_control_panel($pluginman), 'generalbox');
$output .= $this->footer();
@@ -466,7 +474,10 @@ protected function available_updates($updates, $fetch) {
$updateinfo .= $this->moodle_available_update_info($update);
}
} else {
- $updateinfo .= $this->heading(get_string('updateavailablenot', 'core_admin'), 3);
+ $now = time();
+ if ($fetch and ($fetch <= $now) and ($now - $fetch < HOURSECS)) {
+ $updateinfo .= $this->heading(get_string('updateavailablenot', 'core_admin'), 3);
+ }
}
$updateinfo .= $this->container_start('checkforupdates');
@@ -559,6 +570,8 @@ function upgrade_reload($url) {
* @return string HTML code
*/
public function plugins_check_table(plugin_manager $pluginman, $version, array $options = null) {
+ global $CFG;
+
$plugininfo = $pluginman->get_plugins();
if (empty($plugininfo)) {
@@ -641,7 +654,7 @@ public function plugins_check_table(plugin_manager $pluginman, $version, array $
$status = get_string('status_' . $statuscode, 'core_plugin');
$availableupdates = $plugin->available_updates();
- if (!empty($availableupdates)) {
+ if (!empty($availableupdates) and empty($CFG->disableupdatenotifications)) {
foreach ($availableupdates as $availableupdate) {
$status .= $this->plugin_available_update_info($availableupdate);
}
@@ -771,6 +784,8 @@ protected function required_column(plugininfo_base $plugin, plugin_manager $plug
* @return string as usually
*/
public function plugins_overview_panel(plugin_manager $pluginman) {
+ global $CFG;
+
$plugininfo = $pluginman->get_plugins();
$numtotal = $numdisabled = $numextension = $numupdatable = 0;
@@ -787,7 +802,7 @@ public function plugins_overview_panel(plugin_manager $pluginman) {
if (!$plugin->is_standard()) {
$numextension++;
}
- if ($plugin->available_updates()) {
+ if (empty($CFG->disableupdatenotifications) and $plugin->available_updates()) {
$numupdatable++;
}
}
@@ -813,6 +828,8 @@ public function plugins_overview_panel(plugin_manager $pluginman) {
* @return string HTML code
*/
public function plugins_control_panel(plugin_manager $pluginman) {
+ global $CFG;
+
$plugininfo = $pluginman->get_plugins();
if (empty($plugininfo)) {
@@ -916,7 +933,7 @@ public function plugins_control_panel(plugin_manager $pluginman) {
}
$updateinfo = '';
- if (is_array($plugin->available_updates())) {
+ if (empty($CFG->disableupdatenotifications) and is_array($plugin->available_updates())) {
foreach ($plugin->available_updates() as $availableupdate) {
$updateinfo .= $this->plugin_available_update_info($availableupdate);
}
View
@@ -54,6 +54,17 @@
print_error('nopermissions', 'error', '', get_string('checkpermissions', 'role'));
}
+if ($userid != $USER->id) {
+ // If its not the current user we need to extend the navigation for that user to ensure
+ // their navigation is loaded and this page found upon it.
+ $PAGE->navigation->extend_for_user($user);
+}
+if ($course->id != $SITE->id || $userid != $USER->id) {
+ // If we're within a course OR if we're viewing another user then we need to include the
+ // settings base on the navigation to ensure that the navbar will contain the users name.
+ $PAGE->navbar->includesettingsbase = true;
+}
+
/// Now get the role assignments for this user.
$sql = "SELECT
ra.id, ra.userid, ra.contextid, ra.roleid, ra.component, ra.itemid,
@@ -120,14 +131,9 @@
$PAGE->set_title($title);
if ($courseid != SITEID) {
$PAGE->set_heading($fullname);
- if (has_capability('moodle/course:viewparticipants', $coursecontext)) {
- $PAGE->navbar->add(get_string('participants'),new moodle_url('/user/index.php', array('id'=>$courseid)));
- }
} else {
$PAGE->set_heading($course->fullname);
}
-$PAGE->navbar->add($fullname, new moodle_url("$CFG->wwwroot/user/view.php", array('id'=>$userid,'course'=>$courseid)));
-$PAGE->navbar->add($straction);
echo $OUTPUT->header();
echo $OUTPUT->heading($title, 3);
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthnormal');
View
@@ -222,19 +222,21 @@
$ADMIN->add('server', new admin_externalpage('adminregistration', new lang_string('registration','admin'), "$CFG->wwwroot/$CFG->admin/registration/index.php"));
// "update notifications" settingpage
-$temp = new admin_settingpage('updatenotifications', new lang_string('updatenotifications', 'core_admin'));
-$temp->add(new admin_setting_configcheckbox('updateautocheck', new lang_string('updateautocheck', 'core_admin'),
- new lang_string('updateautocheck_desc', 'core_admin'), 1));
-$temp->add(new admin_setting_configselect('updateminmaturity', new lang_string('updateminmaturity', 'core_admin'),
- new lang_string('updateminmaturity_desc', 'core_admin'), MATURITY_STABLE,
- array(
- MATURITY_ALPHA => new lang_string('maturity'.MATURITY_ALPHA, 'core_admin'),
- MATURITY_BETA => new lang_string('maturity'.MATURITY_BETA, 'core_admin'),
- MATURITY_RC => new lang_string('maturity'.MATURITY_RC, 'core_admin'),
- MATURITY_STABLE => new lang_string('maturity'.MATURITY_STABLE, 'core_admin'),
- )));
-$temp->add(new admin_setting_configcheckbox('updatenotifybuilds', new lang_string('updatenotifybuilds', 'core_admin'),
- new lang_string('updatenotifybuilds_desc', 'core_admin'), 0));
-$ADMIN->add('server', $temp);
+if (empty($CFG->disableupdatenotifications)) {
+ $temp = new admin_settingpage('updatenotifications', new lang_string('updatenotifications', 'core_admin'));
+ $temp->add(new admin_setting_configcheckbox('updateautocheck', new lang_string('updateautocheck', 'core_admin'),
+ new lang_string('updateautocheck_desc', 'core_admin'), 1));
+ $temp->add(new admin_setting_configselect('updateminmaturity', new lang_string('updateminmaturity', 'core_admin'),
+ new lang_string('updateminmaturity_desc', 'core_admin'), MATURITY_STABLE,
+ array(
+ MATURITY_ALPHA => new lang_string('maturity'.MATURITY_ALPHA, 'core_admin'),
+ MATURITY_BETA => new lang_string('maturity'.MATURITY_BETA, 'core_admin'),
+ MATURITY_RC => new lang_string('maturity'.MATURITY_RC, 'core_admin'),
+ MATURITY_STABLE => new lang_string('maturity'.MATURITY_STABLE, 'core_admin'),
+ )));
+ $temp->add(new admin_setting_configcheckbox('updatenotifybuilds', new lang_string('updatenotifybuilds', 'core_admin'),
+ new lang_string('updatenotifybuilds_desc', 'core_admin'), 0));
+ $ADMIN->add('server', $temp);
+}
} // end of speedup
@@ -39,7 +39,7 @@ function definition() {
'pgsql/native',
'mssql/native',
'oci/native',
- 'sqlite3/pdo',
+ 'sqlsrv/native',
);
$drivers = array();
foreach($supported as $driver) {
@@ -42,29 +42,40 @@
notice('This function is for MySQL databases only!', new moodle_url('/admin/'));
}
+$prefix = str_replace('_', '\\_', $DB->get_prefix()).'%';
+$sql = "SHOW TABLE STATUS WHERE Name LIKE ? AND Engine <> 'InnoDB'";
+$rs = $DB->get_recordset_sql($sql, array($prefix));
+if (!$rs->valid()) {
+ $rs->close();
+ echo $OUTPUT->box('<p>All tables are already using InnoDB database engine.</p>');
+ echo $OUTPUT->continue_button('/admin/');
+ echo $OUTPUT->footer();
+ die;
+}
+
if (data_submitted() and $confirm and confirm_sesskey()) {
echo $OUTPUT->notification('Please be patient and wait for this to complete...', 'notifysuccess');
set_time_limit(0);
- if ($tables = $DB->get_tables()) {
+ foreach ($rs as $table) {
$DB->set_debug(true);
- foreach ($tables as $table) {
- $fulltable = $DB->get_prefix().$table;
- try {
- $DB->change_database_structure("ALTER TABLE $fulltable ENGINE=INNODB");
- } catch (moodle_exception $e) {
- echo $OUTPUT->notification(s($e->getMessage()).'<br />'.s($e->debuginfo));
- }
+ $fulltable = $table->name;
+ try {
+ $DB->change_database_structure("ALTER TABLE $fulltable ENGINE=INNODB");
+ } catch (moodle_exception $e) {
+ echo $OUTPUT->notification(s($e->getMessage()).'<br />'.s($e->debuginfo));
}
$DB->set_debug(false);
}
+ $rs->close();
echo $OUTPUT->notification('... done.', 'notifysuccess');
echo $OUTPUT->continue_button(new moodle_url('/admin/'));
echo $OUTPUT->footer();
} else {
+ $rs->close();
$optionsyes = array('confirm'=>'1', 'sesskey'=>sesskey());
$formcontinue = new single_button(new moodle_url('/admin/tool/innodb/index.php', $optionsyes), get_string('yes'));
$formcancel = new single_button(new moodle_url('/admin/'), get_string('no'), 'get');
@@ -152,7 +152,7 @@ function user_download_csv($fields) {
$filename = clean_filename(get_string('users').'.csv');
header("Content-Type: application/download\n");
- header("Content-Disposition: attachment; filename=$filename");
+ header("Content-Disposition: attachment; filename=\"$filename\"");
header("Expires: 0");
header("Cache-Control: must-revalidate,post-check=0,pre-check=0");
header("Pragma: public");
Oops, something went wrong.

0 comments on commit ae4a9ae

Please sign in to comment.