Closed John-Joubert closed 3 years ago
@John-Joubert Thanks for the patch. I only need the 'master' version, then I'll backport with a 'cherry-pick' to preserve your commit. One single commit please :) - if you have more then squash them into a single commit for the pull request branch (make a backup first as this can be dangerous). Also look and correct the failures: https://travis-ci.org/github/gjb2048/moodle-format_topcoll/builds/768521211. Ignore the 'static must be before ones', that's for me to do as a recent checker change.
@John-Joubert Also, please read all of the inline code comments I've done above.
@John-Joubert I've done the static changes, so you'll need to update your master / rebase your branches as needed.
Yeah - I'm sorry - I tried to get them all in one, and did version after version just on my own site, then cleaned up everything, and then did it all in one shot.
I saw those errors afterwards, so - I posted a commit to fix. I probably should have waited until I heard from you to let you know that I could fix it.
If you prefer - just reject it all, and I'll redo it.
Thanks for your kind consideration.
John
From: Gareth J Barnard @.> Sent: Tuesday, April 27, 2021 9:30 AM To: gjb2048/moodle-format_topcoll @.>' Cc: Subscribed @.***> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
@John-Jouberthttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJohn-Joubert&data=04%7C01%7C%7C4e2b4cc5a0314079fae208d9095f07cb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551126014278331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8GoXKDZ8apNHEKclXO5hm3yM4PuL%2FjYUQn%2FNBIz8jIA%3D&reserved=0 Thanks for the patch. I only need the 'master' version, then I'll backport with a 'cherry-pick' to preserve your commit. One single commit please :) - if you have more then squash them into a single commit for the pull request branch (make a backup first as this can be dangerous). Also look and correct the failures: https://travis-ci.org/github/gjb2048/moodle-format_topcoll/builds/768521211https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftravis-ci.org%2Fgithub%2Fgjb2048%2Fmoodle-format_topcoll%2Fbuilds%2F768521211&data=04%7C01%7C%7C4e2b4cc5a0314079fae208d9095f07cb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551126014288325%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=A0bp%2F70zT9xyEhBH6sfW8DLdMhFbBubRKBPlF1ufXDI%3D&reserved=0.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23issuecomment-827462333&data=04%7C01%7C%7C4e2b4cc5a0314079fae208d9095f07cb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551126014288325%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ITZrVg9S90Ig0FbHSrugF5VKUqfobGijOrblXcYETQ0%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPPXNVBWXZU2NPHCIYTTKZ7ZPANCNFSM43UEVK7Q&data=04%7C01%7C%7C4e2b4cc5a0314079fae208d9095f07cb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551126014298322%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vghwbr%2FrVhAfoXOoDltSZ%2BPEUBQdyeAZoheTvWSsKR0%3D&reserved=0.
Yes, I'll fix that comment.
From: Gareth J Barnard @.> Sent: Tuesday, April 27, 2021 9:27 AM To: gjb2048/moodle-format_topcoll @.> Cc: Subscribed @.***> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
@gjb2048 commented on this pull request.
@@ -341,10 +341,19 @@ public function ajax_section_move() {
- each of values is an array of block names (for left and right side columns) */ public function get_default_blocks() {
- return array(
- BLOCK_POS_LEFT => array(),
- BLOCK_POS_RIGHT => array('search_forums', 'news_items', 'calendar_upcoming', 'recent_activity')
- );
- $use_def_blocks = get_config('format_topcoll', 'defaultdisplayblocks');
- if ($use_def_blocks == 1) / 1 = No, 2 = Yes (default)/ {
This comment might not pass the Travis code checker, look at that result please.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23pullrequestreview-645638393&data=04%7C01%7C%7Cbd3d51613bfd40e8d0ec08d9095ea209%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551124310405356%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Yfl64lCdR7AZN5VhEaN7JtvTfWBuQhwu2ll08yHnWSw%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPKZICBRPX2LH7UBG6DTKZ7OZANCNFSM43UEVK7Q&data=04%7C01%7C%7Cbd3d51613bfd40e8d0ec08d9095ea209%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551124310405356%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jC43UAkeM5SC5t1kZhRWbSRv%2B7hg9xdwHf7dHOPuTsM%3D&reserved=0.
Yes, I just wanted you to see what was done, and be able to incorporate any of the text as needed.
It why I named it such a forget-me file - it's a throw away - just informational.
I'lll leave it out.
From: Gareth J Barnard @.> Sent: Tuesday, April 27, 2021 9:22 AM To: gjb2048/moodle-format_topcoll @.> Cc: Subscribed @.***> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
@gjb2048 commented on this pull request.
@@ -0,0 +1,76 @@ +John Joubert -
This file is not needed, as Git history covers it all.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23pullrequestreview-645633828&data=04%7C01%7C%7C7172e4c112cb4f41a2d008d9095df7c9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551121449878782%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BNjCsy3ct4K%2FMx%2Bl8YvT4ZlDEQRCSbXIfpew7TB8TUA%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPPH6Y7IXEYOMRNLYFDTKZ65BANCNFSM43UEVK7Q&data=04%7C01%7C%7C7172e4c112cb4f41a2d008d9095df7c9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551121449888776%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=UZgINhP%2FNtzdM2UT%2B7w%2FRrnPPFGUHP7BWbALtxPVHVA%3D&reserved=0.
No need for $use_def_blocks as only used once:
if (get_config('format_topcoll', 'defaultdisplayblocks') == 1) // 1 = No, 2 = Yes (default)
@John-Joubert / @badmechanic With "I don't know how to put changes for both the Moodle 3.9 and Moodle 3.10 versions in one commit, as the language files are different in the two branches that you provided (MOODLE_39 vs master)- but the lib.php and settings.php files are identical, however." - NO! Your language changes are identical in MOODLE_39 and master versions, it only looks that way because you messed up and based the Moodle 3.9 pull request against 'master' and not the MOODLE_39 branch. Therefore: a) Single commit for Moodle 3.10 version in master b) I'll backport to M3.9 version in MOODLE_39 branch with a cherry-pick to preserve your commit, this means that the code is identical in both versions.
RE: Sadly, I'm too much of a noob to understand how to provide it all in a single commit because the language files between MOODLE_39 and master are different. I can re-check that this is indeed a fact (I was surprised by this, frankly). So - before resubmitting - I will double-check that my facts are correct for this.
See above.
RE: Would you just like a bash script to run to add the language file additions to the end of the files instead??? I'm quite skilled at bash scripting (it's my everyday tool) - and I can just submit that in the main directory as "fix_lang_files.sh" and I can make it smart that if the definitions already exists, it won't re-add the definitions... let me know your thoughts. If it I did it this way - I can put everything in a single commit. A change in settings.php, a change in lib.php, and a .sh script file to fix the language files.
= NO - see above - your single language file change is sufficient.
For info for the M3.9 version, this should have been gjb2048:MOODLE_39:
@John-Joubert / @badmechanic Sorry with the en_ar lang file, it is different and I didn't spot that, we all make mistakes, even me. With the changes I can see the differences with https://github.com/gjb2048/moodle-format_topcoll/pull/96/files etc.
Well - since you're saying the files are the same between the two versions -
I will make just a single branch and commit for the three lang files, plus lib.php, and settings.php. Is it OK if I base it off of Moodle 3.9 ? (I just downgraded the whole system to 3.9 a few minutes ago to go through this process once more).
So - one branch, one commit off of 3.9 OK?
OR - do you want me to do it off of 3.10 (master) ?
Either way - I'm good with what you want.
John
From: Gareth J Barnard @.> Sent: Tuesday, April 27, 2021 3:32 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
@John-Jouberthttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJohn-Joubert&data=04%7C01%7C%7Ce6f3fd2cf8614c6d3ca208d90991ae8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551343559405767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BUmDK1tTUmXZTMUBzUtnds9Ys%2FIyNJxDRDnqfbPMfCY%3D&reserved=0 / @badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7Ce6f3fd2cf8614c6d3ca208d90991ae8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551343559405767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=SLb%2FD9qmmj%2BRIXXt99BtQaD5wfhUjfUKqDHWQmJt24o%3D&reserved=0 Sorry with the en_ar lang file, it is different and I didn't spot that, we all make mistakes, even me. With the changes I can see the differences with https://github.com/gjb2048/moodle-format_topcoll/pull/96/fileshttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%2Ffiles&data=04%7C01%7C%7Ce6f3fd2cf8614c6d3ca208d90991ae8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551343559415762%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6aksg0ShInKln%2B8XN%2B4rkbAckIqzetwXR2ezXtotlgU%3D&reserved=0 etc.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23issuecomment-827702296&data=04%7C01%7C%7Ce6f3fd2cf8614c6d3ca208d90991ae8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551343559415762%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Q77GxorM0F%2FyaVgA0TXKbfnGPJz3vw4xfcc4ijmK2jE%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPNNN54L3PPUFGBARHTTK3KJFANCNFSM43UEVK7Q&data=04%7C01%7C%7Ce6f3fd2cf8614c6d3ca208d90991ae8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551343559425758%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3roUFOOhkcaX2Z7HCl4%2F6svp8QQcJj8HGtoM5qsbp94%3D&reserved=0.
Dear John,
Ok, for the third time of asking please.... Moodle 3.10 version with two lang files (as en_us and en are the same so you don't need en_us) based off of master.
G
Gareth - the language files ARE different (as I had come up with before). Look at this diff between Moodle 3.10 (master) and Moodle 3.9 branch for lang/en/format_topcoll.php file.
The first file is from origin/master (moodle 3.10) branch, the second file is from MOODLE_39 branch - both without my changes. So - the fact is - to do this, I'll need to do two commits. One for Moodle_39, and for master (moodle 3.10).
Unless you want me to submit ONE commit for a branch under Moodle 3.9, and you'll just hand add my two lines to the end of each of the three language files.
John
Please see detail below on topcoll/lang/en/format_topcoll.php for Moodle 3.10 (less than symbols) and Moodle 3.9 (greater than symbols).
Thoughts?
$string['resetlayout_help'] = 'Resets the layout element, structure, columns, toggle all, view single section, icon position, one section and shown section summary to the default values so it will be the same as a course the first time it is in the \'Collapsed Topics\' format.'; $string['resetalllayout_help'] = 'Resets the layout element, structure, columns, toggle all, view single section, icon position, one section and shown section summary to the default values for all courses so it will be the same as a course the first time it is in the \'Collapsed Topics \'format.'; 160,161c160,161 < $string['resetcolour_help'] = 'Resets the colours and opacities to follow the site default value.'; < $string['resetallcolour_help'] = 'Resets the colours and opacities to follow the site default value.';
$string['resetcolour_help'] = 'Resets the colours and opacities to the default values so it will be the same as a course the first time it is in the \'Collapsed Topics\' format.'; $string['resetallcolour_help'] = 'Resets the colours and opacities to the default values for all courses so it will be the same as a course the first time it is in the \'Collapsed Topics\' format.'; 179,180c179,180 < $string['resettogglealignment_help'] = 'Resets the toggle alignment to follow the site default value.'; < $string['resetalltogglealignment_help'] = 'Resets the toggle alignment to follow the site default value.';
$string['resettogglealignment_help'] = 'Resets the toggle alignment to the default values so it will be the same as a course the first time it is in the \'Collapsed Topics\' format.'; $string['resetalltogglealignment_help'] = 'Resets the toggle alignment to the default values for all courses so it will be the same as a course the first time it is in the \'Collapsed Topics\' format.'; 209,210c209,210 < $string['resettoggleiconset_help'] = 'Resets the toggle icon set and toggle all hover to follow the site default value.'; < $string['resetalltoggleiconset_help'] = 'Resets the toggle icon set and toggle all hover to follow the site default value.';
$string['resettoggleiconset_help'] = 'Resets the toggle icon set and toggle all hover to the default values so it will be the same as a course the first time it is in the \'Collapsed Topics\' format.'; $string['resetalltoggleiconset_help'] = 'Resets the toggle icon set and toggle all hover to the default values for all courses so it will be the same as a course the first time it is in the \'Collapsed Topics\' format.'; 377,378c377,378 < $string['resetdisplayinstructions_help'] = 'Resets the display instructions to follow the site default value.'; < $string['resetalldisplayinstructions_help'] = 'Resets the display instructions to follow the site default value.';
$string['resetdisplayinstructions_help'] = 'Resets the display instructions to the default value so it will be the same as a course the first time it is in the Collapsed Topics format.'; $string['resetalldisplayinstructions_help'] = 'Resets the display instructions to the default value for all courses so it will be the same as a course the first time it is in the Collapsed Topics format.';
From: Gareth J Barnard @.> Sent: Tuesday, April 27, 2021 3:32 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
@John-Jouberthttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJohn-Joubert&data=04%7C01%7C%7Ce6f3fd2cf8614c6d3ca208d90991ae8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551343559405767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BUmDK1tTUmXZTMUBzUtnds9Ys%2FIyNJxDRDnqfbPMfCY%3D&reserved=0 / @badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7Ce6f3fd2cf8614c6d3ca208d90991ae8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551343559405767%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=SLb%2FD9qmmj%2BRIXXt99BtQaD5wfhUjfUKqDHWQmJt24o%3D&reserved=0 Sorry with the en_ar lang file, it is different and I didn't spot that, we all make mistakes, even me. With the changes I can see the differences with https://github.com/gjb2048/moodle-format_topcoll/pull/96/fileshttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%2Ffiles&data=04%7C01%7C%7Ce6f3fd2cf8614c6d3ca208d90991ae8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551343559415762%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6aksg0ShInKln%2B8XN%2B4rkbAckIqzetwXR2ezXtotlgU%3D&reserved=0 etc.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23issuecomment-827702296&data=04%7C01%7C%7Ce6f3fd2cf8614c6d3ca208d90991ae8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551343559415762%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Q77GxorM0F%2FyaVgA0TXKbfnGPJz3vw4xfcc4ijmK2jE%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPNNN54L3PPUFGBARHTTK3KJFANCNFSM43UEVK7Q&data=04%7C01%7C%7Ce6f3fd2cf8614c6d3ca208d90991ae8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551343559425758%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3roUFOOhkcaX2Z7HCl4%2F6svp8QQcJj8HGtoM5qsbp94%3D&reserved=0.
OK - you got it. Just be aware, as I indicated in the prior message - that the SAME files are different between moodle 3.9 and moodle 3.10. That's what I was getting on about saying the files were different. They are different "between" versions. That's why I had two commits....
Sorry about the confusion, but your answers never seem to address this issue. I agree that lang/en and lang/en_us are the same in each version. But, from version to version, they are different. Hence - two branches - two commits.
John
From: Gareth J Barnard @.> Sent: Tuesday, April 27, 2021 9:40 PM To: gjb2048/moodle-format_topcoll @.> Cc: John Joubert @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
Dear John,
Ok, for the third time of asking please.... Moodle 3.10 version with two lang files (as en_us and en are the same so you don't need en_us) based off of master.
G
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23issuecomment-827949062&data=04%7C01%7C%7C824522be4b804b41019108d909c50e6d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551564215010368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=7TCfc%2FKG8cG2LFwmpuzR6u1NNNSBTlDuKNhEjQOcsK4%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATYQKMDL4JWHFEVXA63L5TLTK4VMHANCNFSM43UEVK7Q&data=04%7C01%7C%7C824522be4b804b41019108d909c50e6d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551564215020360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=cixZYOOBF2eWNIrNwTBFUBePW5nk%2FEVIbkvGYVRiqgU%3D&reserved=0.
Ok.... RIGHT....
CAN I MAKE IT ANY CLEARER FOR THE FOURTH TIME?
OK - thanks.
From: Gareth J Barnard @.> Sent: Tuesday, April 27, 2021 10:18 PM To: gjb2048/moodle-format_topcoll @.> Cc: John Joubert @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
Ok.... RIGHT....
CAN I MAKE IT ANY CLEARER FOR THE FOURTH TIME?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23issuecomment-827972501&data=04%7C01%7C%7C6f6c4a20183843458c3d08d909ca7036%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551587331568089%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BOfL%2BfDAZwezQyJ1Vg6M%2FkIHFp9uWqwNoYcFtmBvdyI%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATYQKMFTDWWKEXVMH57SSY3TK4Z4XANCNFSM43UEVK7Q&data=04%7C01%7C%7C6f6c4a20183843458c3d08d909ca7036%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551587331578078%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Uh%2Ff%2FD1opxo0UX04Fh67EHrpT9S0yQgmzyq5mk38mQM%3D&reserved=0.
Thanks @John-Joubert / @badmechanic - I've been thinking about this and it would be better if:
That's actually a great idea and wanted to get that working after you approved this one. I really thought about this quite a bit, and was thinking on what we'd return from the choice box. At the point where I couldn't find a multi-select (only single select) example code to work off of - I decide that the first attempt would be simpler if I just got it working first with an on/off switch. Afterwards, i fully intend to do a different one with a multi-select box.
The reason is that we're going live with Moodle 3.9 soon (not 3.10), and our distance learning dept loves your collapsed topics, but we are having issues with the four blocks when used with Ellucians ILP integration tool. Also, while the Distance Learning design team likes the four blocks on by default - many instructors would rather just turn on the ones they want, when they want.
Just so we can get this done (and get my boss off my back as I committed to attempting this), is it possible to do this in two stages? If I can get this done with an on/off switch to your liking, I promise I'll get it done with a multi-select. Also - I'd like to use as a source for the multi-select, the data structure you defined in config.php. So, the code would use the format array you created in config.php as the set of possible to choose from, and then we can have code operate from there. The reason is that down the line - more blocks could be added for simply adding another entry in the config.php file. I could see even down the line, at some point, we could make that more admin driven - maybe that string gets populated by more general selection? I don't know how to get that list of available blocks from the system at this time - but I could see that being a really nice add-on to collapsed topics, wherein when courses are created with collapsed topics, a whole range of blocks can be chosen to be auto-placed into the new course. That would be a nice feature for the application, I think.
Please consider my request to add this, in its original state, as an on/off switch. As being new to this, I'm a bit intimidated and would like to handle this in chunks of goodness at a time.
However, if you won't allow it - I understand, and I'll see if I can figure out the way to do it all in one go.
John
From: Gareth J Barnard @.> Sent: Wednesday, April 28, 2021 9:38 AM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
Thanks @John-Jouberthttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJohn-Joubert&data=04%7C01%7C%7C25d46952ede74c20461a08d90a2958fa%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551994960895397%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=pNB6%2FEgadHWBVYWha89j4u1L8byqNGC9XYkmMuAGWSo%3D&reserved=0 / @badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7C25d46952ede74c20461a08d90a2958fa%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551994960895397%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=rAl7NoY0RGyJJ6HvOrPAyAUM4fglYpiLo4f7TmoAC6c%3D&reserved=0 - I've been thinking about this and it would be better if:
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23issuecomment-828311003&data=04%7C01%7C%7C25d46952ede74c20461a08d90a2958fa%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551994960905392%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=amPyHXOsAdeyrNjUrHTWKhrBEs3Li%2F8zJIQ%2Fu3BpkGA%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPPG4QOHALAVFOC27WLTK7JQPANCNFSM43UEVK7Q&data=04%7C01%7C%7C25d46952ede74c20461a08d90a2958fa%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637551994960905392%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=7OxAtrPECJrBHEEfVEzuOqVcnunsXtbRZ8S8ETyMKVs%3D&reserved=0.
Abandoning this pull request - starting a new fresh one.
@John-Joubert / @badmechanic I'd rather have this done in one go and not have upgrade code for the setting. Also 'config.php' will go. So the default 'list of blocks' can be specified in the default of the multi-select admin setting.
@John-Joubert / @badmechanic You can develop over time in separate commits in one branch, then make a 'merge branch' where the commits are squashed which then becomes the pull request.
@badmechanic Umm, just twigged 'and get my boss off my back as I committed to attempting this' - so you're getting paid for this work?
I work at at a university. I wanted this for our moodle site. So, I just started working on it. I of course at times fooled with the code on the clock. But my job is a moodle admin. This is something I took up for the school.
From: Gareth J Barnard @.> Sent: Wednesday, April 28, 2021 1:05:20 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7C8bdb9b30f5c342eb9ba108d90a703030%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552299216466293%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=k8h0abZya3SNmsdGF4HHbvc2u8u8%2Be5SHkL7xA4XLEI%3D&reserved=0 Umm, just twigged 'and get my boss off my back as I committed to attempting this' - so you're getting paid for this work?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23issuecomment-828665630&data=04%7C01%7C%7C8bdb9b30f5c342eb9ba108d90a703030%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552299216476288%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=gKU8VA7YvrOKmMvQgcMVkEk48k%2BKg%2F8ObTgc9qxZ1t4%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPLLDPHECOBLEJRT5J3TLBE6BANCNFSM43UEVK7Q&data=04%7C01%7C%7C8bdb9b30f5c342eb9ba108d90a703030%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552299216476288%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=aZaWWixWe8F0hngBnEln0IiKh63OG7YMyTwZkdH7JPE%3D&reserved=0.
@badmechanic So is this something you're adding as a side hobby or something you've been tasked by your boss to implement?
I don't mind sharing more personal information about it - outside of the public comments. Let me know how we can exchange email directly, and I'll tell you about my efforts, where I work, etc. 🙂
From: Gareth J Barnard @.> Sent: Wednesday, April 28, 2021 7:12 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7Ca79c7a95d908411bb17a08d90a7987a8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552339341210034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=t3%2FnP%2FTvcuw7RPAAcaGtcTFbEFym%2FMhYIWmub7Pmx5o%3D&reserved=0 So is this something you're adding as a side hobby or something you've been tasked by your boss to implement?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23issuecomment-828711039&data=04%7C01%7C%7Ca79c7a95d908411bb17a08d90a7987a8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552339341210034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=g2PxgfrqhWI80N%2FGy75hTBfgh4sgS%2FfXsQjrt%2B3Fr1E%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPIH67MKARNZNA7N7QTTLBMYZANCNFSM43UEVK7Q&data=04%7C01%7C%7Ca79c7a95d908411bb17a08d90a7987a8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552339341220024%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2BDXsZez%2F1pvy%2FzHT95rYlX9sdfYYb5xovwELZYcxMkM%3D&reserved=0.
@badmechanic Please use my contact details from the format's readme.
Ok - thanks.
From: Gareth J Barnard @.> Sent: Wednesday, April 28, 2021 2:29:07 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7C1faefd2cb7df45c9b2ec08d90a7be4ba%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552349490276857%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=OcNPmiJusTW4%2FEHcFZeL7DZhTDL5BGlmiXB2sI%2Fg%2B9s%3D&reserved=0 Please use my contact details from the format's readme.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23issuecomment-828720946&data=04%7C01%7C%7C1faefd2cb7df45c9b2ec08d90a7be4ba%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552349490286851%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BIZye0GUOlAlorFTYwrtcTXbQxQfcQArv0YVqM9GZr8%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPMUMVGPMEY7O6YRBVLTLBOYHANCNFSM43UEVK7Q&data=04%7C01%7C%7C1faefd2cb7df45c9b2ec08d90a7be4ba%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552349490286851%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZiZkcv3jd5DcqWKudeLECEnpdl7AU%2B0OiP9qD8PQZtQ%3D&reserved=0.
I can't find your email. Near the bottom - The readme has a link to an aboutme page- with no email address. It has a link to some moodle pages that don't work.
Elsewhere I found something about contacting you for consulting - and there's a place to put in my own email address at https://gjbarnard.co.uk/contact/, so I'll just put my own email address in there and wait for your response.
John Contact – gjbarnard.co.ukhttps://gjbarnard.co.uk/contact/ Please enter your contact details and a short message below and I will try to answer your query as soon as possible. gjbarnard.co.uk
From: Gareth J Barnard @.> Sent: Wednesday, April 28, 2021 7:29 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7C1faefd2cb7df45c9b2ec08d90a7be4ba%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552349490276857%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=OcNPmiJusTW4%2FEHcFZeL7DZhTDL5BGlmiXB2sI%2Fg%2B9s%3D&reserved=0 Please use my contact details from the format's readme.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23issuecomment-828720946&data=04%7C01%7C%7C1faefd2cb7df45c9b2ec08d90a7be4ba%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552349490286851%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BIZye0GUOlAlorFTYwrtcTXbQxQfcQArv0YVqM9GZr8%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPMUMVGPMEY7O6YRBVLTLBOYHANCNFSM43UEVK7Q&data=04%7C01%7C%7C1faefd2cb7df45c9b2ec08d90a7be4ba%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552349490286851%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZiZkcv3jd5DcqWKudeLECEnpdl7AU%2B0OiP9qD8PQZtQ%3D&reserved=0.
@badmechanic Oh, thought you might use the Moodle profile link with the messaging there.
So - any idea what kind of config select tool would give me something like: choose blocks: my-first-block-choice: < > second block choice : < > third block choice : < > And then you can click in any or all of them?
Have you ever done that in php?
It's not radio buttons - because I don't want to only have one choice, I want to allow all, some, or none to be selected...
that would be maybe admin-setting-config
I looked at some code for pieces of moodle that use "admin-settings-configmultiselect - but in looking at other examples - it doesn't look right....
If you've done it already and know it off-hand - I could use a pointer in the right direction to read about.
I could do this with a Yes/No for each of the four blocks - but that seems a bit cheesy. The real answer is some sort of checkboxes in one single selector set. I don't want to make your nice format settings screen to look cheesy!
From: Gareth J Barnard @.> Sent: Wednesday, April 28, 2021 7:44 PM To: gjb2048/moodle-format_topcoll @.> Cc: John Joubert @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7Ce8f36099f1ad46cb71a408d90a7e15f2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552358907999939%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jz10ueludlOh45TGd8Rf8gHb9tx%2FaMSK%2FCaqNyou5zs%3D&reserved=0 Oh, thought you might use the Moodle profile link with the messaging there.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23issuecomment-828729703&data=04%7C01%7C%7Ce8f36099f1ad46cb71a408d90a7e15f2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552358908009936%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=a8%2Fo%2B20dmGtLp%2Bf6LvCybuzTAKNkxDsByt4cjmC7SlE%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATYQKMARVVDO4KTK4JYP7RLTLBQTDANCNFSM43UEVK7Q&data=04%7C01%7C%7Ce8f36099f1ad46cb71a408d90a7e15f2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552358908009936%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=q5lmbANciHeOCnPhazY1hz7P4qIA6dQd1jKJVcjuguk%3D&reserved=0.
@John-Joubert Oh drat, drat and double drat, I meant 'admin_setting_configmultiselect' and I have done it in PHP before (old code now as functionality replaced) -> https://github.com/gjb2048/moodle-theme_foundation/blob/MOODLE_37/classes/module/features_module.php#L314-L324. Please ignore how I add the setting - use the way you're already doing so.
Thus with 'admin_setting_configmultiselect' you can select none, one or more (using the Ctrl key) and then get an array back as the value, I think or could be a comma separated list -> https://github.com/gjb2048/moodle-theme_foundation/blob/MOODLE_37/classes/output/core_renderer.php#L70. Long time ago!
Awesome! Thanks for the direction pointer!
🙂
From: Gareth J Barnard @.> Sent: Thursday, April 29, 2021 12:14 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Blocks optiona (#96)
@John-Jouberthttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJohn-Joubert&data=04%7C01%7C%7C43f9fbae46c84f6ea43408d90b085768%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552952710745489%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=MeqKOvbn2hD1%2FUdqTBLW%2BMjZ1JzIgnEXV8Fd%2BAvmULA%3D&reserved=0 Oh drat, drat and double drat, I meant 'admin_setting_configmultiselect' and I have done it in PHP before (old code now as functionality replaced) -> https://github.com/gjb2048/moodle-theme_foundation/blob/MOODLE_37/classes/module/features_module.php#L314-L324https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-theme_foundation%2Fblob%2FMOODLE_37%2Fclasses%2Fmodule%2Ffeatures_module.php%23L314-L324&data=04%7C01%7C%7C43f9fbae46c84f6ea43408d90b085768%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552952710745489%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=84qYmPFH%2F48i1vS32WafGrGdSPrYR97qucLubwJYcOs%3D&reserved=0. Please ignore how I add the setting - use the way you're already doing so.
Thus with 'admin_setting_configmultiselect' you can select none, one or more (using the Ctrl key) and then get an array back as the value.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F96%23issuecomment-829188389&data=04%7C01%7C%7C43f9fbae46c84f6ea43408d90b085768%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552952710755488%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=R5DEvPyBSQnglfTKfg%2FktF8Ta2rLFS%2BRPrZNCTb3WAY%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPJ45EDGZIGNG52XKCDTLFESLANCNFSM43UEVK7Q&data=04%7C01%7C%7C43f9fbae46c84f6ea43408d90b085768%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637552952710755488%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=b2eqHalM%2BtF85NCJuXm%2BPiMM51l5r4uPtnp%2F4pb0azg%3D&reserved=0.
Gareth.
-- Note: New text - I fixed the Change_blocks_optional.md file to read Moodle 3.10 not Moodle 3.9 So this version is ready to go.
-- Notes below are from before - leaving here to just leave a trail.
Here is the same update as before for the 3.10 version. The code is the same. I compared the lib.php and settings.php between the plugins 3.9 version and plugins 3.10 version, And I saw they were the same, so I simply added my code in the two files in the same exact place as the 3.9 version. For the language files - I took the 3.10 versions and added my two string definitions to the bottom of the 3.10 language files.
I noticed that the comment for line 51 on the settings.php is wrong. I've corrected this in the Moodle 3.10 version. I also mistakenly used the same "Change_blocks_optional.md" file for this version. The only thing in it that has to change is that I mention Moodle 3.9 instead off Moodle 3.10.
I'll fix the above two things (the Change_blocks_optional.md file in this version, and the settings.php version in the Moodle 3.9 version). Sorry about that - I was REALLY wanting to leave very clean direct trail for you.
In this case - each one will just a single update - you'll see them on the commits.
Thanks,
John Joubert