Forums | Mahara Community

Developers /
Add a new group_tab


anonymous profile picture
Account deleted
Posts: 5

17 January 2013, 1:41

Hello people,

Iam trying to add a new group_tab inside mahara for adding new functionality which only the tutor in a group with the type course should be able to access.

I recognized that the artefact plugin file has added a new group_tab "Files" so I also added this function inside my artefact plugin with the right variables etc. but the new tab is not showing up. When I add a second definition for a tab inside the file artefact plugin, a new tab will show up. So I think I have to define something else in my artefact plugin, but I can't find any sources on how to do that. Can somebody help? Thanks alot!

Here the Definition in the file artefact plugin:
 

public static function group_tabs($groupid) {
        return array(
            'files' => array(
                'path' => 'groups/files',
                'url' => 'artefact/file/groupfiles.php?group='.$groupid,
                'title' => get_string('Files', 'artefact.file'),
                'weight' => 80,
            ),
        );
}

I also wonder how to define the access of my new menue items /group tabs, because i want to integrate a new tab in the group, where the tutor can see additional informations, which should not be available by students.

Thanks alot for answers!



Kristina Hoeppner's profile picture
Posts: 4717

20 January 2013, 20:04

Hello Peggy,

You could take a look at how the participation report was implemented in Mahara 1.6.

http://manual.mahara.org/en/1.6/groups/inside_group.html#new-in-mahara-1-6-report

It is only available when you have the participation report setting ticked in the group settings. This is an admin-only tab, but maybe it gives you some insight on how to construct your code. I'm afraid that I can't help you beyond that as I'm not a programmer.

Cheers

Kristina

anonymous profile picture
Account deleted
Posts: 5

21 January 2013, 2:47

thx a lot! i will try this and perhaps report my solution here :)

anonymous profile picture
Account deleted
Posts: 5

25 January 2013, 0:34

hello,

i looked into the suggested function, but i can't use this solution because i don't want to change the "core" files of mahara like the edit.php in groups. If someone has used the group_tab() function successfully i would be glad if he/she could share this here.  THX

4 results