gjbarnard / moodle-format_topcoll

Collapsed Topics course format for Moodle.
http://docs.moodle.org/en/Collapsed_Topics_course_format
GNU General Public License v3.0
35 stars 60 forks source link

Block options and block location setting #98

Closed John-Joubert closed 3 years ago

John-Joubert commented 3 years ago

Gareth - these options are working. You can now choose one, none, or all of the blocks for display. You can now choose to place the blocks on the left or right side. -- John

badmechanic commented 3 years ago

Oh! So I did get it !

Please have a look at what I sent.

LOL - that travis filter looks worse than lint!

John


From: John Joubert @.> Sent: Friday, April 30, 2021 5:00 AM To: gjb2048/moodle-format_topcoll @.> Cc: Subscribed @.***> Subject: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

Gareth - these options are working. You can now choose one, none, or all of the blocks for display. You can now choose to place the blocks on the left or right side. -- John


You can view, comment on, or merge this pull request online at:

https://github.com/gjb2048/moodle-format_topcoll/pull/98https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98&data=04%7C01%7C%7Ce80637459a884a23ceea08d90b94da90%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637553556213940669%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=A%2BsiQsTJ5ikSRDmN2bgka0vfdomjWEhw7Kd%2BDUbAqEE%3D&reserved=0

Commit Summary

File Changes

Patch Links:

— 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%2F98&data=04%7C01%7C%7Ce80637459a884a23ceea08d90b94da90%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637553556213980654%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2BO8V%2BKgjEWb3UwjJGRdnaXz1Nr2xQ1SMuUA20oW6lZc%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPNXYWFRVEIG5T2T7X3TLI2ODANCNFSM433LHROA&data=04%7C01%7C%7Ce80637459a884a23ceea08d90b94da90%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637553556213980654%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=mt8TYv3%2FEqqVEzU%2BvCt70Wv1SbRHGiZsuocXOvonfwE%3D&reserved=0.

gjb2048 commented 3 years ago

@John-Joubert Thanks, will look as soon as I can.

John-Joubert commented 3 years ago

I like it - one return point from the routine, instead of two.

I'll add it.


From: Gareth J Barnard @.> Sent: Friday, April 30, 2021 6:24 PM To: gjb2048/moodle-format_topcoll @.> Cc: John Joubert @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@gjb2048 commented on this pull request.


In lib.phphttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98%23discussion_r624078387&data=04%7C01%7C%7C98c86c17868449bbef1c08d90c0533ed%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554038741352368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kNYJqF32n68v5yLoEYpP%2BwsdqEZJ8Zi8hBYcj6Q36ek%3D&reserved=0:

  • / Figure out which side it goes on, and put it there /
  • $def_blocks_loc = get_config('format_topcoll','defaultdisplayblocksloc');
  • if($def_blocks_loc == 1) / Right Side /
  • {
  • return array(
  • BLOCK_POS_LEFT => array(),
  • BLOCK_POS_RIGHT => $blocklist
  • );
  • }
  • else / Left Side /
  • {
  • return array(
  • BLOCK_POS_LEFT => $blocklist,
  • BLOCK_POS_RIGHT => array()
  • );
  • } }

How about:

if (get_config('format_topcoll','defaultdisplayblocksloc') == 1) { $bpl = array(); $bpr = $blocklist; } else { $bpl = $blocklist; $bpr = array(); }

return array( BLOCK_POS_LEFT => $bpl, BLOCK_POS_RIGHT => $bpr );

— 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%2F98%23pullrequestreview-649482437&data=04%7C01%7C%7C98c86c17868449bbef1c08d90c0533ed%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554038741352368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=yA70Yl28xPRjHx%2Bcnmrz%2FPvS140VjXgaCC8SfN3B3cs%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATYQKMAMNCE7ORUNCDLHY5LTLLYWDANCNFSM433LHROA&data=04%7C01%7C%7C98c86c17868449bbef1c08d90c0533ed%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554038741362361%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Wtu11%2Ba5qtr44xs8IJ%2BB8W8KhAhtc84%2BADRev3O1kIY%3D&reserved=0.

badmechanic commented 3 years ago

The problem here is that the returned value is a single string, not an array. The value returned for the first block, and the last block would be: "0,3" - single string that isn't very useful without taking apart the string. Thus, the explode routine. I've spent some time with some searching to see if there is a way to automatically refer to a csv string as an array - and I've not found anything. It seems that explode is the common method.

John


From: Gareth J Barnard @.> Sent: Friday, April 30, 2021 6:16 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Comment @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@gjb2048 commented on this pull request.


In lib.phphttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98%23discussion_r624073996&data=04%7C01%7C%7Cf679e3a4970944e8254008d90c04257f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554034205179396%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Fs6NpzdEaoykeFHwyTzduNIxvFlMQVkscAMZqQiA9A8%3D&reserved=0:

  */

public function get_default_blocks() {

  • return array(
  • BLOCK_POS_LEFT => array(),
  • BLOCK_POS_RIGHT => array('search_forums', 'news_items', 'calendar_upcoming', 'recent_activity')
  • );
  • $blocklist=array();
  • $use_def_blocks = explode (",",get_config('format_topcoll', 'defaultdisplayblocks'));
  • foreach($use_def_blocks as $blockindex)

This won't be needed as may just need an array_keys thing on the 'explode' need to debug when you change the setting.

— You are receiving this because you commented. 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%2F98%23pullrequestreview-649470652&data=04%7C01%7C%7Cf679e3a4970944e8254008d90c04257f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554034205179396%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=DQ%2Ba8%2FmNXKfMGEvLMQnmJ1SCEVmZ%2F87Bt5wNs3HtaXg%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPPSIQBGNIJWVHIP5XDTLLXZXANCNFSM433LHROA&data=04%7C01%7C%7Cf679e3a4970944e8254008d90c04257f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554034205189393%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=TEq%2BWCCiXwZUHRblQpnhoOUsjSJHBsaSryY6bsYeE0g%3D&reserved=0.

badmechanic commented 3 years ago

OK Fixed


From: Gareth J Barnard @.> Sent: Friday, April 30, 2021 6:15 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Comment @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@gjb2048 commented on this pull request.


In settings.phphttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98%23discussion_r624073416&data=04%7C01%7C%7C5291438ce6c1428b885d08d90c03fda0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554033534519794%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ns4qIJpBlq25f%2Fr%2BR8wveXyNdFPEYwc9hLH6bPkHOxA%3D&reserved=0:

@@ -48,6 +48,26 @@ ); $settings->add(new admin_setting_configselect($name, $title, $description, $default, $choices));

Please use single inline comments for one line '//' or only one block comment '/ .... /'

— You are receiving this because you commented. 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%2F98%23pullrequestreview-649469948&data=04%7C01%7C%7C5291438ce6c1428b885d08d90c03fda0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554033534519794%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=oCXLGuCWkkZEYvhtSCXFjEYW%2FbUjFOUPbfz2r%2F%2FNsCY%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPMKDFCHPIJJEHPEHIDTLLXVRANCNFSM433LHROA&data=04%7C01%7C%7C5291438ce6c1428b885d08d90c03fda0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554033534529794%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vuJh%2BFUuCOHaLGzOJpJ%2BJ44NLRKdesEaogxSOINe5RY%3D&reserved=0.

