Closed NinaHerrmann closed 3 years ago
When completed, please combine into a single commit so that its easier for me to backport.
Can't 'https://github.com/gjb2048/moodle-format_topcoll/pull/81/commits/5d3c540ab7d32de39ba30eb081dbf8c74882f525#diff-8f5ff72ef1cf59199cfc4bbf16f2475d09e448601242f0d2c51bb94bd4aa1395R699-R702' use 'implode' (https://www.php.net/manual/en/function.implode.php) instead?
With https://github.com/gjb2048/moodle-format_topcoll/pull/81/commits/5d3c540ab7d32de39ba30eb081dbf8c74882f525#diff-972c351ef4188f1f82cc82207e98147ccbd23e43ddf222a3e5c3f8df5e475d04R120 - better if 'Show additional information for: {$a} in the course';
As ''Show additional information for {$a} in the course'; - then better English for https://github.com/gjb2048/moodle-format_topcoll/pull/81/commits/5d3c540ab7d32de39ba30eb081dbf8c74882f525#diff-8f5ff72ef1cf59199cfc4bbf16f2475d09e448601242f0d2c51bb94bd4aa1395R385-R391 with https://github.com/gjb2048/moodle-format_topcoll/pull/81/commits/5d3c540ab7d32de39ba30eb081dbf8c74882f525#diff-8f5ff72ef1cf59199cfc4bbf16f2475d09e448601242f0d2c51bb94bd4aa1395R386 to be 'assignments, quizzes....' etc. And even better if code can be 'assignments, quizzes, lessons and feedbacks' etc. So a trailing 'and' instead of a comma.
Thanks for your fast feedback! I implemented it, and will continue by writing test!
Hey from my point of view I am finished. You might wonder why I did not include a testcase for setting admin settings to 1 for each activity and check whether the default value is set to 1. I spent some time trying to find a way to avoid caching of moodle but somehow $courseformatoptions in topcoll/lib.php is cached. (https://github.com/gjb2048/moodle-format_topcoll/blob/9b058ac2de33cf3932cf7804794fd75bd608c5fd/lib.php#L386). If I include the logic before the if it works just fine. If you have any idea to avoid that please contact me. In case you agree that the test is sufficient for a rather small feature, please tell me and I will merge all changes into one commit. Cheers, Nina
Hey from my point of view I am finished. You might wonder why I did not include a testcase for setting admin settings to 1 for each activity and check whether the default value is set to 1. I spent some time trying to find a way to avoid caching of moodle but somehow $courseformatoptions in topcoll/lib.php is cached. (
). If I include the logic before the if it works just fine. If you have any idea to avoid that please contact me. In case you agree that the test is sufficient for a rather small feature, please tell me and I will merge all changes into one commit. Cheers, Nina
Line 386 is standard practice if you look at core topics lib.php.
https://github.com/gjb2048/moodle-format_topcoll/pull/81/files#diff-8f5ff72ef1cf59199cfc4bbf16f2475d09e448601242f0d2c51bb94bd4aa1395R538 etc. is invalid as you're getting a site setting for the format that does not exist - i.e. /course/format/topcoll/settings.php.
Multiple line comments (https://github.com/gjb2048/moodle-format_topcoll/pull/81/files#diff-8f5ff72ef1cf59199cfc4bbf16f2475d09e448601242f0d2c51bb94bd4aa1395R532-R535) need to use '/*' etc.
Don't add a comma when it is not needed: https://github.com/gjb2048/moodle-format_topcoll/pull/81/files#diff-8f5ff72ef1cf59199cfc4bbf16f2475d09e448601242f0d2c51bb94bd4aa1395R529
Here: https://github.com/gjb2048/moodle-format_topcoll/pull/81/files#diff-8f5ff72ef1cf59199cfc4bbf16f2475d09e448601242f0d2c51bb94bd4aa1395R532-R545 have this logic: https://github.com/gjb2048/moodle-format_topcoll/pull/81/files#diff-8f5ff72ef1cf59199cfc4bbf16f2475d09e448601242f0d2c51bb94bd4aa1395R755-R758 sort of thing.
@NinaHerrmann Any updates to this please? As I don't want to have to increase my workload when making a 3.10 version of CT and forward porting this. Or you'll have to update as 'master' will become for M3.10.
@NinaHerrmann Ok, I've made more changes, so you'll need to rebase.
@NinaHerrmann Ok, getting annoyed now, spent time on this and no reply from you.
@NinaHerrmann Still waiting for a reply from you.
@gjb2048 Sorry for the late answer I will rebase it and come back when I tested it.
Sorry for the mess, I looked for the fast way to merge the commits into one to make it clearer. I will move it to a new pull request and move all your comments to the new one.
@NinaHerrmann So has #91 superseded this?
Superceded by #91.
I am working on it but just to get an idea of the things I want to do:
If you have any remarks let me know, otherwise I would continue by writing phpunit test :slightly_smiling_face: