Forums | Mahara Community

Support /
Where to hack to remove display of group members?


anonymous profile picture
Account deleted
Posts: 13

21 September 2010, 7:48

We are using 1.2.6. Can anyone point me to the files to modify to remove the listing of group members? Thanks in advance! Melinda

anonymous profile picture
Account deleted
Posts: 214

21 September 2010, 8:40

Hi Melinda,

You can do this in a number of ways depending on what you're attempting to achieve.

You could, for example, remove the display from the template - but this would mean that you can't add or remove users from a group.

Alternatively, if you wanted to only show the members page for non-admin users, you could look at lib/group.php->group_get_menu_tabs() and add a test using something like

if ($group_user_access($group->id) == 'member') {
  unset($menu['members']);
}

I don't that this can be done using the local directories unfortunately so you'll have to remember to merge in your changes when upgrading to future releases (1.2.7 should be out shortly).

Andrew

 

anonymous profile picture
Account deleted
Posts: 13

21 September 2010, 9:47

Andrew, thanks for your reply. The display I am trying to supress is the one that shows up when searching and/or viewing group directory information.

For example,  when finding a group, a "directory" displays the Group name, a descirption, then a clickable list of members.

That list of members is what I want to supress. This is especially important to us when using course groups that correspond to actual classes due to privacy laws (FERPA).

Once a person belongs to a group, it is ok for them to know who their fellow members are. 

Does that make sense?

 

 

anonymous profile picture
Account deleted
Posts: 214

21 September 2010, 11:06

Hi Melinda,

You could remove the members section from the relevant template:

theme/raw/templates/group/group.tpl

If you're using a custom theme, the best thing to do would be to create the templates/group directory in your theme, copy group.tpl over from the raw theme and modify it to your requirements.

I'd really advise not modifying the raw template. One of the beautiful things about Mahara's themeing is that if a more specific template exists within a theme, that will be used instead. This will mean that in upgrades, you won't have any really problematic customisations.

Good luck,

Andrew

anonymous profile picture
Account deleted
Posts: 13

21 September 2010, 11:11

Thanks, Andrew - outstanding solution. I would much rather tweak a theme than the code. ;o) I will let you know how it goes.

anonymous profile picture
Account deleted
Posts: 13

21 September 2010, 13:15

Andrew - you are my new hero. How crazy simple was that? Thanks again!

6 results