badmechanic commented 3 years ago

So are you suggesting a shift from the standard list of four blocks that you have used previously in your code, to a larger list of all available blocks?

John


From: Gareth J Barnard @.> Sent: Friday, April 30, 2021 6:14 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Comment @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@gjb2048 commented on this pull request.


In settings.phphttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98%23discussion_r624072811&data=04%7C01%7C%7Cc54ce316a7784e1b4ef508d90c03d4c1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554032849139585%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BGRRUEEe5218l%2BI6TZjqTPECJQMFBwcT6k1o9mdDnt0%3D&reserved=0:

@@ -48,6 +48,26 @@ ); $settings->add(new admin_setting_configselect($name, $title, $description, $default, $choices));

Also this list needs to be generated from the list of blocks installed. As the above are 'core' blocks then should not be an issue with the default.

— You are receiving this because you commented. 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%2F98%23discussion_r624072811&data=04%7C01%7C%7Cc54ce316a7784e1b4ef508d90c03d4c1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554032849139585%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BGRRUEEe5218l%2BI6TZjqTPECJQMFBwcT6k1o9mdDnt0%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPOGK3RSFV2SJPSGQNLTLLXRJANCNFSM433LHROA&data=04%7C01%7C%7Cc54ce316a7784e1b4ef508d90c03d4c1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554032849149576%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Hb4SEm5xOt3nHmWjftMfH3HWDxkM6K1O2TtNUpussmk%3D&reserved=0.

badmechanic commented 3 years ago

Done


From: Gareth J Barnard @.> Sent: Friday, April 30, 2021 6:13 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Comment @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@gjb2048 commented on this pull request.


In settings.phphttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98%23discussion_r624072258&data=04%7C01%7C%7Cad2fd7157e164fd972c208d90c03b007%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554032234229287%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=flilzzR9uWqeXFz0smle4ixrj1Ajm3mZ7X1CbT9ulJk%3D&reserved=0:

@@ -48,6 +48,26 @@ ); $settings->add(new admin_setting_configselect($name, $title, $description, $default, $choices));

Not quite! Use an associative array -> array( 'search_forums' => get_string(...), 'news_items' => get_string(...), 'calendar_upcoming' => get_string(...), 'recent_activity' => get_string(...) )

then need to work out how to set the default.

— You are receiving this because you commented. 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%2F98%23pullrequestreview-649468434&data=04%7C01%7C%7Cad2fd7157e164fd972c208d90c03b007%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554032234229287%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Y4Y2ERQ%2ByzG8G8Jf2BW1WKjgTPb7bvgH49nmHq8SuOE%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPILXB6I2E374LDVQ6DTLLXNNANCNFSM433LHROA&data=04%7C01%7C%7Cad2fd7157e164fd972c208d90c03b007%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637554032234239286%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=mwb%2BTjsp8bM5YyaIR5aV53y7iD%2BCg50l73TaieOAc2A%3D&reserved=0.

gjb2048 commented 3 years ago

@badmechanic Ok, see:

badmechanic commented 3 years ago

OK - I understand what you're saying about the blocks using that kind of array, I'm hoping that the multichoice can handle that. I suppose that since you're telling me this, that there is a very strong chance that it does. LOL.

🙂


From: Gareth J Barnard @.> Sent: Wednesday, May 5, 2021 3:21 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7Ce865c5691e7347b970da08d90fd970fb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558248837230779%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NyKwaQceDJzCM1M2WOO8cJC2U%2FzyiB6xYpUqI2o21Po%3D&reserved=0 Ok, see:

— 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%2F98%23issuecomment-832776364&data=04%7C01%7C%7Ce865c5691e7347b970da08d90fd970fb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558248837240772%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4Xm391jpQCKDv7MgHIrxIe1tGQk%2B6FTHRd0JIKuqQj0%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPNHJPDF5Y4S2R4PMYTTMFO7DANCNFSM433LHROA&data=04%7C01%7C%7Ce865c5691e7347b970da08d90fd970fb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558248837250764%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5fW4aLiuROXqccaYHpiRalslWkndh6vnjzhqiT0KKm4%3D&reserved=0.

John-Joubert commented 3 years ago

So, I don't have the name change in yet - but this is what lib.php looks like now.

As you can see I tightend up the foreach block. I also have all ohter changes you asked for - except for changing the way the multiselector works in settings.php. I'm going to start on that now. Then I'll come back here and fix the code below to use the new multiselect from settings.php.

public function get_default_blocks() {

    // Build the array of strings of the list of blocks to be populated
    $use_def_blocks = explode (",",get_config('format_topcoll', 'defaultdisplayblocks'));
    $blocklist_arr=array(0=>"search_forums", 1=>"news_items", 2=>"calendar_upcoming", 3=>"recent_activity");
    $blocklist=array();
    foreach($use_def_blocks as $blockindex) {
        array_push($blocklist,$blocklist_arr[$blockindex]);
    }

    // Assign the location side for the blocks. defaultdisplayblocksloc: 1=right, 2=left
    if (get_config('format_topcoll','defaultdisplayblocksloc') == 1) {
        $bpr = $blocklist;
        $bpl = array();
    } else {
        $bpr = array();
        $bpl = $blocklist;
    }

    // return our block list on the correct side
    return array(
        BLOCK_POS_RIGHT => $bpr,
        BLOCK_POS_LEFT  => $bpl
    );
}

From: badmechanic @.> Sent: Wednesday, May 5, 2021 9:17 PM To: gjb2048/moodle-format_topcoll @.> Cc: John Joubert @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

OK - I understand what you're saying about the blocks using that kind of array, I'm hoping that the multichoice can handle that. I suppose that since you're telling me this, that there is a very strong chance that it does. LOL.

🙂


From: Gareth J Barnard @.> Sent: Wednesday, May 5, 2021 3:21 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7Ce865c5691e7347b970da08d90fd970fb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558248837230779%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NyKwaQceDJzCM1M2WOO8cJC2U%2FzyiB6xYpUqI2o21Po%3D&reserved=0 Ok, see:

— 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%2F98%23issuecomment-832776364&data=04%7C01%7C%7Ce865c5691e7347b970da08d90fd970fb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558248837240772%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4Xm391jpQCKDv7MgHIrxIe1tGQk%2B6FTHRd0JIKuqQj0%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPNHJPDF5Y4S2R4PMYTTMFO7DANCNFSM433LHROA&data=04%7C01%7C%7Ce865c5691e7347b970da08d90fd970fb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558248837250764%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5fW4aLiuROXqccaYHpiRalslWkndh6vnjzhqiT0KKm4%3D&reserved=0.

