Hello,
Can anyone tell me how to remove the "View" and "Task" (or any tabs really) from the Quiz taking portion of the module?
I'm not sure if it can be removed via permissions or a change to the theme.
I don't want users to be able to go back and forth between tabs when they are taking a test.
I use the Quiz overview that is within the "View" tab to give them information they are tested on and I don't want them to be able to go back and view the information while testing.
I've attached an image and circled in red what I needed removed.
Thank you in advanced!
Comment | File | Size | Author |
---|---|---|---|
removetabs.jpg | 27.56 KB | DanBerk4 |
Comments
Comment #1
Simon Georges CreditAttribution: Simon Georges commentedIf you have a custom module, you can use the hook_menu_alter to remove the "Take" tab. The "View" one, as only tab left, will disappear too.
If your module name is "my_module", something like
should do the trick (don't forget to clear your menu cache).
Regards,
Comment #2
Simon Georges CreditAttribution: Simon Georges commentedClosing #899840: Remove View & Take buttons as a duplicate of this one.
Comment #3
charli213 CreditAttribution: charli213 commentedwhere exactly do I have to put this code please ?
Comment #4
Simon Georges CreditAttribution: Simon Georges commentedYou have to create a module (or use a custom one if you already have one). In this module, named "XXXX", you create a function named "XXXX_menu_alter" with the code from http://drupal.org/node/853908#comment-3297940.
This should do the trick (after you activate your module and clear your menu cache).
Regards,
Comment #5
charli213 CreditAttribution: charli213 commentedThanks for your answer, but sorry to play up, do really I have to create a module just to hide one or two tabs, there is no really other solution ?
Comment #6
codevoice CreditAttribution: codevoice commented+1 for an easy way to disable these tabs.
Comment #7
superxain CreditAttribution: superxain commented+1. Calling for a checkbox to replace the module thing.
Now, I did it by editing quiz.module:
Comment #8
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedI agree with this. This is not good from usability point. "Take" tab is surplus as we already have a button in view tab to start the quiz however
hook_menu_alter()
is not a recommended approach. I am in favor of changing toMENU_CALLBACK
but i am not sure whether this will be accepted now.BTW : "Need reviews" status to be used when you have patches.
Comment #9
Simon Georges CreditAttribution: Simon Georges commentedHi,
Sorry for changing the status.
I'd agree with changing the callback too, but as it was just a support request, I only proposed a non-intrusive way of doing it. If you propose to change the menu type in quiz.module to MENU_CALLBACK, I'll support you ;)
Best regards,
Simon
Comment #10
anumathew CreditAttribution: anumathew commentedHi, I want to hide this view and take only for user(except Admin) , so how can i make changes in the menu_alter function ..??please help me ...
Thanks
Comment #11
anumathew CreditAttribution: anumathew commentedHlo, I need this two menus only for admin(viewable for admin only) , so how can i make changes on the menu_alter function...???
Thanks
Comment #12
jebernier CreditAttribution: jebernier commentedWhere exactly (line #) did you put that code snippet in the quiz.module.
Thx,
JB
Comment #13
djdevinThis issue is being closed because it is filed against a version that is no longer supported.