Webform Replay extends the excellent Webform module by adding an option to "replay" selected webform components.

This module is ideal for situations where multiple webform submissions per user are allowed, and some of that information is likely to be repeated on each submission.

For example, a field for the user's name is almost certain to be the same for each entry. The user's address is another field that could reasonably be expected to change only occasionally.

By enabling webform replay for these fields, the user need only complete them for the initial webform submission. On subsequent entries, these fields will be pre-populated with the values from the previous submission.

Webform Replay project page

git clone --branch 7.x-1.x https://git.drupal.org/sandbox/Rijidij/2564565.git webform_replay

Comments

Rijidij created an issue. See original summary.

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxRijidij2564565git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

rijidij’s picture

Fixed minor formatting issues reported by PA robot.

rijidij’s picture

Status: Needs work » Needs review

Fixed minor formatting issues reported by PA robot.

swarad07’s picture

Status: Needs review » Needs work

For most part the module is fine, I have issues with following code. It seems to be referring to a Readme.txt file but there is'nt one in your code.

else {
        $filepath = dirname(__FILE__) . '/README.txt';
        if (file_exists($filepath)) {
          $readme = file_get_contents($filepath);
        }
      }
rijidij’s picture

Status: Needs work » Needs review

Thanks swarad07 for your review.

The hook_help() code was pretty much a cut-and-paste from https://www.drupal.org/node/161085#hook_help, which provides a fall back to README.txt if a markdown version is not found. I originally supplied both versions of the readme file, but the PA bot says there should be only one.
Maybe the documentation should be updated accordingly...

Anyhow, I have now removed the else clause from my code.

Thanks again,
Craig

feyp’s picture

Status: Needs review » Needs work

Automated Review

No automated tests, but this is not a requirement.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
No: Causes module duplication and/or fragmentation.
The Webform Prefill module seems similar to this module.
Please compare and add a similar projects section listing any differences to your project page. Instead of publishing yet another module please improve the existing module, which already does a similar job. Module duplication and fragmentation is a huge problem on drupal.org and we prefer collaboration over competition.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements
Coding style & Drupal API usage
  1. (*) You use the edit webform components permission from webform module for your admin page. Since webform uses administer site configuration for access to its admin pages, this might not be what users expect. Either implement your own permission or use the same permission as webform.
  2. (+) Please specify on your project page and in your README file, if your module is compatible with Webform 7.x-3.x or Webform 7.x-4.x.
  3. (+) You might want to document on your project page, that your module works only for authenticated users. Potential users of your module might expect, that you save a cookie or otherwise store the information on the client side and that the functunality would work for anonymous users also.
  4. module file, line 222: Use drupal_get_path() instead of dirname(__FILE__) here.
  5. As a best practice, use single quotes instead of double quotes except in very specific cases. There are several places in your module, where you do not follow this best practice.
  6. Consider using system_settings_form() for your configuration form. That way, you won't need the custom submit handler and the form would be more in line with other configuration forms. Also, your form builder method is missing $form and $form_state parameters.
  7. Consider making your configuration page menu item a subitem of the webform admin page.
  8. hook_help() implementation: Get rid of the two else statements containing $output = '<pre>' . $readme . '</pre>';. Initialize $output once before you check for the presence of markup module and override it, if markup module is present.
  9. Some of your DocBlocks are missing @param and @return documentation (see API documentation and comment standards).
  10. If you implement a hook, make sure, that the Implements line is always on top of the DocBlock.
  11. In your DocBlock for webform_replay_form_webform_component_edit_form_alter(), the Implements line should also contain the form builder method you alter: Implements hook_form_FORM_ID_alter() for webform_component_edit_form()..
  12. module file, line 155: Since you return either object or NULL, use @return object|null here.

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.

rijidij’s picture

Status: Closed (won't fix) » Needs review

Review changes have been implemented.

swarad07’s picture

Status: Needs review » Needs work

Pareview.sh is giving 1 space errors in module file. Looks like they can be autofixed with PHPCBF.
http://pareview.sh/pareview/httpgitdrupalorgsandboxrijidij2564565git

FILE: /var/www/drupal-7-pareview/pareview_temp/webform_replay.module
----------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 9 LINES
----------------------------------------------------------------------
18 | ERROR | [x] Expected 1 blank line after function; 2 found
40 | ERROR | [x] Expected 1 blank line after function; 2 found
56 | ERROR | [x] Expected 1 blank line after function; 2 found
80 | ERROR | [x] Expected 1 blank line after function; 2 found
125 | ERROR | [x] Expected 1 blank line after function; 2 found
158 | ERROR | [x] Expected 1 blank line after function; 2 found
194 | ERROR | [x] Expected 1 blank line after function; 2 found
207 | ERROR | [x] Expected 1 blank line after function; 2 found
224 | ERROR | [x] Expected 1 blank line after function; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Will do a manual review in some time.

rijidij’s picture

Status: Needs work » Needs review

Blank lines removed.

visabhishek’s picture

Issue summary: View changes
visabhishek’s picture

Status: Needs review » Reviewed & tested by the community

Module looks good and working for me. I think we don't have any blocker points. So i am marking as RTBC.

@Rijidij : Some suggestions are :
1: Follow the Readme template for the readme.txt https://www.drupal.org/node/2181737
2: Remove extra blank line from functions , ie :
function _webform_replay_get_previous_submission($nid)
function webform_replay_preprocess_webform_components_form(&$variables)
function webform_replay_admin($form, &$form_state)
function webform_replay_help($path, $arg)

mlncn’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution, Rijidij! You are now a vetted Git user. You can promote this to a full project.

When you create new projects (typically as a sandbox to start) you can then promote them to a full project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process, especially my slowness in approving following review. We know it's broken and are trying to fix it.

Status: Fixed » Closed (fixed)

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