— 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%2F98%23issuecomment-833012998&data=04%7C01%7C%7C5ae7e0f4e84744077f0408d9100b1fc8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558462221319498%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=EW8%2B9tssLy7xLaBuWg1AnpryFEwyKVcSWDxAHRT0Mlw%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATYQKMG63R3R53XS5664AQDTMGYUZANCNFSM433LHROA&data=04%7C01%7C%7C5ae7e0f4e84744077f0408d9100b1fc8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558462221329494%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=g59fXNPO2qnpi0NVC3%2B6ZaXNwmaEIQJjDqyoCLRBLHQ%3D&reserved=0.

John-Joubert commented 3 years ago

OK - I think it's all working as you want it to. I'm hoping you an see this latest commit and push to noblocks_option. Message of the commit is "New fixes to noblocks_option branch as per gjb2048". Thanks for all kind help. Let me know if I need to change anything.

badmechanic commented 3 years ago

Allright - I'm sending in a commit. Branch name is "noblocks_options" Commit title is "it's all working now" (terrible name for a commit".tell

I don't see anything in the tool to say to "pull" anything - I guess I'm still using the one from before. Not too sure.

Let me know if you see my new code to review. I'm hoping I did it correctly. - If I was supposed to push a whole new branch off of "noblocks_optoins" I could have sent that instead - as I had created a branch. And then later merged those changes into noblocks_options - so i could just send you a single commit. Let me know if this was the wrong method.

Here's the new code in settings.php:

/* Toggle display block choices */
$name = 'format_topcoll/defaultdisplayblocks';
$title = get_string('defaultdisplayblocks', 'format_topcoll');
$description = get_string('defaultdisplayblocks_desc', 'format_topcoll');
$default = array('search_forums','news_items','calendar_upcoming','recent_activity');
$choices = array('search_forums'=>'Search forums','news_items'=>'Latest announcements',
                 'calendar_upcoming'=>'Upcoming events','recent_activity'=>'Recent activity');
$settings->add(new admin_setting_configmultiselect($name, $title, $description, $default, $choices));

/*  Toggle blocks location. 1 = right, 2 = left */
$name = 'format_topcoll/defaultdisplayblocksloc';
$title = get_string('defaultdisplayblocksloc', 'format_topcoll');
$description = get_string('defaultdisplayblocksloc_desc', 'format_topcoll');
$default = 1;
$choices = array(
    1 => new lang_string('right', 'format_topcoll'),   // Right.
    2 => new lang_string('left', 'format_topcoll'),    // Left.
);
$settings->add(new admin_setting_configselect($name, $title, $description, $default, $choices));

Here's the new code in lib.php.

public function get_default_blocks() {

    // Assign the location side for the blocks. defaultdisplayblocksloc: 1=right, 2=left
    // Then put the string list of blocks on the side location
    $blocklist=explode(',',get_config('format_topcoll','defaultdisplayblocks'));
    if (get_config('format_topcoll','defaultdisplayblocksloc') == 1) {
        $bpr = $blocklist;
        $bpl = array();
    } else {
        $bpr = array();
        $bpl = $blocklist;
    }

    // return our block list on the correct side
    return array(
        BLOCK_POS_RIGHT => $bpr,
        BLOCK_POS_LEFT  => $bpl
    );
}

What's great is that you were absolutely correct in your request (but you knew that already). It made a much tighter, and simpler piece of code.

Thank you!


From: John Joubert @.> Sent: Thursday, May 6, 2021 1:35 AM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

So, I don't have the name change in yet - but this is what lib.php looks like now.

As you can see I tightend up the foreach block. I also have all ohter changes you asked for - except for changing the way the multiselector works in settings.php. I'm going to start on that now. Then I'll come back here and fix the code below to use the new multiselect from settings.php.

public function get_default_blocks() {

// Build the array of strings of the list of blocks to be populated $use_def_blocks = explode (",",get_config('format_topcoll', 'defaultdisplayblocks')); $blocklist_arr=array(0=>"search_forums", 1=>"news_items", 2=>"calendar_upcoming", 3=>"recent_activity"); $blocklist=array(); foreach($use_def_blocks as $blockindex) { array_push($blocklist,$blocklist_arr[$blockindex]); }

// Assign the location side for the blocks. defaultdisplayblocksloc: 1=right, 2=left if (get_config('format_topcoll','defaultdisplayblocksloc') == 1) { $bpr = $blocklist; $bpl = array(); } else { $bpr = array(); $bpl = $blocklist; }

// return our block list on the correct side return array( BLOCK_POS_RIGHT => $bpr, BLOCK_POS_LEFT => $bpl ); }


From: badmechanic @.> Sent: Wednesday, May 5, 2021 9:17 PM To: gjb2048/moodle-format_topcoll @.> Cc: John Joubert @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

OK - I understand what you're saying about the blocks using that kind of array, I'm hoping that the multichoice can handle that. I suppose that since you're telling me this, that there is a very strong chance that it does. LOL.

🙂


From: Gareth J Barnard @.> Sent: Wednesday, May 5, 2021 3:21 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7Ce865c5691e7347b970da08d90fd970fb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558248837230779%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NyKwaQceDJzCM1M2WOO8cJC2U%2FzyiB6xYpUqI2o21Po%3D&reserved=0 Ok, see:

— 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%2F98%23issuecomment-832776364&data=04%7C01%7C%7Ce865c5691e7347b970da08d90fd970fb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558248837240772%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4Xm391jpQCKDv7MgHIrxIe1tGQk%2B6FTHRd0JIKuqQj0%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPNHJPDF5Y4S2R4PMYTTMFO7DANCNFSM433LHROA&data=04%7C01%7C%7Ce865c5691e7347b970da08d90fd970fb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558248837250764%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5fW4aLiuROXqccaYHpiRalslWkndh6vnjzhqiT0KKm4%3D&reserved=0.

— 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%2F98%23issuecomment-833012998&data=04%7C01%7C%7C5ae7e0f4e84744077f0408d9100b1fc8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558462221319498%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=EW8%2B9tssLy7xLaBuWg1AnpryFEwyKVcSWDxAHRT0Mlw%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATYQKMG63R3R53XS5664AQDTMGYUZANCNFSM433LHROA&data=04%7C01%7C%7C5ae7e0f4e84744077f0408d9100b1fc8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558462221329494%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=g59fXNPO2qnpi0NVC3%2B6ZaXNwmaEIQJjDqyoCLRBLHQ%3D&reserved=0.

— 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%2F98%23issuecomment-833160708&data=04%7C01%7C%7Ca14c74e0a6cc4769533508d9102f2f80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558617105072325%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=gePsZl97FDBQ4LqXJSD7sac5BxuH9rsagTsXx3ifk28%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPOPBT56MFQU3FNXTADTMHW4ZANCNFSM433LHROA&data=04%7C01%7C%7Ca14c74e0a6cc4769533508d9102f2f80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637558617105072325%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=czJUGdYHqyM3O31stQl%2BW8ar9dAeTEuzyYIrpZ261aQ%3D&reserved=0.

gjb2048 commented 3 years ago

Please see https://github.com/gjb2048/moodle-format_topcoll/pull/98/files#r627627923

gjb2048 commented 3 years ago

Errors need fixing too: https://travis-ci.org/github/gjb2048/moodle-format_topcoll/jobs/769629900

gjb2048 commented 3 years ago

Also.... if any of the defaults are not in the choices, then they should be removed from the defaults.

badmechanic commented 3 years ago

Really? I'm surprised - because it hasn't affected the run time. I thought that defaults were only used when nothing else was ever set before. Once they were set, then the next time you look at the selector, it's information always reflects stored information - not default information. Don't you think that's why information in default is separate from stored?

I mean, it's easy enough to change - but it seems to be redundant, or actually - not even needed once a system has stored values from the settings. At that point - the default array could be empty, as it won't be used.

Or - are what you going for is cosmetics? You'd like to see the list of chosen blocks on the bottom under the box listed as "defaults"? I'm trying to think how this will work the first time we call it. Will the retrieve of that value from the settings.php even work before that data is stored? Is there a return value I can count on to know it's not been called, and then set the defaults to all of them? I'll have to give this some thought.


From: Gareth J Barnard @.> Sent: Thursday, May 6, 2021 8:50 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

Also.... if any of the defaults are not in the choices, then they should be removed from the defaults.

— 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%2F98%23issuecomment-833855833&data=04%7C01%7C%7C48cd105497044987761508d910d090b6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559310224484780%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=09%2F3ouSurm0yrhX%2Fk5nR4CG5MAaJktwv4oH9CRdMWjQ%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPPFJ5SLNZ7Y7FHX2Q3TML6I3ANCNFSM433LHROA&data=04%7C01%7C%7C48cd105497044987761508d910d090b6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559310224494777%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=awKDPUc4tgLfGyvGcAM2GSSHbtvD3LWarlyNiH%2BLy7c%3D&reserved=0.

John-Joubert commented 3 years ago

Ah OK- I can do that. 🙂


From: Gareth J Barnard @.> Sent: Thursday, May 6, 2021 5:29 PM To: gjb2048/moodle-format_topcoll @.> Cc: John Joubert @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@gjb2048 commented on this pull request.


In settings.phphttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98%23discussion_r627627923&data=04%7C01%7C%7C46e7dfc5e7024986c0b808d910b47e72%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559189659218426%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=LV84a%2Fg1zzcTXyyqjRDCDgGnfcvVliIXwkPmhXP4QTY%3D&reserved=0:

@@ -48,6 +48,26 @@ ); $settings->add(new admin_setting_configselect($name, $title, $description, $default, $choices));

