From ebd0f69daabb4954d426cbe522aa692062ae6e2b Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Thu, 3 Feb 2022 23:59:25 +0100 Subject: [PATCH 1/3] MDL-73764 tool_xmldb: New report to show all xml files needing reconcile People uses to edit the install.xml files manually, here and there. That uses to come with small mistakes, like wrong white-space indentation, some attributes out of order... While none of them are critical, they add a lot of noise when somebody is correctly editing a file with the XMLDB Editor because it, correctly, overwrites the whole file and then diffs show a lot of unrelated changes. So, this report will inform us about any file needing to be regenerated because it has been manually edited (in a different way than the way the editor has). Note that the report is very basic, with minimal ouput, manually generating the HTML, like the rest of the XMLDB Editor actions do. We are not using renderers neither templates here. Also note that it includes a commented line of code that, once uncommented, enables the report to, also, fix the wrong files. Useful for developers. --- .../actions/main_view/main_view.class.php | 3 + .../reconcile_files/reconcile_files.class.php | 124 ++++++++++++++++++ admin/tool/xmldb/lang/en/tool_xmldb.php | 7 + 3 files changed, 134 insertions(+) create mode 100644 admin/tool/xmldb/actions/reconcile_files/reconcile_files.class.php diff --git a/admin/tool/xmldb/actions/main_view/main_view.class.php b/admin/tool/xmldb/actions/main_view/main_view.class.php index 7a37f8eb1ad..8071a71530b 100644 --- a/admin/tool/xmldb/actions/main_view/main_view.class.php +++ b/admin/tool/xmldb/actions/main_view/main_view.class.php @@ -57,6 +57,7 @@ class main_view extends XMLDBAction { 'checkforeignkeys' => 'tool_xmldb', 'checkbigints' => 'tool_xmldb', 'checkoraclesemantics' => 'tool_xmldb', + 'reconcilefiles' => 'tool_xmldb', 'doc' => 'tool_xmldb', 'filemodifiedoutfromeditor' => 'tool_xmldb', 'viewxml' => 'tool_xmldb', @@ -97,6 +98,8 @@ class main_view extends XMLDBAction { $b .= ' [' . $this->str['reservedwords'] . ']'; // The docs button $b .= ' [' . $this->str['doc'] . ']'; + // The reconcile XMLDB files button. + $b .= ' [' . $this->str['reconcilefiles'] . ']'; // The check indexes button $b .= ' [' . $this->str['checkindexes'] . ']'; // The check defaults button diff --git a/admin/tool/xmldb/actions/reconcile_files/reconcile_files.class.php b/admin/tool/xmldb/actions/reconcile_files/reconcile_files.class.php new file mode 100644 index 00000000000..7536ad2b6ce --- /dev/null +++ b/admin/tool/xmldb/actions/reconcile_files/reconcile_files.class.php @@ -0,0 +1,124 @@ +. + +/** + * List all the files needing reconcile because the definitions don't match the XML contents. + * + * @package tool_xmldb + * @copyright 2022 onwards Eloy Lafuente (stronk7) {@link https://stronk7.com} + * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class reconcile_files extends XMLDBAction { + + /** + * Init method, every subclass will have its own + */ + public function init() { + parent::init(); + + // Set own custom attributes. + $this->sesskey_protected = false; // This action doesn't need sesskey protection. + + // Get needed strings. + $this->loadStrings([ + 'backtomainview' => 'tool_xmldb', + 'reconcile_files_intro' => 'tool_xmldb', + 'reconcile_files_no' => 'tool_xmldb', + 'reconcile_files_yes' => 'tool_xmldb', + 'searchresults' => 'tool_xmldb', + ]); + } + + /** + * Invoke method, every class will have its own + * returns true/false on completion, setting both + * errormsg and output as necessary + */ + public function invoke() { + parent::invoke(); + + $result = true; + + // Set own core attributes. + $this->does_generate = ACTION_GENERATE_HTML; + + // These are always here. + global $CFG, $XMLDB; + + // Do the job, setting $result as needed. + + // Add link back to home. + $b = '

'; + $b .= ' [' . $this->str['backtomainview'] . ']'; + $b .= '

'; + $this->output .= $b; + + $c = '

'; + $c .= $this->str['reconcile_files_intro']; + $c .= '

'; + $this->output .= $c; + + // Get the list of DB directories. + $result = $this->launch('get_db_directories'); + if ($result && !empty($XMLDB->dbdirs)) { + $needfix = []; + foreach ($XMLDB->dbdirs as $key => $dbdir) { + // Verify it exists. + if (!file_exists($key . '/install.xml') && !is_readable($key . '/install.xml')) { + continue; + } + + // Read the raw contents of the file. + $rawcontents = file_get_contents($key . '/install.xml'); + + // Load the XMLDB file and its structure. + $xmldb = new xmldb_file($key . '/install.xml'); + $xmldb->loadXMLStructure(); + + // Generate the XML contents from the loaded structure. + $xmlcontents = $xmldb->getStructure()->xmlOutput(); + + if ($rawcontents != $xmlcontents) { + $relpath = str_replace($CFG->dirroot . '/', '', $key) . '/install.xml'; + $needfix[] = $relpath; + // Left here on purpose, as a quick way to fix problems. To be + // enabled and run by developers only, uncomment the next line: + // file_put_contents($key . '/install.xml', $xmlcontents); + // (this script won't ever do that officially). + } + } + } + + $r = '

