MDL-73764 tool_xmldb: New report to show all xml files needing reconcile
commitebd0f69daabb4954d426cbe522aa692062ae6e2b
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 3 Feb 2022 22:59:25 +0000 (3 23:59 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 8 Feb 2022 18:25:02 +0000 (8 19:25 +0100)
treef4c0e625ee7075ba72563da0c0190ef99efd4e51
parent589724236163476bdcf2310c2542b992dbfb9c7b
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.
admin/tool/xmldb/actions/main_view/main_view.class.php
admin/tool/xmldb/actions/reconcile_files/reconcile_files.class.php [new file with mode: 0644]
admin/tool/xmldb/lang/en/tool_xmldb.php