This needs to be a list of installed blocks from the block manager with 'get_strings' on the other end, i.e get_string('pluginname', 'block_recent_activity')

— 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%2F98%23pullrequestreview-653714972&data=04%7C01%7C%7C46e7dfc5e7024986c0b808d910b47e72%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559189659218426%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=N6UbDBhhAZSDNaREAiWmRUWSKC7FeE6nVag%2B4xXNijg%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATYQKMH2REGXH4WMDFSBUJTTMLGXJANCNFSM433LHROA&data=04%7C01%7C%7C46e7dfc5e7024986c0b808d910b47e72%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559189659228427%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=tThJuHGd4Z6Q2U3KBMg7Rx319qLSlzPUVag3BJJNeuo%3D&reserved=0.

John-Joubert commented 3 years ago

Good pointer - thank you!


From: Gareth J Barnard @.> Sent: Thursday, May 6, 2021 5:31 PM To: gjb2048/moodle-format_topcoll @.> Cc: John Joubert @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

Please see https://github.com/gjb2048/moodle-format_topcoll/pull/98/files#r627627923https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98%2Ffiles%23r627627923&data=04%7C01%7C%7Cbe754c994bed4c53ca6908d910b4c249%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559190795844640%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=OcOfD%2FUW4LZwd5LC%2BnQ5UgIHw8lXxm%2BpnVR0lBm8BQY%3D&reserved=0

— 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%2F98%23issuecomment-833708658&data=04%7C01%7C%7Cbe754c994bed4c53ca6908d910b4c249%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559190795854638%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=AHOLm7iMqYeSOIORbCFG0Vab1iLz%2FW%2FjmvBjyanTWCQ%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATYQKMCAAMP6LVDEILN545TTMLG6NANCNFSM433LHROA&data=04%7C01%7C%7Cbe754c994bed4c53ca6908d910b4c249%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559190795854638%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=k%2BQuTgvl%2B%2BEtm1nMvscF3myAndI77ksCymfuIX1RH90%3D&reserved=0.

gjb2048 commented 3 years ago

@badmechanic I'm not really a 'cosmetics' person in this context. So... take the possible scenario(s) that CT is installed where one of the default blocks has been removed / deactivated, then as no value is set then this is a bad state to set the default as one of the blocks that can't be used.

badmechanic commented 3 years ago

Oh yes! I see that. Gotcha.


From: Gareth J Barnard @.> Sent: Thursday, May 6, 2021 4:17:22 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7Cee8734a9289e4458265808d910d456eb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559326431589289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=A14grrU1N87flsrmLXWqsupT1%2FVZgdn99%2F6f6no9XPM%3D&reserved=0 I'm not really a 'cosmetics' person in this context. So... take the possible scenario(s) that CT is installed where one of the default blocks has been removed / deactivated, then as no value is set then this is a bad state to set the default as one of the blocks that can't be used.

— 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%2F98%23issuecomment-833873235&data=04%7C01%7C%7Cee8734a9289e4458265808d910d456eb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559326431589289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=xm0Nso9ZKZdzY61%2BeCQ8Yufqs7DwTEZiLzzgQBWJ9gE%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPN5Z6RSPBJJ2QGUGPTTMMBOFANCNFSM433LHROA&data=04%7C01%7C%7Cee8734a9289e4458265808d910d456eb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559326431599287%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WkATw7q13u6aEO9exiS0fmTpu4PP83SgRyw9QoZFfSg%3D&reserved=0.

John-Joubert commented 3 years ago

OK Done. Travis is tricky. I think lint is easier!


From: Gareth J Barnard @.> Sent: Thursday, May 6, 2021 5:32 PM To: gjb2048/moodle-format_topcoll @.> Cc: John Joubert @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

Errors need fixing too: https://travis-ci.org/github/gjb2048/moodle-format_topcoll/jobs/769629900https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftravis-ci.org%2Fgithub%2Fgjb2048%2Fmoodle-format_topcoll%2Fjobs%2F769629900&data=04%7C01%7C%7C95ccd1424068475d279708d910b4f55a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559191651725626%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=7Z3i85U7OeVvbNMRv%2Fer%2BJr9VjpahJncEujxGn1yYPg%3D&reserved=0

— 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%2F98%23issuecomment-833709733&data=04%7C01%7C%7C95ccd1424068475d279708d910b4f55a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559191651735626%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Ojy%2Bq1G7WJUxtEH%2Bohw7TwOIjish2SrI%2FgEs8g30jNA%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATYQKMFUL3FOMECQMBW7SOLTMLHDZANCNFSM433LHROA&data=04%7C01%7C%7C95ccd1424068475d279708d910b4f55a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559191651735626%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=uXDV%2BcHXlpZpYHgAYFzqzOkeRfGXyTrBz0haedxJufg%3D&reserved=0.

John-Joubert commented 3 years ago

