This module publishes and consumes resources from the Learning Registry, a new open-source content distribution technology launched by the US Department of Education and Defense. See http://www.learningregistry.org/ for more information.
http://drupal.org/sandbox/jasonh/1342822
git clone http://git.drupal.org/sandbox/jasonh/1342822.git learning_registry
This project is Drupal 6.
ps - I tried to delete the original master branch and moved to 6.x-1.x as recommended by Drupal community. If you have any advice on how to delete permanently, advice would be appreciated (as http://drupal.org/node/1127732 didn't work). Permanent delete should be okay as this is first submission and others won't have reference to "master".
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | drupalcs-result.txt | 5.17 KB | klausi |
Comments
Comment #1
raynimmo commentedIf this is for review then you should change the status to 'needs review' and not 'active'
Comment #2
jasonh commentedUpdating to "needs review" (thanks!)
Comment #3
raynimmo commentedI have only had a quick scan over your repository and code and noticed a few points.
Overuse of t()
learning_registry_menu(), as it is not required as translation of menu items is deferred until runtime.Automated Review
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
When you are running Coder make sure that it is set on 'minor' to catch some of these, alternatively download Klausi's script, drop it into the root of your site and run it by entering
paraview.sh sites/default/modules/learning_registry > learn_reg_test.txtand then check the text file it creates for errors.Good luck with the rest of your review.
Comment #4
raynimmo commentedComment #5
jasonh commentedGreat, thank you for that feedback. The latest revision has those changes incorporated.
Comment #6
raynimmo commentedThe automated review script is still finding a few errors within your module.
It is also not reading your README.txt file as it does not have a file type attached to it. After checking your repository at http://drupalcode.org/sandbox/jasonh/1342822.git/tree/refs/heads/6.x-1.x I noticed it is simply called README and you have omitted the .txt.
Now that you have created your 6.x-1.x branch you should empty out your master branch.
Automated Code Review
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
There may still be some areas unchecked as a manual review will be required once you can satisfy the automated code reviews.
RE: Automated Code Reviews
Before commiting you should run your code through the Coder module with the settings at 'minor'. There are also a host of optional add ons that run with Coder and help to spot errors in your code such as Coder Tough Love, the Translation Template Extractor and Text Review to name some of the more popular ones. There is also a really good script called PAReview.sh that does a great job of spotting errors, its still a sandbox project though so is liable to changes.
Comment #7
jasonh commentedGreat, thanks for that. I've corrected and re-run the reviews with PAReview.sh and Coder module with minor warning levels.
Comment #8
doitDave commentedHi, some deeper check with drupalcs enabled:
Automated review (Please keep in mind that this is primarily a high level check that does not replace but, after all, eases the review process. There is no guarantee that no other issues could show up in a more in-depth manual follow-up review.)
Review of the 6.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Comment #9
jasonh commentedThanks for that scan and feedback, latest submission now has changes recommended by drupalcs incorporated as well.
Comment #10
jasonh commentedSidelining, need to double check publishing after code reformatting.
Comment #11
jasonh commentedSmall updates to the code from refactoring method names per code review. Verified back in operation again. Ready for next review.
Comment #12
natemow commentedHey Jason! Just did another quick review of the mod...results below. (The Learning Registry looks like a very cool project, btw!)
Manual review:
Comment #13
jasonh commentedVery good feedback; I'll work through this and check back in. Thanks Nate!
Comment #14
jasonh commentedIncorporated styling recommendations from Drupal Code Sniffer. Also implemented changes from natemow's manual code review (array spacing, hook_requirements, l() and st() in install). Ready for next review.
Comment #15
natemow commentedLooking better...a few more notes/considerations below.
Automated review:
Review of the 6.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
Manual review:
Comment #16
jasonh commentedThanks natemow for the review. Super helpful!
Latest updates:
Comment #17
natemow commentedApologies for the delay on the review...holiday stuffs, you know.
Automated review:
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
12 | ERROR | No space before comment text; expected "// " but found "//"
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
11 | ERROR | No space before comment text; expected "// " but found "//"
14 | ERROR | No space before comment text; expected "// " but found "//"
--------------------------------------------------------------------------------
Just remove the extra comment delimiters or add a space after each flagged instance.
Manual review:
Otherwise, this looks great to me...nice work! Putting the RTBC stamp on it...more experienced reviewers are welcome to jump in, of course.
Comment #18
elc commentedblockers
Also, the current validation function 'learning_registry_admin_settings_validate' is never called because it is in the admin.inc file, which is not included before Drupal looks for validation functions. The admin.inc and content.inc forms both need working validation.
In the option arrays in learning_registry_admin_settings, the option arrays should be line wrapped as per the coding standards, and all values should be fixed and specified rather than relying on the magic value of the order they were entered in. eg
becomes
.. with the appropriate, commented define() calls at the front of the module.
Also, this function is called even when the values that have been posted have been potentially rejected by the validation function. It will also be called more than once with a non NULL value. And accepts spaces as valid input.
highly recommended
merely suggestions
.. and will always be included so will never be set to NULL. In PHP 5.3, the site may get annoyed with the &.
Comment #19
jasonh commentedThis is excellent feedback! Thanks much for the review, I'll work on incorporating the changes in the coming weeks.
Comment #20
jasonh commentedQuick question - is there a "Drupal" way for external URL validation? Sample code in other modules? (I can't think of anything off of the top of my head). Perhaps a drupal_http_request call and ensure a HTTP status 200 OK is returned?
Comment #21
btopro commenteddrupal_http_request is the way that I've always done it. HTML Export uses this method and then ensures that 404/403/500 weren't returned so that's probably a valid way of handling the issue of verification based on potential error code generated.
Comment #22
jasonh commentedThe module has been updated and ready for review again. Also ran past Coder and Coder Tough Love. Most issues were fixed, some of the recommendations are now issues and will be resolved in the future. I'm setting back to RTBC as that's last where natenow left it, please let me know if that's not the right thing to do.
Thanks in advance for the review.
Blockers
FIXED: // TODO: figure out if we need to validate this information.
FIXED: #option arrays, magic values
FIXED: direct access to post variables instead of values
FIXED: string translations
FIXED: commented out debugging code
Highly Recommended
FIXED: .gitignore
FIXED: master missing README.txt (I think the master branch is deleted)
FIXED: README.txt (added more text)
FIXED: function learning_registry_node_operations (disable)
ISSUE: function learning_registry_node_operations ( label should be translated.)
ISSUE: function _learning_registry_bulk_operations_publish
Merely Suggestions
FIXED: remove comment from .info file
FIXED: finding the maxium of two values
FIXED: learning_registry_content_form - form_values vs form_state
ISSUE: use of curl
ISSUE: limiting cron workload
FIXED: commented out code
FIXED: _publish, _deleted, _update
ISSUE: _learning_registry_queue_node
Comment #23
jasonh commentedAlso curl references are now drupal_http_request and removed it from the install requirements. Thanks ELC and btopro for the suggestions!
Comment #24
klausiDon't RTBC your own issues.
You have not listed any reviews of other project applications in your issue summary as strongly recommended here: http://drupal.org/node/1011698
Comment #25
David_Rothstein commentedThis module has useful, original functionality, and overall the code looks excellent and very well-written! It's been in the review queue for a very long time, and @jasonh has been diligent about responding to feedback above, so I think we should try to move it towards full project status as soon as possible.
I reviewed the latest code in the module and found two issues that might be blockers, because they are potential security issues:
#1517794: learning_registry_content_form_submit() doesn't sanitize data before printing it
#1517796: learning_registry_admin_settings() doesn't sanitize node types before printing them
Once those two are addressed, it's my opinion that this module is ready to be promoted to a full project.
***
While reviewing, I also found a number of smaller remaining issues. These are all worth looking into fixing, but they're basically just garden-variety bugs/tasks so I don't think there's any reason to hold up the project application over these. For completeness, though, here's the list:
#1517732: Code should not call theme_table() directly
#1517740: Code that might execute at runtime should not call st() directly
#1517748: Minor PHPDoc improvements and cleanup
#1517750: Document or remove the node_load() static cache reset in hook_cron()
#1517758: Validation of drupal_http_request() calls isn't fully implemented
#1517762: Consider increasing severity of watchdog() call
#1517766: Stray semicolon
#1517768: PHP notices on the content form
#1517776: drupal_http_request() calls can be made to an invalid URL
#1517780: Both menu items have the same title
#1517784: Form validation function should validate the terms of service URL also
#1517786: Add a short README.txt to the master branch
#1517812: Some drupal_set_message() calls don't use t()
Comment #26
jasonh commentedThanks David for the insightful and comprehensive review. Those are all really good suggestions leading to a better functioning module. I've implemented the majority of those and will get a few of the other non-blockers later in the week. I've addressed the blockers, so would like to set the module to be considered for full project status as recommended.
Comment #27
David_Rothstein commentedI reviewed the commits and I'm confident the potential security issues raised above are fixed. So I think this is ready to go. Thanks!
Comment #28
klausiYou have not listed any reviews of other project applications in your issue summary as strongly recommended here: http://drupal.org/node/1011698
Review of the 6.x-1.x branch:
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. Get a review bonus and we will come back to your application sooner.
manual review:
"UPDATE {learning_registry} SET updated=%d": there should be a space before and after the "=". Also elsewhere.
But that are just minor issues, so ...
Thanks for your contribution, jasonh! Welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
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.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Thanks to the dedicated reviewer(s) as well.
Comment #29
jasonh commentedFantastic - thank you all (@raynimmo, @doitDave, @natemow, @ELC, @btopro, @klausi and @David_Rothstein) for the comprehensive review and feedback. I've learned a tremendous amount about the Drupal community from this process and very glad to be part as an active contributing member. @klausi, I'll make sure I also contribute to other project applications as a reviewer to provide like feedback.
Thanks again all - we are really looking forward to this on the Learning Registry team as a way utilize Drupal to collaborate on content.
Thanks!
Jason Hoekstra
Comment #30.0
(not verified) commentedupdating project location git link