CVS edit link for tomhung
I am writing to request CVS access that I might add the Webform Import module to the Contributed (contrib) modules repository.
Much like the Node Import or User Import modules, Webform Import allows you to import a set of Webform submissions from a delimited text file. Webform Import accepts all standard delimiters (comma, tab, semicolon, colon, pipe, period, and space). The Webform module currently allows you to export data to a delimited file, but does not allow for any method of import of data from external data sources.
Dependencies
· Webform module.
· Drupal 6.x
Related modules
· Survey-Webform Migrate
Comments
Comment #1
tomhung commentedcode
Comment #2
tomhung commentedI have searched google and drupal.org modules for similar modules and found none.
I have reviewed this module successfully with the "Coder".
Comment #3
tomhung commentedPlease review the above tarball for addition to the Drupal 6.x CVS contrib modules
Comment #4
tomhung commentedScreenshot
This is integrated into an Open Atrium feature. Yet OA is not required.
Comment #5
avpadernoHello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.
Comment #6
bcn commentedI was wondering what the status of this application is?
quicksketch (the webform maintainer) has stated that:
I've also performed a quick review of the code, and it looks okay to me as well. Is there anything else we can do to help move this along, as the code tomhung intends to release exposes some new and valuable functionality.
Comment #7
tomhung commentedping
Comment #8
tordrup commentedDefinitely +1 on this.
I'm very interested in seeing this application move forward. On more than one project, webforms has allowed me to quickly develop robust mini-applications. But not having a stable and reliable data import tool has added a ton of hours to these projects.
Comment #9
tomhung commentedBeta 2 - updated the help interface as well as added template csv creation.
This has bugs.. Newest version below
Comment #10
tomhung commentedNew help & download template screenshot
Comment #11
tomhung commentedCVS Account Application Checklist according to http://zzolo.org/thoughts/applying-drupal-cvs-account
Requirements and Other Modules
done - Make sure you read the CVS Application Requirements!
done - A lot of this same information is in the what to expect article but is often overlooked.
done - Describe how you looked for other modules and ANY module that may do similar things. I need to know you at least looked.
done - Are you leveraging other modules in yours? There are a number of stable API modules in Drupal. If applicable, you should use them, or tell me why you are not.
done - Is your module a feature that should be a part of another module?
done - Tell me that you have read these pages and link to them.
Coding Standards
done - Follow the Drupal Coding Standards.
done - Note that the Drupal Coding Standards include Javascript and CSS files (among others).
done - Use 2 spaces, not tabs.
done - See String Concatenations.
done - Every text file that you put into the Drupal CVS repository should have the following at the top of the file: $Id$ In code files, this will be within a comment. This automatically gets changed by the CVS packaging system to something like to include, the date, your name, etc.
done - All code files need to have a @file docblock.
done - All functions should have a docblock.
done - Documenting hook implementations only need to reference the hook:
done - Run your module through Coder to help automate some of this. Note that you can change the options when running your module through Coder.
Drupal Module Basics
done - In the .info file, do NOT include the following, as they are added by the CVS packaging system.
.install files contain the following hook implementations if they are needed (and should not be in your .module file):
done - Any significant HTML output needs to be run through the theme layer.
Using the Drupal API
done - Use the t() l() url() watchdog() drupal_set_message() when needed
done - The basic design pattern of input in Drupal, is filter output, not input. This means that do not alter input, but make sure that you filter any output to the screen that is user supplied. Know these functions and when to use them: check_plain() check_markup() filter_xss_admin()
done - Drupal has custom implementation of common PHP string functions to help support Unicode; see the functions in unicode.inc
done - Read writing secure code and all its child pages! Seriously!
Third-Party Resources and Licensing
done - Do not put licensing information in your module anywhere. Anything that is put in the Drupal repository is automatically licensed at GPLv2.
Attached
Attached is the lastest code for review.
Comment #12
quicksketchOverall this looks like a very valuable and well-written module. I haven't found it specifically mentioned anywhere, but it seems that this module is written to work with Webform 3.x, correct? When the project page is created, be sure to explicitly state which version it is compatible with (even if it's both versions).
Code review wise:
- hook_menu() should use %webform_menu instead of %node, otherwise you'll be able to visit node/[nid]/webform-results/upload on non-webform node types.
- Lots of commenting tweaks: All comments should be structured as sentences. A single line of documentation for the short description of the file or functions.
- The $form['instructions']['instructions'] text should be run through a theme function considering its extensive markup.
- Forcing dates to be in MM/DD/YYYY is a bit over-Americanized. But making the date format configurable is a bit sticky (see the code for expand_date()) and can be fixed after this application is approved.
Attached is a basic set of nit-picks (code formats and comments) that should be corrected, but on the whole this is an immaculate CVS application. Gets my +1.
Comment #13
quicksketchAll of webform_import_form_validate() is unnecessary, since Drupal provides all of that validation built-into the FAPI (it's already impossible to spoof select list options or change a #type = 'value').
Comment #14
tomhung commentedhere is a new version.
this has quicksketch's nits as well as support for ALL native webform components (except File Field which will not be added)
Comment #15
tomhung commentedBump!
I'm not sure what else I need to do. I have code review, recommendations, and a completed checklist.
Please push the button!
Greg
Comment #16
quicksketchI'd suggest waiting patiently or you'll upset the kind volunteers who review CVS applications. I'll mark this RTBC though, that should help separate this application from others that are in review.
Comment #17
sun$filename is not escaped in any way, but contains user submitted values. This can lead to forged HTTP headers.
Same here. $node->title needs to be escaped prior to outputting it.
Comment #18
avpadernoThe string is not passed to
t().Comment #19
tomhung commented* @sun: security issues fixed
* @kiamlaluno: t() applied
* other small changes for optimization and ease of code read
Comment #20
tomhung commentedI am changing this request status back to "RTBC", since I have fixed the listed issues and have waited over 1 week for further comments.
Comment #21
avpadernoComment #22
tomhung commentedI would LOVE for someone to review these changes. Thanks to everyone that has helped out thus far.
Thanks
Greg
Comment #23
bcn commentedAFAICT this is good to go.
Comment #24
bcn commentedI'm sorry to be so pushy on this, but what more can we do to convince those with the powers to give Tomhung CVS access?
Comment #25
avpadernoThe code is fine; I have just some doubts about the following code lines:
Why the code uses that content type when the content is simply plain text?
After printing the CSV content, the code should invoke all the implementations of
hook_exit(), and exit withexit().Thank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, 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.
I thank all the dedicated reviewers as well.
Comment #26
bcn commented@kiamlaluno-Thank you!
Comment #27
tomhung commented@noahb - http://drupal.org/project/webform_import
Comment #30
avpaderno