Forums | Mahara Community

Support /
View Group Notifications


anonymous profile picture
Account deleted
Posts: 33

11 May 2011, 21:52

Hi all,

I am curently looking at the new options in 1.3.6 before upgrading from 1.2.4. I have noticed there is an option selected by default to send notifications to all group members everytime a member of a group shares a view. I was wondering if there is a way this can be not selected by default? We have large groups of student so this option would produce alot of emails. I know I can get the individuals to change to email digest instead, but email is selected by default, so this is an extra step all users would have to do.

Any ideas?

Dirk Meyer's profile picture
Posts: 425

11 May 2011, 22:29

Hello Heidi,

The block of code below appears around lines 81-85 (about half way down) in the file create.php which is located in the /group folder. Changing the '1' to a '0' will do the trick.

Cheers

$elements['viewnotify'] = array(
    'type' => 'checkbox',
    'title' => get_string('viewnotify', 'group'),
    'description' => get_string('viewnotifydescription', 'group'),
    'defaultvalue' => 1

anonymous profile picture
Account deleted
Posts: 33

12 May 2011, 21:30

Thanks Dirk for the quick reply. Just what I needed Smile

Shen Zhang's profile picture
Posts: 87

16 January 2012, 20:00

Hi Dirk,

Thanks for your answer. I've followed your instruction and the good news is on the create group page, the checkbox for "Shared page notifications" is not ticked. However, when I click on the "Save Group" button and then click on the "Edit" button try to edit the group settings again, the checkbox is ticked. It seems that the default value the checkbox uses is set elsewhere. Any idea where else I should change to set it up properly?

Thanks,

Shen

Dirk Meyer's profile picture
Posts: 425

16 January 2012, 22:02

Good catch!

You might notice that if you edit the group once with this unchecked, it will stay unchecked in consecutive edits...at least for me.

The following also works for me and does not require to save once as described above: In file /group/edit.php on line 105 delete '$group_data->viewnotify' and replace with '0' so it looks like below:

From

$elements['viewnotify'] = array(
    'type' => 'checkbox',
    'title' => get_string('viewnotify', 'group'),
    'description' => get_string('viewnotifydescription', 'group'),
    'defaultvalue' => $group_data->viewnotify

To

$elements['viewnotify'] = array(
    'type' => 'checkbox',
    'title' => get_string('viewnotify', 'group'),
    'description' => get_string('viewnotifydescription', 'group'),
    'defaultvalue' => 0

Shen Zhang's profile picture
Posts: 87

17 January 2012, 16:56

Thanks Dirk. However, I guess this is not a proper fix. What this approach does is ignoring whatever value is set in the database and display "0" value for the checkbox, which appears unchecked. I tried your code and all the View Group Notifications are unticked, including the groups that are set to tick View Group Notification option. Any better idea?

Thanks,

Shen

6 results