Totara Learn Open Discussions

Creating new courses without extra blocks

 
Marina Zelinskaya
Creating new courses without extra blocks
par Marina Zelinskaya, Tuesday 10 July 2018, 09:19
Groupe Partners

Hello,

I was wondering if anyone knows if there's a way to create a new course without any blocks automatically added?  Every time I have to create a new training, the system adds Search Forums, Latest News, Upcoming Events and Recent Activity blocks (see attached image), but we do not need those in most of our classes, so I end up having to delete them over and over again.  

If anyone know if there's a setting somewhere where I can turn off the auto block generation, or another way to stopping this, please let me know.


Thank you,

Marina Zelinskaya


Craig Eves
Re: Creating new courses without extra blocks
par Craig Eves (Totara Support), Tuesday 10 July 2018, 19:45
Groupe Totara

Hi Marina

There is a description in the config-dist.php file on the setting options for the default blocks for new courses 

Add to the config.php file the  blocks you want to appear For example

$CFG->defaultblocks_override = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';


// These variables define DEFAULT block variables for new courses

// If this one is set it overrides all others and is the only one used.

//      $CFG->defaultblocks_override = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';

//

// These variables define the specific settings for defined course formats.

// They override any settings defined in the formats own config file.

//      $CFG->defaultblocks_site = 'site_main_menu,course_list:course_summary,calendar_month';

//      $CFG->defaultblocks_social = 'participants,search_forums,calendar_month,calendar_upcoming,social_activities,recent_activity,course_list';

//      $CFG->defaultblocks_topics = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';

//      $CFG->defaultblocks_weeks = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';

//

// These blocks are used when no other default setting is found.

//      $CFG->defaultblocks = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';

Regards

Erin Milanese
Re: Creating new courses without extra blocks
par Erin Milanese, Monday 16 January 2023, 10:26
Groupe TotaraGroupe TXP Site Administrator

Craig, hopefully you get notices for old discussion threads!  How would the CFG line be written if the client doesn't want any blocks to appear in the course? (other than the course admin block) 

Can we put a "none" or "null" in there? 


Craig Eves
Re: Creating new courses without extra blocks
par Craig Eves (Totara Support), Monday 16 January 2023, 13:13
Groupe Totara

Hi Erin

I am not sure what the correct syntax for no blocks is - if null or none  doesn't work then try 

 $CFG->defaultblocks = '';

regards

Erin Milanese
Re: Creating new courses without extra blocks
par Erin Milanese, Tuesday 17 January 2023, 07:55
Groupe TotaraGroupe TXP Site Administrator

That worked! 

We did have to specify a course type:

$CFG->defaultblocks_topics = '';

$CFG->defaultblocks_weeks = '';


Thank you so much!

Daniel Bond
Re: Creating new courses without extra blocks
par Daniel Bond, Wednesday 11 July 2018, 00:37
Groupe Most helpful contributor 2023
We generally don't use the "Create New Course", we just have a set of course backups (with the right blocks, standard text for sections, etc.) which we restore when we need to create a new course. Really useful for things like creating a "standard" face to face course where we wanted to remove all of the standard notifications so we've only got our customized ones.