moodleou / moodle-quiz_answersheets

A Moodle quiz report to allow quiz attempts to be exported
8 stars 15 forks source link

issue #35: move classes around to fix missing file error #36

Closed dmitriim closed 1 year ago

dmitriim commented 1 year ago

As part of this patch we are moving renderer classes out of output folder to local/renderer to make core component tests happy in case if not all supported question types are installed.

Technically all renderers could be in any folder as in utils::get_question_renderer method we require a renderer file regardless. So no autoloading is used anyway.

Core tests with that patch:

root@c7387df7e44d:/var/www/moodl41# vendor/bin/phpunit lib/tests/component_test.php Moodle 4.1.1+ (Build: 20230224), ab1ad2ddfc1cf279deddfd7165502067cf63e392 Php: 7.4.30, mysqli: 5.7.39, OS: Linux 5.15.0-58-generic x86_64 PHPUnit 9.5.27 by Sebastian Bergmann and contributors.

................................................................. 65 / 73 ( 89%) ........ 73 / 73 (100%)

Time: 00:02.252, Memory: 95.50 MB

OK (73 tests, 4199 assertions)

timhunt commented 1 year ago

@dmitriim what makes you think we want our plugin re-organised? (Spoiler: we don't.)

If you want to fix the bug, fix the bug (which is presumaly just a matter of if (plugin not installed) skip this test?

Also, this whole pull request is pretty incomprehensible at first sight. If you want to speed things through review, try explaining what you are doing and why clearly.

dmitriim commented 1 year ago

Hi @timhunt Assuming you didn't read a description...