How can I change the default forum subscription from optional to auto subscription for the entire site?

Re: [SOLVED] How can I change the default forum subscription from optional to auto subscription for the entire site?

by Hartmut Scherer -
Number of replies: 0

Hi all,

I found a solution in this forum. In Moodle 3.1.1 I added the highlighted line in mod/forum/mod_form.php 

        $options = array();

        $options[FORUM_CHOOSESUBSCRIBE] = get_string('subscriptionoptional', 'forum');

        $options[FORUM_FORCESUBSCRIBE] = get_string('subscriptionforced', 'forum');

        $options[FORUM_INITIALSUBSCRIBE] = get_string('subscriptionauto', 'forum');

        $options[FORUM_DISALLOWSUBSCRIBE] = get_string('subscriptiondisabled','forum');

        $mform->addElement('select', 'forcesubscribe', get_string('subscriptionmode', 'forum'), $options);

        $mform->addHelpButton('forcesubscribe', 'subscriptionmode', 'forum');

        $mform->setDefault('forcesubscribe', '2');

Now the default setting for all forums at our site is set to "auto subscription."

With kind regards,

Hartmut

Average of ratings: Useful (3)