OK - so this is what this returns:

die(print_r(core_plugin_manager::instance()->get_enabled_plugins('block')));

print_r looks like this: Array ( [activity_modules] => activity_modules [activity_results] => activity_results [admin_bookmarks] => admin_bookmarks [badges] => badges [blog_menu] => blog_menu [blog_recent] => blog_recent [blog_tags] => blog_tags [calendar_month] => calendar_month [calendar_upcoming] => calendar_upcoming [comments] => comments [completionstatus] => completionstatus [course_list] => course_list [course_summary] => course_summary [feedback] => feedback [globalsearch] => globalsearch [glossary_random] => glossary_random [html] => html [login] => login [lp] => lp [mentees] => mentees [mnet_hosts] => mnet_hosts [myoverview] => myoverview [myprofile] => myprofile [navigation] => navigation [news_items] => news_items [online_users] => online_users [private_files] => private_files [recent_activity] => recent_activity [recentlyaccessedcourses] => recentlyaccessedcourses [recentlyaccesseditems] => recentlyaccesseditems [rss_client] => rss_client [search_forums] => search_forums [section_links] => section_links [selfcompletion] => selfcompletion [settings] => settings [site_main_menu] => site_main_menu [social_activities] => social_activities [starredcourses] => starredcourses [tag_flickr] => tag_flickr [tags] => tags [timeline] => timeline ) 1

So - this is a lot of blocks. Are you saying that you want to show all of these, and then if any of your 4 favorites are in there, mark them as defaults?

OR, are you wanting me to check and make sure that your 4 favorites are in the list above? And just show, of the 4, any of those that are also in the above list, thereby making sure that your 4 are in the list of enabled blocks? And, ditto for defaults?

John


From: badmechanic @.> Sent: Thursday, May 6, 2021 9:31 PM To: gjb2048/moodle-format_topcoll @.> Cc: John Joubert @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

Oh yes! I see that. Gotcha.


From: Gareth J Barnard @.> Sent: Thursday, May 6, 2021 4:17:22 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7Cee8734a9289e4458265808d910d456eb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559326431589289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=A14grrU1N87flsrmLXWqsupT1%2FVZgdn99%2F6f6no9XPM%3D&reserved=0 I'm not really a 'cosmetics' person in this context. So... take the possible scenario(s) that CT is installed where one of the default blocks has been removed / deactivated, then as no value is set then this is a bad state to set the default as one of the blocks that can't be used.

— 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%2F98%23issuecomment-833873235&data=04%7C01%7C%7Cee8734a9289e4458265808d910d456eb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559326431589289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=xm0Nso9ZKZdzY61%2BeCQ8Yufqs7DwTEZiLzzgQBWJ9gE%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPN5Z6RSPBJJ2QGUGPTTMMBOFANCNFSM433LHROA&data=04%7C01%7C%7Cee8734a9289e4458265808d910d456eb%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559326431599287%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WkATw7q13u6aEO9exiS0fmTpu4PP83SgRyw9QoZFfSg%3D&reserved=0.

— 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%2F98%23issuecomment-833881727&data=04%7C01%7C%7C9007d846be9149400bcf08d910d659f4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559335074082171%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=w7q9M8iPHCx9fkuTwiJQUeTLsElxxNN6DR7LYBjHNIA%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATYQKMAYIMHM235FUH4JTB3TMMDEFANCNFSM433LHROA&data=04%7C01%7C%7C9007d846be9149400bcf08d910d659f4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559335074092162%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=MYUWVdJ3PRTMrz%2FrEZMW9234FwQe6HvOrForeySoab0%3D&reserved=0.

gjb2048 commented 3 years ago

@badmechanic

John-Joubert commented 3 years ago

OK - thank you.


From: Gareth J Barnard @.> Sent: Friday, May 7, 2021 12:07 PM To: gjb2048/moodle-format_topcoll @.> Cc: John Joubert @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7C2cda98f643d94d12b23008d91150c1d5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559860803905938%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Tr1Ruws%2FbpVC6wFKBsf%2F%2FJgOzfl0v3skIbYY3uNYaDQ%3D&reserved=0

— 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%2F98%23issuecomment-834316006&data=04%7C01%7C%7C2cda98f643d94d12b23008d91150c1d5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559860803915934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BoqEJTHA9KEVUNPfzEVgdGRMIMZBZsqn9%2BJNt9sB9dU%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATYQKMCM2DSU7YJ7TTC5PWLTMPJZ5ANCNFSM433LHROA&data=04%7C01%7C%7C2cda98f643d94d12b23008d91150c1d5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559860803915934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=lef%2FButQW1iajOCqaDBzzc7aeDocmo3z8pAzq8vcGeY%3D&reserved=0.

badmechanic commented 3 years ago

OK - well I got the list of enabled blocks,

Now - I want to get the strings from the list.

But when I got after this (for example): get_string('pluginname','search_forums'); What I get back is: [[pluginname]]

And it does the same no matter which pluginname I got after.

Of course - I was trying to go after them with a variable where 'search_forums' - but when it wasn't working - I tried a string for a working block that I know works 'search_forums'. Just show what it returns.

And - all I get from all of these calls is "[[pluginname]]"

I've looked in the instructions to see if I can find anywhere that get_string can be used to return values from a block, and I cannot. I find that get_string returns pairs from things defined in the lang files, and that's it.

So, are these strings supposed to be populated in the lang files for us already by the blocks that are installed?

Here's what I see with this from the block... / Toggle display block choices / $name = 'format_topcoll/defaultdisplayblocks'; $title = get_string('defaultdisplayblocks', 'format_topcoll'); $description = get_string('defaultdisplayblocks_desc', 'format_topcoll'); $default = array('search_forums', 'news_items', 'calendar_upcoming', 'recent_activity'); // $choices = array('search_forums' => 'Search forums', 'news_items' => 'Latest announcements', // 'calendar_upcoming' => 'Upcoming events', 'recent_activity' => 'Recent activity'); $choices = core_plugin_manager::instance()->get_enabled_plugins('block'); foreach ($choices as $key=>$blockname) { $choices[$key]=get_string('pluginname',$key); } die(print_r($choices));

And the output for all the choices in the "die" statement reads: Array ( [activity_modules] => [[pluginname]] [activity_results] => [[pluginname]] [admin_bookmarks] => [[pluginname]] [badges] => [[pluginname]] [blog_menu] => [[pluginname]] [blog_recent] => [[pluginname]] [blog_tags] => [[pluginname]] [calendar_month] => [[pluginname]] [calendar_upcoming] => [[pluginname]] [comments] => [[pluginname]] [completionstatus] => [[pluginname]] [course_list] => [[pluginname]] [course_summary] => [[pluginname]] [feedback] => Feedback [globalsearch] => [[pluginname]] [glossary_random] => [[pluginname]] [html] => [[pluginname]] [login] => [[pluginname]] [lp] => [[pluginname]] [mentees] => [[pluginname]] [mnet_hosts] => [[pluginname]] [myoverview] => [[pluginname]] [myprofile] => [[pluginname]] [navigation] => [[pluginname]] [news_items] => [[pluginname]] [online_users] => [[pluginname]] [private_files] => [[pluginname]] [recent_activity] => [[pluginname]] [recentlyaccessedcourses] => [[pluginname]] [recentlyaccesseditems] => [[pluginname]] [rss_client] => [[pluginname]] [search_forums] => [[pluginname]] [section_links] => [[pluginname]] [selfcompletion] => [[pluginname]] [settings] => [[pluginname]] [site_main_menu] => [[pluginname]] [social_activities] => [[pluginname]] [starredcourses] => [[pluginname]] [tag_flickr] => [[pluginname]] [tags] => [[pluginname]] [timeline] => [[pluginname]] ) 1

