The module converts the standard drupal module form submissions into a batch process.
Each module to be enabled/disabled/uninstalled is treated as batch actions.

When you have your Drupal site using many modules, it takes up a lot of time to do operations on the modules page. Like enabling/installing or disabling and uninstalling modules. In some cases, it times out and can cause the site to have broken module installations. This modules converts the submit function for the modules page form to a Batch process. By doing so, it makes sure that all the modules operations are done one after the other and they wont get timed out.

Module is for Drupal 7.x

This avoids timeouts caused when numerous modules are enabled together.

Sandbox
http://drupal.org/sandbox/naughty_david/1591846

git clone

git clone --branch 7.x-1.x naughty_david@git.drupal.org:sandbox/naughty_david/1591846.git modules_form_batch_process
cd modules_form_batch_process

Other Projects
Maintaining Tray module
http://drupal.org/project/tray

Files: 
CommentFileSizeAuthor
#5 drupalcs-result.txt465 bytesrajarju

Comments

rajarju’s picture

Created a new branch 7.x-1.x
Ran the module through coder
Changes pushed to 7.x-1.x branch

klausi’s picture

We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

MJCO’s picture

Hey!

Good work on this, it looks great and I'll be using it from now on!

A few minor issues:

Please add a README.txt to your module.

I'm not certain of the issues this may introduce but my own testing seems to work:

modules_batch.module - Lines 29, 187, 294:

Replace:

include_once DRUPAL_ROOT . '/includes/install.inc';

With

module_load_include('inc', 'core', 'install');
I can't see any other obvious issues.

MJCO’s picture

Status:Needs review» Needs work

Ignore my previous suggestion. Not sure if I was really drunk or just oblivious when I wrote that.

*hangs head in shame*

rajarju’s picture

StatusFileSize
new465 bytes

Added the readme file
Ran code sniffer
Attaching the result file

rajarju’s picture

Adding PAReview: review bonus Tag

rajarju’s picture

Status:Needs work» Needs review
klausi’s picture

Removing review bonus tag, you have not listed any reviews in the issue summary? Please read #1410826: [META] Review bonus again.

tanzeel’s picture

Status:Needs review» Needs work

I just fond one minor issue, please have a look here: http://ventral.org/pareview/httpgitdrupalorgsandboxnaughtydavid1591846git. It will help you to process the module more quickly into this process.

Rest seems perfect to me.

PA robot’s picture

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

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

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

rajarju’s picture

Status:Closed (won't fix)» Needs review
Ayesh’s picture

Looks like a really useful module!

Manual review

Ventral review has no issues reported but I'd like to highlight some minor points.

It's really great how you skipped self module disable in the operation callback and doing so in the finish function.

- Line 17: It's hook_form_FORM_ID_alter you are implementing. Not Implements hook_form_system_modules_uninstall_alter.
- It's not necessary to call drupal_goto() in the batch finish function. If you call batch_process('admin/modules/uninstall') right after batch_set(), Drupal will redirect the user to admin/modules/uninstall without drupal_goto(). Your method is not wrong at all though.
- Consider including more information about what this module does. What is the exact problem this module solves, and how Batch API can solve this, for example ?

Everything else looks great to me, and I looks RTBC to me.

Ayesh’s picture

Issue summary:View changes

Added git clone url

kscheirer’s picture

Assigned:Unassigned» kscheirer

I'll look at this now in the Project applications sprint.

kscheirer’s picture

Title:Modules Form Batch Process» [D7] Modules Form Batch Process
Assigned:kscheirer» Unassigned
Status:Needs review» Reviewed & tested by the community

Sounds interesting, it's not a problem I've run into but it seems like a decent solution. Try and avoid drupal_goto() like Ayesh mentioned above. It works, but goto forces Drupal to halt its execution chain and start over, which can have weird side effects when you're in the middle of a large batch/form process.

----
Top Shelf Modules - Crafted, Curated, Contributed.

patrickd’s picture

Assigned:Unassigned» patrickd
patrickd’s picture

Status:Reviewed & tested by the community» Fixed
  • If possible, don't overwrite all submit handlers when altering a form
    instead of
    $form['#submit'] = array('_modules_batch_submit');
    do
    $form['#submit'][] = '_modules_batch_submit';
    if you have to remove existing submit handlers, use array_search() to find the index and remove it with unset().

    Otherwise you might overwrite the changes of other modules.

  • $context['message'] = t('Uninstalling %module Module', array('%module' => $module));
    When you print that message out you actually already have uninstalled the module. So the sentence should be in simple past.
  • As already mentioned, try no to use drupal_goto() whenever possible
  • $context['message'] = t('Disabling %module Module', array('%module' => $module));
    Should be "Disabled %module"
    $context['message'] = t('Enabling %module Module', array('%module' => $module));
    Should be "Enabled %module"

Some of your inline comments are either duplicating or just not helpful.. but everything looks good enough and worked when I tested it manually.

Thanks for your contribution!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or 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. 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.

Thanks to the dedicated reviewer(s) as well.

rajarju’s picture

Thank you Very much Everyone
Ill make the changes suggested ASAP

Status:Fixed» Closed (fixed)

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

Anonymous’s picture

Issue summary:View changes

Updated the info