When developing a Drupal site for our clients, we found it helpful to create a help content type where we could write instructions on how to do things specific to the given site. This module takes that concept and turns it into something you can drop into any site. This module does the following things:

  • Creates a content Type "Administrative Help"
  • Adds a permission which is required to view the help nodes
  • Adds a block which displays all the help nodes which are published

The functionality is fairly simple, but saves time from having to set up something similar on new sites.

Git Clone:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/NicoleBenes/2324905.git

Paraview:
http://pareview.sh/pareview/httpgitdrupalorgsandboxnicolebenes2324905git

Project Page:
https://www.drupal.org/sandbox/nicolebenes/2324905

Comments

PA robot’s picture

Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://www.drupal.org/node/2327911

Project 2: https://www.drupal.org/node/2131947

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

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

PA robot’s picture

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.

IcreonGlobal’s picture

Drupal coder module has reported one issue in your module.

administrative_help.install
severity: normal
Line -1: @file block missing

It should be something like below..
/**
* @file
* administrative_help module install/schema hooks.
*/

Thanks

mxr576’s picture

Project application checklist

1.1 Ensure your application contains a repository and project page link.

The project page link is missing.
Moreover, you should also add this Pareview link to your applications.

Pareview Result

No warning, no errors. This module is really simple... although you should consider @IcreonGlobal comment. @file blocks missing from your files header.

Manual test

Module works fine for me.

Richir Outreach’s picture

Issue summary: View changes
Richir Outreach’s picture

Thanks guys!

Added the information to the first post and added the @file blocks to the code.

pushpinderchauhan’s picture

Issue summary: View changes
darol100’s picture

Manual Review

Individual user account
Yes Follows the guidelines for individual user accounts.
No duplication
They are very similar modules and he mention the differents on his project page.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes Follows the licensing requirements
3rd party code
No
README.txt/README.md
Yes: Follows the guidelines for in-project documentation.
Code long/complex enough for review
Yes Follows the guidelines for project length and complexity.
Secure code
Yes

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.

veso_83’s picture

Hi Nicole Benes,

I’ve tested your module manually and reviewed your code, I can say that this is small but nice module, and your module is the first one with no warnings or notifications from those I’ve checked, everything is according to the drupal codding standards.
Good luck.

gaurav.pahuja’s picture

Just want to understand the usage of 'hook_node_access'.
I think this will be automatically taken care when you set permissions from admin screen.

Richir Outreach’s picture

I don't believe without using another module that you can easily restrict viewing content by role, so that's why I've got the hook_node_access call in there. If I've just been overlooking something in Drupal that lets you control views, let me know!

Thanks everyone else who looked into this. If there's anything else I can fix let me know!

stitchzdotnet’s picture

Hi Nicole

Your module looks straight forward, with clean coding, well commented, and Pareview isn't showing any errors.

Looks good.

davidam’s picture

@darol100: I understand that you say 3rd party code is No, you refer that the module is not using 3rd party code, then the module could go to "Reviewed and testing by the community" Is'n it?

darol100’s picture

Assigned: Richir Outreach » darol100

@daviam,

Let me review the module one more time to see if ready for RTBC.

darol100’s picture

Assigned: darol100 » Unassigned
Status: Needs review » Needs work

@Nicole Benes
You should consider implementing hook_help even if the same information from README file.
And example of the Hook_help been read from READ ME file.

<?php
/**
 * Implements hook_help().
 */
function administrative_help_help($path, $arg) {
  switch ($path) {
    case 'admin/help#administrative_help':
      $output = file_get_contents(drupal_get_path('module', 'administrative_help') . '/README.txt');
      return module_exists('markdown') ? filter_xss_admin(module_invoke('markdown', 'filter', 'process', 0, -1, $output)) : '<pre>' . check_plain($output) . '</pre>';
  }
}
?>

Site builders often use hook_help as their resource of information and also this a best practice for writing a module.

After this I believe the module is ready to be RTBC.

Richir Outreach’s picture

Thanks, I'll add that in and resubmit!

Richir Outreach’s picture

Status: Needs work » Needs review

Added in hook_help from darol100.

darol100’s picture

Assigned: Unassigned » darol100

I will check it out tonight....

Richir Outreach’s picture

Just bumping this to see if there's anything else that needs to be done!

darol100’s picture

administrative_help.install
There is a typo on line 10

/**
 * Impliments hook_install().
 */

It should be

/**
 * Implements hook_install().
 */
darol100’s picture

Assigned: darol100 » Unassigned
Status: Needs review » Needs work
klausi’s picture

Status: Needs work » Needs review

Typos are not application blockers, anything else that you found or should this be RTBC instead?

darol100’s picture

Status: Needs review » Reviewed & tested by the community

@klausi this should be RTBC instead.

I check all the code & and the module seems to be working fine.

Richir Outreach’s picture

According to the docs I just need a Git Admin to review this, then I should be all set? So no action needed until then? Thanks for all the reviews on this, I know you guys are volunteers and I really appreciate taking the time out to look over my project!

darol100’s picture

Yes,

@Nicole Benes, now you need to wait until someone from the Projects administration will look into your project and check that you do not have anything wrong.

Thank you for your contribution.

Richir Outreach’s picture

Just thought I'd give this a nudge since it's been a few months and nothing has happened.

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 :-)

pushpinderchauhan’s picture

Assigned: Unassigned » mpdonadio

Automated Review

Best practice issues identified by pareview.sh / drupalcs / coder. None

Review of the 7.x-1.x branch (commit d94eb3a):

  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

Manual Review

Simple module and docs also looks good.
Nothing major jumped out at me when I read `git diff d94eb3a..`
I am not seeing any blocking issues. Assigning to mpdonadio for a final look.

mpdonadio’s picture

Assigned: mpdonadio » Unassigned
Status: Reviewed & tested by the community » Needs work
Issue tags: +PAreview: security

(*) administrative_help_contents(), the db_select() needs an `->addTag('node_access')` to allow site owners to further restrict access to particular notes. This falls under an access bypass security issue. In general, all db_select() agains the {node} table need `->addTag('node_access')`.

I will approve this application once that is fixed.

Richir Outreach’s picture

Status: Needs work » Reviewed & tested by the community

Thanks for the look mpdonadio!

I've added in the node_access check into the db_select query. Let me know if you notice anything else!

mpdonadio’s picture

Assigned: Unassigned » mpdonadio
Status: Reviewed & tested by the community » Needs review

RTBC is set by others, when you are done with something, set to Needs Review. I'll look at is as soon as I can.

mpdonadio’s picture

Assigned: mpdonadio » Unassigned
Status: Needs review » Reviewed & tested by the community

Read `git diff d94eb3a` and see the change. My blocker is gone. Did quick second look at the module, and didn't see anything else.

mpdonadio’s picture

Status: Reviewed & tested by the community » Fixed

An admin had this a RTBC before I found a blocker, so...

Thanks for your contribution, Nicole Benes!

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.

Status: Fixed » Closed (fixed)

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