Any direction appreciated.

John


From: John Joubert @.> Sent: Monday, May 10, 2021 1:44 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

OK - thank you.


From: Gareth J Barnard @.> Sent: Friday, May 7, 2021 12:07 PM To: gjb2048/moodle-format_topcoll @.> Cc: John Joubert @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7C2cda98f643d94d12b23008d91150c1d5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559860803905938%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Tr1Ruws%2FbpVC6wFKBsf%2F%2FJgOzfl0v3skIbYY3uNYaDQ%3D&reserved=0

— 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%2F98%23issuecomment-834316006&data=04%7C01%7C%7C2cda98f643d94d12b23008d91150c1d5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559860803915934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BoqEJTHA9KEVUNPfzEVgdGRMIMZBZsqn9%2BJNt9sB9dU%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATYQKMCM2DSU7YJ7TTC5PWLTMPJZ5ANCNFSM433LHROA&data=04%7C01%7C%7C2cda98f643d94d12b23008d91150c1d5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559860803915934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=lef%2FButQW1iajOCqaDBzzc7aeDocmo3z8pAzq8vcGeY%3D&reserved=0.

— 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%2F98%23issuecomment-836718955&data=04%7C01%7C%7C560b48475bc142a3127f08d913b9c55d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637562510856557988%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=0KLZXHapqkMqAdIyv%2F5pcwvy4AUJg8%2BAydYrAOwYG74%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPONW6X5ECLYKLXHN5DTM7PMZANCNFSM433LHROA&data=04%7C01%7C%7C560b48475bc142a3127f08d913b9c55d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637562510856567986%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8J35SEoJ2htjRqph9D%2FgWJ%2FJHMWYWaoLAl%2B4tQP2%2Fzc%3D&reserved=0.

badmechanic commented 3 years ago

OK - well I found it - I have to get the list of blocks, but to get the string, I need to prepend "blocks" to the block name in the get_string() function.

So now - this code: $choices = core_plugin_manager::instance()->get_enabled_plugins('block'); foreach ($choices as $key=>$blockname) { $choices[$key]=getstring('pluginname','block' . $key); } die(print_r($choices));

prints this... Array ( [activity_modules] => Activities [activity_results] => Activity results [admin_bookmarks] => Admin bookmarks [badges] => Latest badges [blog_menu] => Blog menu [blog_recent] => Recent blog entries [blog_tags] => Blog tags [calendar_month] => Calendar [calendar_upcoming] => Upcoming events [comments] => Comments [completionstatus] => Course completion status [course_list] => Courses [course_summary] => Course/site summary [feedback] => Feedback [globalsearch] => Global search [glossary_random] => Random glossary entry [html] => HTML [login] => Login [lp] => Learning plans [mentees] => Mentees [mnet_hosts] => Network servers [myoverview] => Course overview [myprofile] => Logged in user [navigation] => Navigation [news_items] => Latest announcements [online_users] => Online users [private_files] => Private files [recent_activity] => Recent activity [recentlyaccessedcourses] => Recently accessed courses [recentlyaccesseditems] => Recently accessed items [rss_client] => Remote RSS feeds [search_forums] => Search forums [section_links] => Section links [selfcompletion] => Self completion [settings] => Administration [site_main_menu] => Main menu [social_activities] => Social activities [starredcourses] => Starred courses [tag_flickr] => Flickr [tags] => Tags [timeline] => Timeline ) 1

So - I think I'm on the right track. I'm not done with my logic - I need to check the above list to see if my defaults are in it, and if so - add that to the defaults list. But, I'm moving forward on it.

🙂

Lastly ... Do you have ANY idea what that trailing "1" is at the end of my print_r command against the array?


From: John Joubert @.> Sent: Friday, May 14, 2021 2:22 AM To: gjb2048/moodle-format_topcoll @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

OK - well I got the list of enabled blocks,

Now - I want to get the strings from the list.

But when I got after this (for example): get_string('pluginname','search_forums'); What I get back is: [[pluginname]]

And it does the same no matter which pluginname I got after.

Of course - I was trying to go after them with a variable where 'search_forums' - but when it wasn't working - I tried a string for a working block that I know works 'search_forums'. Just show what it returns.

And - all I get from all of these calls is "[[pluginname]]"

I've looked in the instructions to see if I can find anywhere that get_string can be used to return values from a block, and I cannot. I find that get_string returns pairs from things defined in the lang files, and that's it.

So, are these strings supposed to be populated in the lang files for us already by the blocks that are installed?

Here's what I see with this from the block... / Toggle display block choices / $name = 'format_topcoll/defaultdisplayblocks'; $title = get_string('defaultdisplayblocks', 'format_topcoll'); $description = get_string('defaultdisplayblocks_desc', 'format_topcoll'); $default = array('search_forums', 'news_items', 'calendar_upcoming', 'recent_activity'); // $choices = array('search_forums' => 'Search forums', 'news_items' => 'Latest announcements', // 'calendar_upcoming' => 'Upcoming events', 'recent_activity' => 'Recent activity'); $choices = core_plugin_manager::instance()->get_enabled_plugins('block'); foreach ($choices as $key=>$blockname) { $choices[$key]=get_string('pluginname',$key); } die(print_r($choices));

And the output for all the choices in the "die" statement reads: Array ( [activity_modules] => [[pluginname]] [activity_results] => [[pluginname]] [admin_bookmarks] => [[pluginname]] [badges] => [[pluginname]] [blog_menu] => [[pluginname]] [blog_recent] => [[pluginname]] [blog_tags] => [[pluginname]] [calendar_month] => [[pluginname]] [calendar_upcoming] => [[pluginname]] [comments] => [[pluginname]] [completionstatus] => [[pluginname]] [course_list] => [[pluginname]] [course_summary] => [[pluginname]] [feedback] => Feedback [globalsearch] => [[pluginname]] [glossary_random] => [[pluginname]] [html] => [[pluginname]] [login] => [[pluginname]] [lp] => [[pluginname]] [mentees] => [[pluginname]] [mnet_hosts] => [[pluginname]] [myoverview] => [[pluginname]] [myprofile] => [[pluginname]] [navigation] => [[pluginname]] [news_items] => [[pluginname]] [online_users] => [[pluginname]] [private_files] => [[pluginname]] [recent_activity] => [[pluginname]] [recentlyaccessedcourses] => [[pluginname]] [recentlyaccesseditems] => [[pluginname]] [rss_client] => [[pluginname]] [search_forums] => [[pluginname]] [section_links] => [[pluginname]] [selfcompletion] => [[pluginname]] [settings] => [[pluginname]] [site_main_menu] => [[pluginname]] [social_activities] => [[pluginname]] [starredcourses] => [[pluginname]] [tag_flickr] => [[pluginname]] [tags] => [[pluginname]] [timeline] => [[pluginname]] ) 1