' . $this->str['searchresults'] . '

'; + if ($needfix) { + $r .= '

' . $this->str['reconcile_files_yes'] . count($needfix) . '

'; + $r .= ''; + + } else { + $r .= '

' . $this->str['reconcile_files_no'] . '

'; + } + + // Set the output. + $this->output .= $r; + + // Launch postaction if exists (leave this unmodified). + if ($this->getPostAction() && $result) { + return $this->launch($this->getPostAction()); + } + + return $result; + } +} diff --git a/admin/tool/xmldb/lang/en/tool_xmldb.php b/admin/tool/xmldb/lang/en/tool_xmldb.php index e87983503f1..786de3fc70c 100644 --- a/admin/tool/xmldb/lang/en/tool_xmldb.php +++ b/admin/tool/xmldb/lang/en/tool_xmldb.php @@ -176,6 +176,13 @@ $string['persistentfieldscomplete'] = 'The following fields have been added: '; $string['persistentfieldsexist'] = 'The following fields already exist: '; $string['pluginname'] = 'XMLDB editor'; $string['primarykeyonlyallownotnullfields'] = 'Primary keys cannot be null'; +$string['reconcilefiles'] = 'Reconcile XMLDB files'; +$string['reconcile_files'] = 'Look for XMLDB files needing reconcile'; +$string['reconcile_files_intro'] = 'This functionality looks for the current contents of all the XMLDB files, verifying that they match the results of generating them from the XMLDB Editor. + +A list of files needing to be reconciled (regenerated) will be displayed and the XMLDB Editor should be used to fix them.'; +$string['reconcile_files_no'] = 'All files are ok, no reconcile action needed'; +$string['reconcile_files_yes'] = 'Found files to reconcile: '; $string['reserved'] = 'Reserved'; $string['reservedwords'] = 'Reserved words'; $string['revert'] = 'Revert'; From 3bb4a4009c8e05f94152e96195ce8dcb40db58f8 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Fri, 4 Feb 2022 09:41:14 +0100 Subject: [PATCH 2/3] MDL-73764 tool_xmldb: Regenerate all the files detected by the report Note that, instead of going one by one to them from the XMLDB Editor (load, makes some tiny change, save, revert the change, save), the report includes a commented line that, once uncommented, does regenerate the file while reporting. I've left it there as a commodity for the developer. --- admin/tool/brickfield/db/install.xml | 2 +- admin/tool/customlang/db/install.xml | 8 +- admin/tool/dataprivacy/db/install.xml | 2 +- admin/tool/log/store/standard/db/install.xml | 2 +- admin/tool/policy/db/install.xml | 2 +- blocks/recent_activity/db/install.xml | 2 +- blocks/recentlyaccesseditems/db/install.xml | 2 +- blocks/rss_client/db/install.xml | 2 +- enrol/flatfile/db/install.xml | 2 +- enrol/lti/db/install.xml | 22 +- enrol/paypal/db/install.xml | 2 +- grade/grading/form/guide/db/install.xml | 102 ++++---- grade/grading/form/rubric/db/install.xml | 8 +- lib/db/install.xml | 220 +++++++++--------- lib/editor/atto/db/install.xml | 2 +- message/output/airnotifier/db/install.xml | 2 +- mod/assign/db/install.xml | 4 +- mod/chat/db/install.xml | 2 +- mod/choice/db/install.xml | 2 +- mod/data/db/install.xml | 2 +- mod/feedback/db/install.xml | 2 +- mod/folder/db/install.xml | 2 +- mod/forum/db/install.xml | 3 +- mod/h5pactivity/db/install.xml | 2 +- mod/imscp/db/install.xml | 4 +- mod/lesson/db/install.xml | 2 +- mod/lti/db/install.xml | 2 +- .../service/gradebookservices/db/install.xml | 2 +- mod/page/db/install.xml | 2 +- mod/quiz/accessrule/seb/db/install.xml | 3 +- mod/resource/db/install.xml | 2 +- mod/scorm/db/install.xml | 6 +- mod/survey/db/install.xml | 2 +- mod/url/db/install.xml | 2 +- mod/wiki/db/install.xml | 2 +- .../allocation/scheduled/db/install.xml | 2 +- mod/workshop/form/accumulative/db/install.xml | 2 +- mod/workshop/form/comments/db/install.xml | 2 +- mod/workshop/form/numerrors/db/install.xml | 2 +- mod/workshop/form/rubric/db/install.xml | 4 +- question/type/calculated/db/install.xml | 2 +- question/type/ddimageortext/db/install.xml | 2 +- question/type/ddmarker/db/install.xml | 2 +- question/type/ddwtos/db/install.xml | 2 +- question/type/gapselect/db/install.xml | 2 +- question/type/multianswer/db/install.xml | 5 +- question/type/multichoice/db/install.xml | 2 +- question/type/numerical/db/install.xml | 2 +- search/engine/simpledb/db/install.xml | 2 +- 49 files changed, 231 insertions(+), 232 deletions(-) diff --git a/admin/tool/brickfield/db/install.xml b/admin/tool/brickfield/db/install.xml index 03484e3a3ff..0a32919343b 100644 --- a/admin/tool/brickfield/db/install.xml +++ b/admin/tool/brickfield/db/install.xml @@ -1,7 +1,7 @@ diff --git a/admin/tool/customlang/db/install.xml b/admin/tool/customlang/db/install.xml index 2d75c1d963e..a8030abd98a 100644 --- a/admin/tool/customlang/db/install.xml +++ b/admin/tool/customlang/db/install.xml @@ -10,9 +10,9 @@ - - - + + + @@ -37,4 +37,4 @@
-
\ No newline at end of file + diff --git a/admin/tool/dataprivacy/db/install.xml b/admin/tool/dataprivacy/db/install.xml index a7b564c63b2..f2e2bf0d5e1 100644 --- a/admin/tool/dataprivacy/db/install.xml +++ b/admin/tool/dataprivacy/db/install.xml @@ -136,4 +136,4 @@ - \ No newline at end of file + diff --git a/admin/tool/log/store/standard/db/install.xml b/admin/tool/log/store/standard/db/install.xml index 22d80d4e06e..e3b8c40b7e2 100644 --- a/admin/tool/log/store/standard/db/install.xml +++ b/admin/tool/log/store/standard/db/install.xml @@ -39,4 +39,4 @@ - \ No newline at end of file + diff --git a/admin/tool/policy/db/install.xml b/admin/tool/policy/db/install.xml index d3eabcb6562..b5eefedd666 100644 --- a/admin/tool/policy/db/install.xml +++ b/admin/tool/policy/db/install.xml @@ -61,4 +61,4 @@ - \ No newline at end of file + diff --git a/blocks/recent_activity/db/install.xml b/blocks/recent_activity/db/install.xml index 34fc9ff350b..a2c6e11e3ad 100644 --- a/blocks/recent_activity/db/install.xml +++ b/blocks/recent_activity/db/install.xml @@ -22,4 +22,4 @@ - \ No newline at end of file + diff --git a/blocks/recentlyaccesseditems/db/install.xml b/blocks/recentlyaccesseditems/db/install.xml index 2b6bf1058dd..215b1f0014a 100644 --- a/blocks/recentlyaccesseditems/db/install.xml +++ b/blocks/recentlyaccesseditems/db/install.xml @@ -23,4 +23,4 @@ - \ No newline at end of file + diff --git a/blocks/rss_client/db/install.xml b/blocks/rss_client/db/install.xml index 7a7e9cb4b6c..47a3d4f98f9 100644 --- a/blocks/rss_client/db/install.xml +++ b/blocks/rss_client/db/install.xml @@ -17,7 +17,7 @@ - + diff --git a/enrol/flatfile/db/install.xml b/enrol/flatfile/db/install.xml index 74b8f39a311..153f656c074 100644 --- a/enrol/flatfile/db/install.xml +++ b/enrol/flatfile/db/install.xml @@ -23,4 +23,4 @@ - \ No newline at end of file + diff --git a/enrol/lti/db/install.xml b/enrol/lti/db/install.xml index c724a4be149..09a2602f38e 100644 --- a/enrol/lti/db/install.xml +++ b/enrol/lti/db/install.xml @@ -69,11 +69,11 @@ - - - + + + - + @@ -89,7 +89,7 @@ - + @@ -105,7 +105,7 @@ - + @@ -117,7 +117,7 @@ - + @@ -134,7 +134,7 @@ - + @@ -149,11 +149,11 @@ - + - + @@ -164,7 +164,7 @@ - + diff --git a/enrol/paypal/db/install.xml b/enrol/paypal/db/install.xml index cf4f9237c8c..0abbd03f6a3 100644 --- a/enrol/paypal/db/install.xml +++ b/enrol/paypal/db/install.xml @@ -40,4 +40,4 @@ - \ No newline at end of file + diff --git a/grade/grading/form/guide/db/install.xml b/grade/grading/form/guide/db/install.xml index 54fe949b5f4..c977a15e4c1 100644 --- a/grade/grading/form/guide/db/install.xml +++ b/grade/grading/form/guide/db/install.xml @@ -1,54 +1,54 @@ - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
- - - - - - - - - - - - -
-
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../../../../../lib/xmldb/xmldb.xsd" +> + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+
diff --git a/grade/grading/form/rubric/db/install.xml b/grade/grading/form/rubric/db/install.xml index 4316d1bd42a..efa32f9e1be 100644 --- a/grade/grading/form/rubric/db/install.xml +++ b/grade/grading/form/rubric/db/install.xml @@ -9,7 +9,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -50,4 +50,4 @@ - \ No newline at end of file + diff --git a/lib/db/install.xml b/lib/db/install.xml index 6b361f5d63c..2b5b38f70aa 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -308,7 +308,7 @@ - + @@ -4554,129 +4554,125 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
- - - - - - - - - - - - - + + + + + + + + + + + + +
- - - - - - - - - - - - - +
+ + + + + + + + + + + +
- - - - - - - - - - - - + + + + + + + + + + + +
- - - - - - - - - - - - + + + + + + + + + + + +
- - - - - - - - - - - - - + + + + + + + + + + + + +
- - - - - - - - - - - - - - +
+ + + + + + + + + + + + +
- - - - - - - - - - - - - - + + + + + + + + + + + + + +
diff --git a/lib/editor/atto/db/install.xml b/lib/editor/atto/db/install.xml index 8d17ee419bc..f13c52c16be 100644 --- a/lib/editor/atto/db/install.xml +++ b/lib/editor/atto/db/install.xml @@ -22,4 +22,4 @@
- \ No newline at end of file + diff --git a/message/output/airnotifier/db/install.xml b/message/output/airnotifier/db/install.xml index ec529ff0924..3d56f9eb39d 100644 --- a/message/output/airnotifier/db/install.xml +++ b/message/output/airnotifier/db/install.xml @@ -16,4 +16,4 @@
- \ No newline at end of file + diff --git a/mod/assign/db/install.xml b/mod/assign/db/install.xml index 1d8768b52e9..49382f962e9 100644 --- a/mod/assign/db/install.xml +++ b/mod/assign/db/install.xml @@ -151,7 +151,7 @@ - + @@ -165,4 +165,4 @@
- \ No newline at end of file + diff --git a/mod/chat/db/install.xml b/mod/chat/db/install.xml index 1e18e4b1a15..1da4bee36d5 100644 --- a/mod/chat/db/install.xml +++ b/mod/chat/db/install.xml @@ -90,4 +90,4 @@ - \ No newline at end of file + diff --git a/mod/choice/db/install.xml b/mod/choice/db/install.xml index d6ee73f74c6..aafb4cbb3d1 100644 --- a/mod/choice/db/install.xml +++ b/mod/choice/db/install.xml @@ -64,4 +64,4 @@ - \ No newline at end of file + diff --git a/mod/data/db/install.xml b/mod/data/db/install.xml index 566ff2cc0a9..38f427a1c80 100644 --- a/mod/data/db/install.xml +++ b/mod/data/db/install.xml @@ -111,4 +111,4 @@
- \ No newline at end of file + diff --git a/mod/feedback/db/install.xml b/mod/feedback/db/install.xml index ab8e56eddfd..19295e44db0 100644 --- a/mod/feedback/db/install.xml +++ b/mod/feedback/db/install.xml @@ -155,4 +155,4 @@ - \ No newline at end of file + diff --git a/mod/folder/db/install.xml b/mod/folder/db/install.xml index 11e7bb6a5ed..54bd1e27504 100644 --- a/mod/folder/db/install.xml +++ b/mod/folder/db/install.xml @@ -26,4 +26,4 @@ - \ No newline at end of file + diff --git a/mod/forum/db/install.xml b/mod/forum/db/install.xml index 96c9c7067d2..0edb6ab22c4 100644 --- a/mod/forum/db/install.xml +++ b/mod/forum/db/install.xml @@ -203,8 +203,7 @@ - + diff --git a/mod/h5pactivity/db/install.xml b/mod/h5pactivity/db/install.xml index 57cd1e0a085..7f637bf5ad5 100644 --- a/mod/h5pactivity/db/install.xml +++ b/mod/h5pactivity/db/install.xml @@ -76,4 +76,4 @@ - \ No newline at end of file + diff --git a/mod/imscp/db/install.xml b/mod/imscp/db/install.xml index 6761e1bf6ed..18337fd58a3 100644 --- a/mod/imscp/db/install.xml +++ b/mod/imscp/db/install.xml @@ -1,5 +1,5 @@ - @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/mod/lesson/db/install.xml b/mod/lesson/db/install.xml index 583b408d8d4..99d3d9b8f18 100644 --- a/mod/lesson/db/install.xml +++ b/mod/lesson/db/install.xml @@ -198,4 +198,4 @@
- \ No newline at end of file + diff --git a/mod/lti/db/install.xml b/mod/lti/db/install.xml index b1549235e9d..57509c40093 100644 --- a/mod/lti/db/install.xml +++ b/mod/lti/db/install.xml @@ -164,4 +164,4 @@ - \ No newline at end of file + diff --git a/mod/lti/service/gradebookservices/db/install.xml b/mod/lti/service/gradebookservices/db/install.xml index 2bd03b71478..e75e0d7f89f 100644 --- a/mod/lti/service/gradebookservices/db/install.xml +++ b/mod/lti/service/gradebookservices/db/install.xml @@ -19,7 +19,7 @@ - + diff --git a/mod/page/db/install.xml b/mod/page/db/install.xml index 8df8eda9f61..3d2ff4db374 100644 --- a/mod/page/db/install.xml +++ b/mod/page/db/install.xml @@ -28,4 +28,4 @@ - \ No newline at end of file + diff --git a/mod/quiz/accessrule/seb/db/install.xml b/mod/quiz/accessrule/seb/db/install.xml index ffbf9326572..17caa56b3c3 100644 --- a/mod/quiz/accessrule/seb/db/install.xml +++ b/mod/quiz/accessrule/seb/db/install.xml @@ -1,7 +1,8 @@ + xsi:noNamespaceSchemaLocation="../../../../../lib/xmldb/xmldb.xsd" +> diff --git a/mod/resource/db/install.xml b/mod/resource/db/install.xml index 8708d1a4e0a..c0ffb203c93 100644 --- a/mod/resource/db/install.xml +++ b/mod/resource/db/install.xml @@ -55,4 +55,4 @@
-
\ No newline at end of file + diff --git a/mod/scorm/db/install.xml b/mod/scorm/db/install.xml index 9cb0b594ad8..a5a86266112 100644 --- a/mod/scorm/db/install.xml +++ b/mod/scorm/db/install.xml @@ -1,7 +1,7 @@ @@ -224,4 +224,4 @@
-
\ No newline at end of file + diff --git a/mod/survey/db/install.xml b/mod/survey/db/install.xml index ebf7e040333..e8611c2af04 100644 --- a/mod/survey/db/install.xml +++ b/mod/survey/db/install.xml @@ -74,4 +74,4 @@ - \ No newline at end of file + diff --git a/mod/url/db/install.xml b/mod/url/db/install.xml index 8e2c8c79066..1acb3dda8e4 100644 --- a/mod/url/db/install.xml +++ b/mod/url/db/install.xml @@ -25,4 +25,4 @@ - \ No newline at end of file + diff --git a/mod/wiki/db/install.xml b/mod/wiki/db/install.xml index b53bb58af11..d7226d8f59d 100644 --- a/mod/wiki/db/install.xml +++ b/mod/wiki/db/install.xml @@ -113,4 +113,4 @@
- \ No newline at end of file + diff --git a/mod/workshop/allocation/scheduled/db/install.xml b/mod/workshop/allocation/scheduled/db/install.xml index ce1a25d9bc1..ec23f6cb75f 100644 --- a/mod/workshop/allocation/scheduled/db/install.xml +++ b/mod/workshop/allocation/scheduled/db/install.xml @@ -22,4 +22,4 @@
- \ No newline at end of file + diff --git a/mod/workshop/form/accumulative/db/install.xml b/mod/workshop/form/accumulative/db/install.xml index 1f2ff097f2d..18d3d4fe78e 100644 --- a/mod/workshop/form/accumulative/db/install.xml +++ b/mod/workshop/form/accumulative/db/install.xml @@ -9,7 +9,7 @@ - + diff --git a/mod/workshop/form/comments/db/install.xml b/mod/workshop/form/comments/db/install.xml index 88d24086254..46b9507e9f6 100644 --- a/mod/workshop/form/comments/db/install.xml +++ b/mod/workshop/form/comments/db/install.xml @@ -9,7 +9,7 @@ - + diff --git a/mod/workshop/form/numerrors/db/install.xml b/mod/workshop/form/numerrors/db/install.xml index 9d8c57c4803..70f5d36f699 100644 --- a/mod/workshop/form/numerrors/db/install.xml +++ b/mod/workshop/form/numerrors/db/install.xml @@ -9,7 +9,7 @@ - + diff --git a/mod/workshop/form/rubric/db/install.xml b/mod/workshop/form/rubric/db/install.xml index bf6b1253f82..120cefc8801 100644 --- a/mod/workshop/form/rubric/db/install.xml +++ b/mod/workshop/form/rubric/db/install.xml @@ -9,7 +9,7 @@ - + @@ -22,7 +22,7 @@ - + diff --git a/question/type/calculated/db/install.xml b/question/type/calculated/db/install.xml index 7f7e022e9db..0b1ae47ee7a 100644 --- a/question/type/calculated/db/install.xml +++ b/question/type/calculated/db/install.xml @@ -87,4 +87,4 @@ - \ No newline at end of file + diff --git a/question/type/ddimageortext/db/install.xml b/question/type/ddimageortext/db/install.xml index b1aaa246b10..90759b8d054 100644 --- a/question/type/ddimageortext/db/install.xml +++ b/question/type/ddimageortext/db/install.xml @@ -52,4 +52,4 @@ - \ No newline at end of file + diff --git a/question/type/ddmarker/db/install.xml b/question/type/ddmarker/db/install.xml index e1644368660..9d9f0f01001 100644 --- a/question/type/ddmarker/db/install.xml +++ b/question/type/ddmarker/db/install.xml @@ -52,4 +52,4 @@ - \ No newline at end of file + diff --git a/question/type/ddwtos/db/install.xml b/question/type/ddwtos/db/install.xml index bf8ff624ef5..76767cd0966 100644 --- a/question/type/ddwtos/db/install.xml +++ b/question/type/ddwtos/db/install.xml @@ -23,4 +23,4 @@ - \ No newline at end of file + diff --git a/question/type/gapselect/db/install.xml b/question/type/gapselect/db/install.xml index 2ef9a8bf2e8..93ebd4b4dbc 100644 --- a/question/type/gapselect/db/install.xml +++ b/question/type/gapselect/db/install.xml @@ -23,4 +23,4 @@
- \ No newline at end of file + diff --git a/question/type/multianswer/db/install.xml b/question/type/multianswer/db/install.xml index 5ba1a7c0561..63c099c314b 100644 --- a/question/type/multianswer/db/install.xml +++ b/question/type/multianswer/db/install.xml @@ -1,5 +1,8 @@ - + diff --git a/question/type/multichoice/db/install.xml b/question/type/multichoice/db/install.xml index d7793269622..8557aa205a8 100644 --- a/question/type/multichoice/db/install.xml +++ b/question/type/multichoice/db/install.xml @@ -27,4 +27,4 @@
-
\ No newline at end of file +
diff --git a/question/type/numerical/db/install.xml b/question/type/numerical/db/install.xml index ae7eac67288..8aab02126d1 100644 --- a/question/type/numerical/db/install.xml +++ b/question/type/numerical/db/install.xml @@ -49,4 +49,4 @@ - \ No newline at end of file + diff --git a/search/engine/simpledb/db/install.xml b/search/engine/simpledb/db/install.xml index 21393311b31..a0f6ef170d1 100644 --- a/search/engine/simpledb/db/install.xml +++ b/search/engine/simpledb/db/install.xml @@ -30,4 +30,4 @@ - \ No newline at end of file + From a0f8a78f16ad6d7b39633c7cbd4831368d3c4a0a Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Fri, 4 Feb 2022 12:14:00 +0100 Subject: [PATCH 3/3] MDL-73764 behat: Verify the report works and all files in core are ok --- .../xmldb/tests/behat/reconcile_xmldb_files.feature | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 admin/tool/xmldb/tests/behat/reconcile_xmldb_files.feature diff --git a/admin/tool/xmldb/tests/behat/reconcile_xmldb_files.feature b/admin/tool/xmldb/tests/behat/reconcile_xmldb_files.feature new file mode 100644 index 00000000000..9d45a54b667 --- /dev/null +++ b/admin/tool/xmldb/tests/behat/reconcile_xmldb_files.feature @@ -0,0 +1,12 @@ +@tool @tool_xmldb +Feature: The Reconcile XMLDB files report works and all the files are ok + In order to ensure that all the XMLDB Editor xml files are generated properly + As a developer + I need to be able to run the Reconcile XMLDB files report and verify that everything is ok + + Scenario: The Reconcile XMLDB files reports that all files are ok + Given I log in as "admin" + And I navigate to "Development > XMLDB editor" in site administration + When I follow "[Reconcile XMLDB files]" + Then I should see "Look for XMLDB files needing reconcile" + And I should see "All files are ok, no reconcile action needed"