Thought that summarizing the statistics of content created, users in the portal will be useful during administration of the portal. Created this module for the same.
This is the sandbox project page for Summary reports http://drupal.org/sandbox/ravuriharish/1186100
Just added two simple reports, which are of not much use immediately.

Similar to other reports in drupal, planning to add some form elements and add some interactivity to reports, where user can choose monthly, weekly, annual reports as he wants.

Comments

ravuriharish’s picture

Assigned: ravuriharish » Unassigned
ravuriharish’s picture

Attaching the 6.x, 7.x modules for Review

ravuriharish’s picture

Enhancements planned for/will come in few days
1. Add weekly, monthly, annual filters
2. Link the numbers to nodes view, users view
3. Text displayed in the summary block as a Configurable option

Apart from these, feature requests will be addressed for drupal 7.
Any other suggestions are welcome.

ravuriharish’s picture

Status: Needs review » Reviewed & tested by the community

For versions 6 and 7, tested with mysql, postgresql

ravuriharish’s picture

Status: Reviewed & tested by the community » Fixed
ravuriharish’s picture

Status: Fixed » Needs review
ravuriharish’s picture

StatusFileSize
new38.72 KB

Uploading 6.x module to link with project page

ravuriharish’s picture

Priority: Normal » Critical
sebasvdkamp’s picture

Priority: Critical » Normal
Status: Needs review » Needs work

Please put both version in the git repository. This allows us to reliably get the same code you do.

I did have a quick look at your code and notices you aren't following the coding standards (http://drupal.org/coding-standards). Think tabs instead of spaces, or missing docblocks.

You've also got a few security issues (http://drupal.org/writing-secure-code). If you run your code through the coder module (http://drupal.org/project/coder) you'll catch the basic errors.

Good luck!

ravuriharish’s picture

Status: Needs work » Needs review

Modified the code as specified.

chakrapani’s picture

Status: Needs review » Needs work