Any direction appreciated.

John


From: John Joubert @.> Sent: Monday, May 10, 2021 1:44 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

OK - thank you.


From: Gareth J Barnard @.> Sent: Friday, May 7, 2021 12:07 PM To: gjb2048/moodle-format_topcoll @.> Cc: John Joubert @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7C2cda98f643d94d12b23008d91150c1d5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559860803905938%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Tr1Ruws%2FbpVC6wFKBsf%2F%2FJgOzfl0v3skIbYY3uNYaDQ%3D&reserved=0

— 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%2F98%23issuecomment-834316006&data=04%7C01%7C%7C2cda98f643d94d12b23008d91150c1d5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559860803915934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BoqEJTHA9KEVUNPfzEVgdGRMIMZBZsqn9%2BJNt9sB9dU%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FATYQKMCM2DSU7YJ7TTC5PWLTMPJZ5ANCNFSM433LHROA&data=04%7C01%7C%7C2cda98f643d94d12b23008d91150c1d5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637559860803915934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=lef%2FButQW1iajOCqaDBzzc7aeDocmo3z8pAzq8vcGeY%3D&reserved=0.

— 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%2F98%23issuecomment-836718955&data=04%7C01%7C%7C560b48475bc142a3127f08d913b9c55d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637562510856557988%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=0KLZXHapqkMqAdIyv%2F5pcwvy4AUJg8%2BAydYrAOwYG74%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPONW6X5ECLYKLXHN5DTM7PMZANCNFSM433LHROA&data=04%7C01%7C%7C560b48475bc142a3127f08d913b9c55d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637562510856567986%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8J35SEoJ2htjRqph9D%2FgWJ%2FJHMWYWaoLAl%2B4tQP2%2Fzc%3D&reserved=0.

gjb2048 commented 3 years ago

