A simple timelog for Drupal 7
Logging users login and logout time and calculating logged in time.
TimeLog is configurable for how to log (first/last per day or all login/logouts) and for which roles.

Using views you can create reports about users/employees hours aso.

TimeLog creates content type, fields and a configuration form.

Uninstalling TimeLog completely removes all records and content type created by the module and all configuration info created.

TimeLog sandbox

Comments

patrickd’s picture

Status: Needs review » Needs work

welcome,

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.

As installation and usage instructions are quite important for us to review, please take a moment to make your project page follow the tips for a great project page. Make sure your README.txt follows the guidelines for in-project documentation.

while waiting for an in-depht review of your module you can start out fixing some coding style issues detected by automated tools:
http://ventral.org/pareview/httpgitdrupalorgsandboxcord11544058git

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.

regards

pgogy’s picture

Hello,

In your .info file, I don't think

package = CORD

is right? Perhaps package = other?

I think for

'access arguments' => array('access timelog content'), to work, you need to use hook_permissions

Things such as

    'title' => 'Configure timelog',
    'description' => 'How timelog registers users login-logouts',

Should have a t() around them - so t('Configure timelog')

jpontani’s picture

Review

timelog.install
timelog_uninstall()
- No need to call a single other method to do the uninstall, just put all that stuff inside the hook.
timelog_createautouser()
- Create a random password for the user. You don't want every single user of your module to know an Administrator's password to your site.

timelog.module
- Your functions should have variable/parameter names that are a bit more understandable. For example in your hook_user_login, I have no idea what you're trying to store in the $f and $t variables. See Naming Conventions. Also look at Doxygen and comment formatting conventions for documenting the code as well.
timelog_getnode()
- Why? All this does is return the same thing that node_load does. Unnecessary.
timelog_gettype()
- Also unnecessary. Simply returns the same value that a call to variable_get returns.

timelogconfigformpage.inc
timelog_getroles()
- Unnecessary. See user_roles().
timelogconfigformpage()
- Wrap your output in t() so multilingual sites can have it translated.
timelogconfig_form_validate() and timelogconfig_form
- Don't put HTML inside the t() call.
timelogconfig_form()
- Consider using system_settings_form() as you're simply storing the results in the variables table.

klausi’s picture

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

Closing due to lack of activity. Feel free to reopen if you are still working on this application.