I seen a forum post of a user wanting to display a list of last logged in user. I thought this would be a handy light weight module.
Project Page: https://www.drupal.org/sandbox/albertski/2326193
Git: Git Repository: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/albertski/2326193.git who_logged_in
I am getting one warning when running pareview.sh but I think it is a false positive because I actually want users to have the ability to change the way the block appears while being able to add more data. For example what if they want to display a link to the user's page.
Manual reviews of other projects
Answers to comment
EditHub
Node page view 404
Site Inventory
Thanks everyone for reviewing my module :)
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | who_loggedin.admin_.inc_.patch | 702 bytes | abacaba |
Comments
Comment #1
PA robot commentedProject 1: https://www.drupal.org/node/2326223
Project 2: https://www.drupal.org/node/2307767
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.
Comment #2
PA robot commentedWe 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.
Comment #3
albertski commentedComment #4
albertski commentedComment #5
albertski commentedI am putting this back on the review list. My other module (Ckeditor Paste) got approved but it is too short and simple of a project. Hopefully this isn't. :)
Comment #6
suhel.rangnekar commentedManual Review :
1. Module install properly.
2. Block(Who Logged In) created by module, get assinged in any region and information get display properly..
3. Module contain more then 5 hook_ function and more than 120 lines of code.
So, This is an very simple logic of displaying last logged in user.Code and functionality look good for me.
But some work needed in below area, if possible.
1. There is an confusion related block title. Default Block title should be "Who Logged In" instead of "Logged In Users" to avoid confusion.
2. If you provied link to the user page would we advantage of the module.Right now it display only user name as text.
Comment #7
albertski commentedThanks for quick review. I made the changes you suggested.
Comment #8
moserk commentedPlease change the git clone with:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/albertski/2326193.git who_loggedin. A folder with the right name will be created then automatically.Automated Review
pareview.sh founds only one warning as described in the task description above.
Manual Review
Comment #9
klausiThat are all minor points, anything else major that you found or should this be RTBC instead?
Comment #10
moserk commentedI haven't found major issues. This module works fine for me and is ready for RTBC.
Comment #11
albertski commentedComment #12
albertski commentedComment #13
albertski commentedComment #14
albertski commentedComment #15
klausiReview of the 7.x-1.x branch (commit 265e58f):
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:
So the project page is a blocker right now. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #16
albertski commentedThanks @klausi for the quick review.
I think the PAReview.sh result is a false positive.
1. Updated the project page.
2. Updated to use the theme function.
3. Added validation.
4. Excluded blocked users.
5. Updated to use db_query() instead of db_select().
6. Updated query to check the "access" field instead.
Comment #17
abacaba commentedwhen cloning the folder name do who_loggedin
Comment #18
abacaba commentedand I added the correct syntax to work with bd
Comment #19
albertski commentedComment #20
albertski commented@artmix
I added the project name in the clone command in description.
Per @klausi's review:
I updated my query from using db_select() to db_query() so not sure if your patch is valid.
Comment #21
abacaba commentedand you first try
Comment #22
albertski commented@artmix
My code was like this before:
Per @klausi's review:
I updated the code to:
I updated my code from using db_select() to db_query() for performance reasons. Checkout this article for a better explanation.
Comment #23
albertski commentedComment #24
chandan chaudhary commentedManual review
A very simple module, I have spend an hour and notice few points as mention below.
i. Module allows me to save alphanumeric values for 'who_loggedin_hours' variable, it should allow only number.
ii. While rendering the account name use $account instead of $user for readability.
Comment #25
chandan chaudhary commentedComment #26
albertski commentedThanks for the review chandan.chaundhary
I don' think you have the latest code. I fixed that issue in #16 5 days ago.
I don't agree with this one. I am querying the user table so I think it makes sense. In fact even the Drupal Core User module has it the same way:
Comment #27
chandan chaudhary commentedHi albertski,
I have the updated code and it still takes alphanumeric character. i think the problem lies somewhere in the below condition
the intval function typecast the variable and so for element value '24em' it returns '24' and hence it skips the character validation. Simply using the in_numeric function will solve the issue.
Comment #28
albertski commented@chandan.chaudhard.
I go that fixed. Thanks!
Comment #29
PA robot commentedGit clone failed for http://git.drupal.org/sandbox/albertski/2326193.git while invoking http://pareview.sh/pareview/httpgitdrupalorgsandboxalbertski2326193git
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #30
albertski commentedI believe there must be something wrong with the robot that it couldn't clone my repo. I was able to clone fine. I am setting this back to needs review.
Comment #31
sandiracy commentedI have tried to clone your module, and it works.
When i read your module, you define a constant called WHO_LOGGED_HOURS. Can you tell me why you choose to define constant than do with variable_set function from drupal.
I still found issue with your code on http://pareview.sh/pareview/httpgitdrupalorgsandboxalbertski2326193git, you should use theme('item_list', ...) instead of theme_item_list()
How about if you make the WHO_LOGGED_HOURS configurable, its better i think, so user can set them
Comment #32
albertski commented@sandiracy
I use the constant WHO_LOGGEDIN_HOURS because I use variable_get in multiple spots so I can define my default once.
I updated my code to theme('item_list', ...). (I thought this was a false positive before).
It is configurable in who_loggedin.admin.inc.
Comment #33
zaporylies/baisc/basic
...but that's a minor issue :) RTBC
Comment #34
kscheirerNon-blocking issues:
SELECT uid, name, login, mail, access...it doesn't look like you need the login and mail columns?is_int(intval($element['#value']))will always return TRUE, because intval() will always return an int, so this condition is not a good checkThanks for your contribution, albertski!
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.
Comment #35
albertski commented@zaporylie: Thanks for the review.
@kscheirer: Thanks for the review and promoting my account.
I have fixed all the non-blocking issues.
Thanks again!