Adding a default activity to each course

Adding a default activity to each course

by Martin Tazlari -
Number of replies: 3

Hi everyone,

I'm currently working on modifying a Moodle 2.8 in a way that a default activity can be added to all course with/instead the news forum. 

I'm would like to add this activity : https://moodle.org/plugins/view/mod_certificate by default to each course. I didn't find any options in Moodle and I think it's because there isn't one for that.

So I'm asking did someone have an idea what should i modify in the Moodle code or any tips for me !

Thanks in advance

Martin Taz

Average of ratings: -
In reply to Martin Tazlari

Re: Adding a default activity to each course

by Franco Pantoja -
Picture of Particularly helpful Moodlers

Hi Martin

I think I have no idea Moodle give us this option. 

However we can find in case of Blocks, course/format/your_format/config.php

// The default blocks layout for this course format:...
    $format['defaultblocks'] = ':search_forums,news_items,calendar_upcoming,recent_activity';

So maybe a good way to get what you need is develope your code in course/format/your_format/renderer.php which is the file that render the content of the course.

Try anyway to do it in a specific course format development, so you could keep save your Moodle core.


I hope it could be usefull!!

In reply to Franco Pantoja

Re: Adding a default activity to each course

by Martin Tazlari -

Hi Paco, 

Thanks for the answer, i still haven't found an option in Moodle (I think it's because there isn't one).

I'll take a look to your proposal and post back here as soon as i have any progress.

Martin Taz