This module adds the posibility to make anonym the webforms. Many times need that the questionnaires or polls are anonym, not for the normal anonym user,but also for user authenticated. Work well with the last version of webform and date popup.

This is sandbox: http://drupal.org/sandbox/diaxpro/1126490

Comments

diaxpro’s picture

Adds two pages in the results tabs, you can know who sent the form or who not sent yet. But not associate the submissions to users, and can filter by dates. This proyect is result of work to "Inspectoría San José Valencia" www.salesianos.edu and in a future, we want share the developed modules.

Regards!

sreynen’s picture

Status: Active » Needs review
diaxpro’s picture

Hi #sreymen what i need review? regards!

diaxpro’s picture

I followed the advice of @quicksketch and my code runs through Coder on the most strict mode. I made a new commit to project.

jordojuice’s picture

Component: new project application » module
Assigned: Unassigned » jordojuice
Issue tags: +pdx-code-review

Hi diaxpro,

Sorry about the long wait. I will begin the review of your module and we will try to complete your application as quickly as possible.

jordojuice’s picture

Status: Needs review » Needs work

This is essentially a review of coding standards and some security issues. Some of it may seem a bit extensive or unnecessary, but the part of the purpose of this process is to educate when necessary. Following coding standards helps maintain consistency throughout drupal.org projects and thus promotes the collaborative environment.

You can remove // $Id$ and similar tags from all files. These are no longer needed with git (despite what Coder might have told you).

You need documentation throughout your module. Please refer to http://drupal.org/node/1354 for more information on how to document your functions. All functions should have documentation.

break; //webform_configure_form
Inline comments like these are generally discouraged according to commenting standards. Comments should reside on their own lines. There are many of these throughout the module.

You have several areas of commented out code. I would recommend getting rid of these if they're not needed.

//isn't anonymous
Inline comments need to be formatted as sentences, starting with a space and capital letter and ending with a period. // This is a proper comment.

In my opinion, many of your functions could use good doxygen commenting. Be sure to study @param, @return, and @see references when you read the documentation. Adding this type of documentation to your module will help remove barriers to collaboration.

require_once drupal_get_path('module', 'webform') . '/webform.module';
I don't think these includes are necessary. If Webform is enabled you should have access to its functions in webform.module, and any includes should be conditional if possible.

db_query("INSERT INTO {webform_anonym_submissions} (wnid,uid,submitted) VALUES (%d,%d,%d)", $node->nid, $submission->uid, $submission->submitted);

This is not proper spacing according to coding standards and practices. For more information you can visit http://drupal.org/coding-standards or I always recommend studying core module files to better understand coding standards.

db_query("INSERT INTO {webform_anonym_submissions} (wnid, uid, submitted) VALUES (%d, %d, %d)", $node->nid, $submission->uid, $submission->submitted);

Good use of placeholders though.

$pending=array(); -> $pending = array(); Operators like this need to have spaces to make your code easier to read. This is found in many places again.

Mostly, indentation is good throughout the module. But there are a couple spots with improper indentation. Not a big deal though!

I think that's all I've got for now. Please fix these issues and set your application back to "Needs review" once the changes are committed to your sandbox. Thanks again for your contribution and good luck!

jordojuice’s picture

By the way, maybe you should consider changing the module name to anonymous_webform? Anonym is not really a commonly used English word. Indeed, my iPad thinks it doesn't even exist. Changing the name may help users more easily find your module.

Also, please add a README.txt file detailing installation and configuration processes.

diaxpro’s picture

Status: Needs work » Needs review

Hi, @jordojuice ,thanks for your review, I think I've done all the necessary modifications. And I changed the name of the module following your advice. I hope your answer.

jordojuice’s picture

Title: Webform anonym » Anonymous Webform

The code looks pretty good in my opinion! Only minor documentation issues, but they're just that: minor. I want to test it out still, though. I won't be able to do it today but if you don't hear from me in a couple days bump this thread. I have a bad memory!

diaxpro’s picture

Remember.

Regards! ;)

diaxpro’s picture

"Only minor documentation issues"

What issues? i can fix

diaxpro’s picture

@jordojuice "I won't be able to do it today but if you don't hear from me in a couple days bump this thread. I have a bad memory!"

Up Up!

quicksketch’s picture

I think this project is the ideal situation for functionality that can't be built directly into the Webform project but makes an excellent add-on module. There's no way I could add something like this in as normal functionality, but it's something that comes up once every hundred sites.

I vouch for the approval of this project despite it's minor coding issues.

Speaking of minor and something actionable. In anonymous_webform_list_unanswered_filter_form(), I'd suggest setting $form['#type'] = 'GET' and then using $_GET throughout that function instead of $_POST. GET is much more suitable for searches than POST (a la Views exposed filters).

diaxpro’s picture

Thanks for your support, I will change what you mention, and if you tell me you've seen the issues I attempt to fix soon.

Greetings and thanks again.

sreynen’s picture

Status: Needs review » Reviewed & tested by the community

diaxpro, I created a minor issue in your project issue queue. To catch coding standards issues, you can run the Coder module on "minor."

I think this is ready for approval even with minor issues.

diaxpro’s picture

Ok, go to review, and run the new version of Coder.

thx.

greggles’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution, diaxpro! Welcome to the community of project contributors on drupal.org.

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Automatically closed -- issue fixed for 2 weeks with no activity.