Module for calculating a ranking list for the tournaments series.
Module where the ranking list of a tournament is written down.
Each tournament can belong to one or more tournaments series.
For each series the points and the rules by which the competitors are ranked can be determined.
You can use a module for running a series of tournaments or races of any kind, e.g. F1 season, Ski world cup, your Bridge league...
You can see how it works on a real example: http://www.tablehockeytour.net/standings/11
Project is for Drupal 7, and I haven't seen anything like it.
project link: http://drupal.org/sandbox/MarkoC/1335722
git: MarkoC@git.drupal.org:sandbox/MarkoC/1335722.git tournaments_series
Comments
Comment #1
patrickd commentedIt 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:
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.
Source: http://ventral.org/pareview - PAReview.sh online service
Comment #2
MarkoC commentedThanks, all done
git clone --branch 7.x-1.x MarkoC@git.drupal.org:sandbox/MarkoC/1335722.git tournaments_series
Comment #3
patrickd commentedPAReview.sh:
http://ventral.org/pareview/httpgitdrupalorgsandboxmarkoc1335722git
Comment #4
patrickd commentedSwitched back to needs review, so in-depth reviews won't be blocked by coding standart issues.
Comment #5
jthorson commented1. Please fill out the "TODO: Please describe this field" values in your module.install file.
2. hook_uninstall: no need to manually drop your tables, as this will be handled by the Schema API.
3. Deleting variables: I'd recommend performing a db query to find the actual existing variables, and then loop through them to unset, rather than the existing 1 to 99 loop.
4. 'tournament series' permission: Should contain a verb to make it clear what is granted via the permission (eg. 'administer tournament series info')
5. tournaments_series_block_contents: Block header values should be run through t() to make them translatable. Also in tournaments_series.admin.inc functions.
6. CRITICAL: tournaments_series_block_contents: Database output must be run through a sanitization function such as check_plain() or filter_xss() before being output. Also in tournaments_series.admin.inc functions, amongst others. Check EVERYWHERE you pull strings from the database.
7.
$question = filter_xss(t('Are you sure'));Generally, we trust our translators. No need for filter_xss().8. tournaments_series_add_tournaments_form: Default values for checkbox and radio form items must be run through a sanitization function such as check_plain or filter_xss().
Didn't finish reviewing the other files in the /includes folder, but apply the above rules, and you should be pretty good.
Comment #6
MarkoC commentedTHNX for help.
7. $question = filter_xss(t('Are you sure'));
It is because the coder shows this message:
Potential problem: confirm_form() only accepts filtered text, be sure to use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized.
Any idea?
Comment #7
jthorson commentedMarkoC,
That is only an issue if you are passing dynamic (i.e. user supplied) data into the function. Coder flags this as a 'potential' problem because the missing sanitization is a fairly common mistake with severe security consequences.
In your case, since you are defining the string itself inside code, the question can never by anything but 'Are you sure'; and thus there is no risk of a user injecting malicious code ... so as long as you don't have any user-defined $variables in the string, you can safely ignore the message as a false positive.
Comment #8
MarkoC commentedSettled
Comment #9
chrisroane commentedMANUAL REVIEW
---------------
1. The project page and README.txt file are lacking. What are the requirements for the module? Here are some great tips in how to improve the project page: http://drupal.org/node/997024 .
2. This is related to #1.....I installed the module, but I am not sure what to do at the point. You really can't assume people will know what to do, unless you include these instructions. A step by step process in how to setup a tournament after the module installed, would be very helpful.
I looked through the code, and didn't notice any major issues. If you can fix the above, I'll do some more testing of the module on my local server.
AUTO REVIEW
------------
Run the module against the coder with the "minor" option selected. There are only a few issues that came up, that should be easy to fix (ignore the filter_xss() warnings that were already discussed).
There were also a few additional errors the online PAReview tool brought up: http://ventral.org/pareview/httpgitdrupalorgsandboxmarkoc1335722
Comment #10
MarkoC commentedchrisroane,
Have you looked at the help (admin/help/tournaments_series) and real example: http://www.tablehockeytour.net/standings/11.
Is it really so unclear?
THNX
Comment #11
MarkoC commentedtutorial: http://www.web-kod.com/tournaments-series-tutorial/
Comment #12
MarkoC commentedComment #13
seyv commentedHi,
First of: really nice module! I would like to use it for some LAN-party!
But I still have a few remarks:
Try to use checks before using foreach-loops.
Very nice module, can't wait until it's a full project ! (I'm gonna use it nonetheless until it promotes ^^)
Comment #14
MarkoC commentedThanks for the comments:)
1. Count - great comment, it seems that I spend too much time with programmers/developers;
2. The module is for competitions (mostly for sports), so it is very important for me that the names and
abbreviations of the countries made according to IOC codes - they, unfortunately, are not always the same as
in other codes - that's why I put all on my own list.
3. Allegedly, db_query is faster than db_select, but in some cases the code is less complex when it is used
db_select, that's why I mostly use db_query, and in others db_select.
4. OK - fixed!
The module can be used already; I've tried it on some pages.
Comment #15
MarkoC commentedComment #16
patrickd commentedI'm very sorry for the delay here, as we do really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.
Comment #17
klausiThere are still files other than README.txt in the master branch, make sure to remove them. See also step 5 in http://drupal.org/node/1127732
Manual review of the 7.x-1.x branch:
require_once dirname(__FILE__) . '/mymodule.inc';return '<p>' . t('No data') . '</p>';": you can pass this as "empty" entry to the table theme function instead. Also elsewhere.No security blockers here, although you should definitively fix the issues I pointed out. Otherwise RTBC for me.
Comment #18
MarkoC commentedThanks, Clausi, I'll fix it as soon as I find some time.
Two comments:
1) helper-functions are often used in different functions in the module...
Here I'm not clear which is the better way than loading it in .module file and use it.
7)Ok, thanks, I'm planning to use Entity API in other versions:)
Comment #19
patrickd commentedYour project page looks a little short, you may have a look at the tips for a great project page.
Code looks good and it seems like your up-to-the-task of being a good maintainer :)
(Your functions are well documented but making more inline comments would be a good practice)
Thanks for your contribution 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.