If webform.module is installed, a menu item for accessing webform submission results is created in the navigation. Since this information is for administrative purposes only it should be created in admin/webform instead of webform.

Attached patch changes this behaviour.

btw: All entries in implementation of hook_menu should have one array item per line.

CommentFileSizeAuthor
#7 webform.menu_0.patch631 bytessun
webform.menu.patch891 bytessun

Comments

quicksketch’s picture

I'd contend that this menu item should not move into the admin menu. If the the "access webform results" item is checked, this makes it so other (non-administratrative) users may view webform results. Besides the 'clear' option to reset the results, there aren't any administrative features. It's purely informative.

sun’s picture

My consideration is, that in most Drupal installations, webform.module is managed by admins or publishers only. So it would be a good practise to offer webform results below the administer item. If anyone is providing webform submission results to public she/he is able to move the menu item whereever she/he likes.

FYI: If a user only has the access right 'maintain webforms' but not the right 'access administration pages' the menu item "webform" is still displayed in the root of the navigation.

quicksketch’s picture

I definately see where you're coming from. There are a few similarly functioning items in the administer menu, such as 'logs' and 'help' where they are primarily informative. We should find out what Pontus (ullgren) thinks of this issue.

RE: FYI: The 'webform' menu item is displayed only if the user has 'access webform results' permission. Since the menu item contains the results. If you don't have this permission then you might be running an older version of webform.

sun’s picture

You're right. But also if a user has only the access right 'access webform results' but not the right 'access administration pages' the menu item "webform" is still displayed in the root of the navigation, even if its path is admin/webform.

quicksketch’s picture

I see. You're describing the behavior after the patch is applied. Don't you think that it is a little confusing to allow a normal user access to an administrative page when their permissions imply otherwise? If the user doesn't have permission to 'access administration pages' they shouldn't be able to access anything under the 'admin' path.

sun’s picture

I don't think this is a webform issue. As you already mentioned in #3 there are several other modules which behave identical to the proposed way. And IMHO this is correct since it is a flexible design for site administrators. If a user has got the right to access administration pages, she/he will see the proposed location of the administraton/monitoring/analysis-menu item below administer. If a user does not have the right to access administration pages but the right to access webform results, the webform menu item is displayed to the user, regardless of where it is located.

sun’s picture

StatusFileSize
new631 bytes

New patch against current 4.7.0. Is there a chance to commit this?

sun’s picture

Status: Needs review » Reviewed & tested by the community
quicksketch’s picture

I moved the results to the admin menu like you suggested (in my sandbox). I now agree that it belongs there more than in the main menu, thanks for sticking in there :-) While we're at it I also think that the results menu location should be changed. Right now it is /webform/done/nid. I think we should move it to /node/nid/done, since we're removing the /webform parent item. Does this sound logical? I'd like to put both changes in at the same time.

sun’s picture

I didn't recognized this yet and will have a look on this shortly.

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

I moved the results page to 'node/nid/done' as I suggested above. Everything makes much more sense now. Thanks for the suggestions!

John McV’s picture

Hello,
I'm interested in this patch. How do I add it?
John

sun’s picture

Download the current webform release.

John McV’s picture

Any way for users to access results without having access to the original empty form and being able to submit it. I've tested this with a user role who normally only has "access to results" rights. I'm using the latest versions of webform and drupal. Thanks,
John

sun’s picture

John, please open a support request for your question. Do not mix up issues, please.

Anonymous’s picture

Status: Fixed » Closed (fixed)