Hi,

I made a custom module to add the feature that quiz owner can allow other users to edit or view the results of their quiz.
I have a function quiz_permission_user_is_analyst($user,$node) which returns me a Boolean regarding if the user has the appropriate role.

I have tried to modify the view permissions of the "quiz" tab at /node/%/quiz/ but i cannot find where in the code i can make the change.

Can you help me

Thanks

Comments

djdevin’s picture

Hi,

You are talking about two permissions - the ability to edit the node (Quiz), and then the ability to edit/view results?

Editing the node you can do with node access. The Quiz results page is a view, so you should be able to edit it and change the permissions for it.

Let me know if that helps

gspfranc’s picture

Actually, in the quiz_results.view.inc, on line 155, only users with "update" permission can view the result list.

Is there a way to modify this line to add an access_callback function like on menu item for displaying this tab?

thanks

djdevin’s picture

Status: Active » Closed (outdated)