The '1' will be the exit code from 'die' (https://www.php.net/manual/en/function.die.php), just like 'errno'.

gjb2048 commented 3 years ago

@badmechanic Thanks, will look when I can.

gjb2048 commented 3 years ago

@badmechanic Looking better, just https://github.com/gjb2048/moodle-format_topcoll/pull/98/files#r638323579 to sort and the Travis issues with settings.php and the coding standard to fix. I've changed the base of the pull request, so that there will be a way for me to see what happens when I attempt to squash the commits into one on merge for the master branch.

badmechanic commented 3 years ago

I'm thinking I don't need to do anything here. Let me know if I'm wrong, please.


From: Gareth J Barnard @.> Sent: Monday, May 24, 2021 10:10 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@gjb2048 commented on this pull request.


In lang/en_us/format_topcoll.phphttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98%23discussion_r638323579&data=04%7C01%7C%7Cd5f505b1c86a4cfc627c08d91f00af06%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574910058238157%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=rCxeedfVS32ufH%2Fv%2Fqv7Gpw61yeyih2XPVK3SOvNVXg%3D&reserved=0:

@@ -67,3 +67,10 @@ // Capabilities. $string['topcoll:changecolour'] = 'Change or reset the color';

+// Toggle Display Blocks

No longer need: https://github.com/gjb2048/moodle-format_topcoll/pull/98/files#diff-c0088f30815fb5f4137495566dc9e7b9695331b1d54e3338fb13677ab4c55e85R70https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98%2Ffiles%23diff-c0088f30815fb5f4137495566dc9e7b9695331b1d54e3338fb13677ab4c55e85R70&data=04%7C01%7C%7Cd5f505b1c86a4cfc627c08d91f00af06%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574910058238157%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=JUDrbd9SwiDA8sXGZgfoJJNmbLyewrg6N3njsSKs7MQ%3D&reserved=0.

— 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%2F98%23discussion_r638323579&data=04%7C01%7C%7Cd5f505b1c86a4cfc627c08d91f00af06%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574910058248156%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Avt1Eo1OdqOz%2BmjFOODpABlBBeTNYtItP1T03TdvOvk%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPMYXJYX3FGR7LLWVTDTPLFDXANCNFSM433LHROA&data=04%7C01%7C%7Cd5f505b1c86a4cfc627c08d91f00af06%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574910058248156%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=gFSFD7L5eT6kbxvruS1YRnSND8BE03OTAxvF7e2%2Bedk%3D&reserved=0.

badmechanic commented 3 years ago

Sorry - this link takes me to something that looks just like the last one.

I see something about code not needed. But, if I take those elements from the lang files, it's all going to break...

As for travis tool - I don't see it in the links. I'll go hunting for it.

Also - since you've changed the base of the pull request, and you are collapsing the commits... I don't know what that means to what I'm doing here. I don't want to send anything up, as I don't know if it will mess up what you're on, and where you want me to be. Do I start with a new pull request after you merge?

Thank you, sorry I don't understand the implications ...


From: Gareth J Barnard @.> Sent: Monday, May 24, 2021 10:16 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7C643d7e1e1aa1436d2b0408d91f01a218%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574914131723086%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=EUtJTsGjSEHL3TZpqrKq674EP%2BjX%2FJ4RQBrtV3Q00uo%3D&reserved=0 Looking better, just https://github.com/gjb2048/moodle-format_topcoll/pull/98/files#r638323579https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98%2Ffiles%23r638323579&data=04%7C01%7C%7C643d7e1e1aa1436d2b0408d91f01a218%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574914131733081%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=QDlM9YHVjPXUKiClJym%2BAe5Omh5Ls4wTWVitLiYtyIE%3D&reserved=0 to sort and the Travis issues with settings.php and the coding standard to fix. I've changed the base of the pull request, so that there will be a way for me to see what happens when I attempt to squash the commits into one on merge for the master branch.

— 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%2F98%23issuecomment-847387714&data=04%7C01%7C%7C643d7e1e1aa1436d2b0408d91f01a218%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574914131733081%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2yfNJ2E9LMFugPTehIkQq6kShw5T5ENRIFgYxO4qxTQ%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPMGYHZVNY4IDV63DNLTPLF5JANCNFSM433LHROA&data=04%7C01%7C%7C643d7e1e1aa1436d2b0408d91f01a218%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574914131743071%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FK9I8SPejhC7qWwPKiyP2hcSd5bm4bOSRFTyXwgbUBQ%3D&reserved=0.

badmechanic commented 3 years ago

OK - I think you're telling me to take the language strings out of en_us, and just use "en". Is that what you're saying?

If so, I can fix that.


From: Gareth J Barnard @.> Sent: Monday, May 24, 2021 10:16 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7C643d7e1e1aa1436d2b0408d91f01a218%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574914131723086%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=EUtJTsGjSEHL3TZpqrKq674EP%2BjX%2FJ4RQBrtV3Q00uo%3D&reserved=0 Looking better, just https://github.com/gjb2048/moodle-format_topcoll/pull/98/files#r638323579https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98%2Ffiles%23r638323579&data=04%7C01%7C%7C643d7e1e1aa1436d2b0408d91f01a218%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574914131733081%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=QDlM9YHVjPXUKiClJym%2BAe5Omh5Ls4wTWVitLiYtyIE%3D&reserved=0 to sort and the Travis issues with settings.php and the coding standard to fix. I've changed the base of the pull request, so that there will be a way for me to see what happens when I attempt to squash the commits into one on merge for the master branch.

— 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%2F98%23issuecomment-847387714&data=04%7C01%7C%7C643d7e1e1aa1436d2b0408d91f01a218%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574914131733081%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2yfNJ2E9LMFugPTehIkQq6kShw5T5ENRIFgYxO4qxTQ%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPMGYHZVNY4IDV63DNLTPLF5JANCNFSM433LHROA&data=04%7C01%7C%7C643d7e1e1aa1436d2b0408d91f01a218%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574914131743071%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FK9I8SPejhC7qWwPKiyP2hcSd5bm4bOSRFTyXwgbUBQ%3D&reserved=0.

badmechanic commented 3 years ago

I cannot find a link anywhere to the latest travis results. I don't see it in my pull on your page... and I just can't find it.

Can you please send?


From: Gareth J Barnard @.> Sent: Monday, May 24, 2021 10:16 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7C643d7e1e1aa1436d2b0408d91f01a218%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574914131723086%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=EUtJTsGjSEHL3TZpqrKq674EP%2BjX%2FJ4RQBrtV3Q00uo%3D&reserved=0 Looking better, just https://github.com/gjb2048/moodle-format_topcoll/pull/98/files#r638323579https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98%2Ffiles%23r638323579&data=04%7C01%7C%7C643d7e1e1aa1436d2b0408d91f01a218%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574914131733081%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=QDlM9YHVjPXUKiClJym%2BAe5Omh5Ls4wTWVitLiYtyIE%3D&reserved=0 to sort and the Travis issues with settings.php and the coding standard to fix. I've changed the base of the pull request, so that there will be a way for me to see what happens when I attempt to squash the commits into one on merge for the master branch.

— 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%2F98%23issuecomment-847387714&data=04%7C01%7C%7C643d7e1e1aa1436d2b0408d91f01a218%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574914131733081%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2yfNJ2E9LMFugPTehIkQq6kShw5T5ENRIFgYxO4qxTQ%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPMGYHZVNY4IDV63DNLTPLF5JANCNFSM433LHROA&data=04%7C01%7C%7C643d7e1e1aa1436d2b0408d91f01a218%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637574914131743071%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FK9I8SPejhC7qWwPKiyP2hcSd5bm4bOSRFTyXwgbUBQ%3D&reserved=0.

gjb2048 commented 3 years ago

@badmechanic RE: "I think you're telling me to take the language strings out of en_us, and just use "en"." = yes, as they are identical to 'en', 'en_us' only needs to contain strings that are different to 'en', i.e. 'colour' -> 'color'.

Travis info here, but just in case -> https://travis-ci.org/github/gjb2048/moodle-format_topcoll/jobs/772129561#L577-L590

gjb2048 commented 3 years ago

@badmechanic i.e. ->

Screenshot 2021-05-25 125014

gjb2048 commented 3 years ago

@badmechanic Thanks, but 'en_us' is still showing up in the list of commits with a change -> https://github.com/gjb2048/moodle-format_topcoll/pull/98/files#diff-c0088f30815fb5f4137495566dc9e7b9695331b1d54e3338fb13677ab4c55e85L69 - please make a commit with nothing changed (as Moodle also complains of no blank line at end of file at times). Then when I squash the commits into one, then hopefully will only be three changed files and you'll retain the commit credit. I'll see how this goes.

badmechanic commented 3 years ago

OK - I did a commit, but it said that my branch is up to date. Then, I tried a few pushes...

/moodle/course/format/topcoll$ git commit -m "Null Commit" On branch noblocks_option Your branch is up to date with 'origin/noblocks_option'.

nothing to commit, working tree clean /moodle/course/format/topcoll$ git push origin noblocks_option Everything up-to-date /moodle/course/format/topcoll$ git push -u origin noblocks_option Branch 'noblocks_option' set up to track remote branch 'noblocks_option' from 'origin'. Everything up-to-date

So, since there's no changes - there's no commit, and nothing to push...

Do you want me to make a non-change to a file (just change a word in a comment), and then retry?

Or- we can just reject everything, and I can Fork the project all over again, put in the 3 changed files, commit them, and then push it all up again. Then- you can just abandon everything in this existing fork, if desired. I don't know if you can just delete the existing fork (or I can) - but if so, I can just do it all over again and submit one simple branch with three changed files.

John


From: Gareth J Barnard @.> Sent: Tuesday, May 25, 2021 6:08 PM To: gjb2048/moodle-format_topcoll @.> Cc: badmechanic @.>; Mention @.> Subject: Re: [gjb2048/moodle-format_topcoll] Block options and block location setting (#98)

@badmechanichttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fbadmechanic&data=04%7C01%7C%7C6836b6be9dd545d35f3108d91fa82758%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637575629333334123%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NXKxcwUd2R9v%2F3oDIfi8VTQYwen6%2BhJtiTvXAYO0vWA%3D&reserved=0 Thanks, but 'en_us' is still showing up in the list of commits with a change -> https://github.com/gjb2048/moodle-format_topcoll/pull/98/files#diff-c0088f30815fb5f4137495566dc9e7b9695331b1d54e3338fb13677ab4c55e85L69https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgjb2048%2Fmoodle-format_topcoll%2Fpull%2F98%2Ffiles%23diff-c0088f30815fb5f4137495566dc9e7b9695331b1d54e3338fb13677ab4c55e85L69&data=04%7C01%7C%7C6836b6be9dd545d35f3108d91fa82758%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637575629333344117%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FZQKfcEOyZ92V3DRd8FLG9X%2BTEK602Uzuey%2FJMBoUoY%3D&reserved=0 - please make a commit with nothing changed (as Moodle also complains of no blank line at end of file at times). Then when I squash the commits into one, then hopefully will only be three changed files and you'll retain the commit credit. I'll see how this goes.

— 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%2F98%23issuecomment-848098297&data=04%7C01%7C%7C6836b6be9dd545d35f3108d91fa82758%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637575629333354116%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=GBAWIr4G9fAPXm3Jb1s3LAe209gIJDPhdkrKH2TB1GE%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH4YFPLUTHF2XTMUMU7UTLDTPPRTJANCNFSM433LHROA&data=04%7C01%7C%7C6836b6be9dd545d35f3108d91fa82758%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637575629333354116%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=13Q2eQsKggawA3FDTRzLOWXDHnToZXUu0sPZ%2BVP0GRw%3D&reserved=0.

gjb2048 commented 3 years ago

@badmechanic Ok.... humm, two options:

or

As it's a learning process, I'll leave the decision up to you :).

G

gjb2048 commented 3 years ago

Superseded by #100