It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Review of the master branch:

  • Run coder to check your style, some issues were found (please check the Drupal coding standards):
    Severity minor, Drupal Commenting Standards, Internationalization, Drupal Security Checks, Drupal SQL Standards, Drupal Coding Standards
    
    sites/all/modules/pareview_temp/test_candidate/summary_reports.module:
     +13: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +16: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
     +21: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +24: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
     +29: [minor] Comment should be read "Implements hook_foo()."
     +35: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
     +36: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
     +37: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
     +40: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
     +45: [minor] Comment should be read "Implements hook_foo()."
     +77: [minor] put a space between the asterisk and the comment text
     +85: [minor] Use an indent of 2 spaces, with no tabs
     +89: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +91: [minor] SQL keywords should be upper case
     +92: [minor] SQL keywords should be upper case
     +97: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +110: [normal] Arrays should be formatted with a space separating each element and assignment operator
     +115: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +118: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +119: [minor] Use an indent of 2 spaces, with no tabs
     +138: [normal] The $string argument to t() should not begin or end with a space.
     +138: [minor] Use an indent of 2 spaces, with no tabs
     +140: [minor] Use an indent of 2 spaces, with no tabs
     +141: [minor] Use an indent of 2 spaces, with no tabs
     +142: [minor] Use an indent of 2 spaces, with no tabs
     +143: [minor] Use an indent of 2 spaces, with no tabs
     +144: [minor] You may not want to use SELECT COUNT(*), if all you want to do is check for the existance of any rows, rather than the actual number of rows.
     +144: [minor] Use an indent of 2 spaces, with no tabs
     +145: [minor] Use an indent of 2 spaces, with no tabs
     +145: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +147: [minor] Use an indent of 2 spaces, with no tabs
     +151: [normal] Use ANSI standard  instead of !=
     +151: [minor] You may not want to use SELECT COUNT(*), if all you want to do is check for the existance of any rows, rather than the actual number of rows.
     +160: [minor] Comment should be read "Implements hook_foo()."
     +171: [critical] In SQL strings, Use db_query() placeholders in place of variables.  This is a potential source of SQL injection attacks when the variable can come from user data.
     +171: [minor] You may not want to use SELECT COUNT(*), if all you want to do is check for the existance of any rows, rather than the actual number of rows.
     +171: [normal] missing space after comma
     +172: [critical] In SQL strings, Use db_query() placeholders in place of variables.  This is a potential source of SQL injection attacks when the variable can come from user data.
     +172: [normal] missing space after comma
     +173: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +174: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +179: [minor] Comment should be read "Implements hook_foo()."
     +180: [minor] put a space between the asterisk and the comment text
     +187: [normal] Use "elseif" in place of "else if"
     +196: [normal] Arrays should be formatted with a space separating each element and assignment operator
     +197: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +201: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +204: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
     +205: [normal] String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
     +208: [minor] Use an indent of 2 spaces, with no tabs
     +215: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +215: [normal] Use "elseif" in place of "else if"
     +218: [normal] Arrays should be formatted with a space separating each element and assignment operator
     +219: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +230: [normal] Functions should be called with no spaces between the function name and opening parentheses
     +239: [minor] Use an indent of 2 spaces, with no tabs
     +240: [minor] Use an indent of 2 spaces, with no tabs
     +240: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +240: [normal] Use "elseif" in place of "else if"
     +243: [minor] Use an indent of 2 spaces, with no tabs
     +250: [minor] @see references should be separated by "," followed by a single space and with no trailing punctuation
     +251: [minor] @see references should be separated by "," followed by a single space and with no trailing punctuation
     +258: [normal] Control statements should have one space between the control keyword and opening parenthesis
     +267: [minor] Use an indent of 2 spaces, with no tabs
     +287: [minor] Use an indent of 2 spaces, with no tabs
     +288: [minor] Use an indent of 2 spaces, with no tabs
     +289: [minor] Use an indent of 2 spaces, with no tabs
    
    Status Messages:
     Coder found 1 projects, 1 files, 2 critical warnings, 34 normal warnings, 31 minor warnings, 0 warnings were flagged to be ignored
    
  • Lines in README.txt should not exceed 80 characters, see the guidelines for in-project documentation.
  • Remove "version" from the info file, it will be added by drupal.org packaging automatically.
  • @file doc block is missing in the module file, see http://drupal.org/node/1354#files .
  • @file doc block is missing in the install file, see http://drupal.org/node/1354#files .
  • Comments: there should be a space after "//", see http://drupal.org/node/1354#inline
    summary_reports.module:11://Find when is the node created first
    summary_reports.module:19://Find when is the node created last
    summary_reports.module:79:  //Five fixed columns
    summary_reports.module:81:  //Data needs to be populated
    summary_reports.module:83:  //PICK the report type choosen by user
    summary_reports.module:86:  //these needs to be passed from outside as functionality grows
    summary_reports.module:90:    //Final statistics
    summary_reports.module:94:  //increment is based on the input choosen by user, default which needs to compute total, is kept as an increment for 10 years,
    summary_reports.module:95:  //So the assumption is node recorsds will exist only in a span of 10 years, this needs to be modified 
    summary_reports.module:109:  //iterate over each content type
    summary_reports.module:111:    //get the first created and last created times of the content type
    summary_reports.module:114:      //iterate over the time span, based on the option choosen by user          
    summary_reports.module:117:    //Handle the last hop
    summary_reports.module:121:    //populate data
    summary_reports.module:137:   //Four fixed columns
    summary_reports.module:139:   //Data needs to be populated
    summary_reports.module:188:    //Get the message configured by User
    summary_reports.module:195:    //For all the content types, fetch the amount of content available     
    summary_reports.module:200:    //Filter content in the block, based on the options choosen by the user.
    summary_reports.module:210:  //display the information in a block
    summary_reports.module:254:  //List of options and the default option
    summary_reports.module:257:  //If user has selected some thing, then it will be stored in session, use it
    summary_reports.module:279:   //Right now we don't have anything to validate here
    summary_reports.module:286:   //STORE the Selected option in SESSION      
    
  • ./summary_reports.module: comment lines should break at 80 characters, see http://drupal.org/node/1354#general
      //increment is based on the input choosen by user, default which needs to compute total, is kept as an increment for 10 years,
      //So the assumption is node recorsds will exist only in a span of 10 years, this needs to be modified 
          //iterate over the time span, based on the option choosen by user          
      //$data[] = array('Users with no Role ', '-', '-' , ($all_users - $users_with_role));
    
  • Bad line endings were found, always use unix style terminators. See http://drupal.org/coding-standards#indenting
    summary_reports.install
    summary_reports.module
    
  • Assignments should have a space before and after the operator, see http://drupal.org/node/318#operators
    ./summary_reports.module:110:  foreach ($contenttypes as $type=>$value)   {    
    ./summary_reports.module:196:  foreach ($contenttypes as $type=>$value)        {
    ./summary_reports.module:218:    foreach ($contenttypes as $type=>$value)   {
    

This automated report was generated with PAReview.sh, your friendly project application review script. Please report any bugs to klausi.

misc’s picture

@ravuriharish has been contacted to ask if the application is abandoned.

After ten weeks with a status of needs work: the applicant may be contacted by a reviewer to determine whether the application was indeed abandoned. The action taken by the reviewer should be documented in the project application issue.

http://drupal.org/node/894256

misc’s picture

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

The application has been closed. If you would like to reopen it, you are free to do so.
See http://drupal.org/node/894256#abandonedtwoweekscontact