Attendance Register

Activities ::: mod_attendanceregister
Maintained by CINECA elearning SUPPORT
This is an activity module for tracking time spent by Students (or other users) in a Course or in a related group of Courses.
Latest release:
1849 sites
613 downloads
124 fans
Current versions available: 3

This is an activity module for tracking time spent by Students (or other  users) in a Course or in a related group of Courses.

Online activity is automatically tracked.
Users may also (optionally) record "offline" sessions of work.

The module will show aggregate report by user, or detailed report at user's session level.
Printable versions of all reports are available.

It also supports activity completion rules by minimum time in the Course.

By defaults, it tracks only activity in the Course the instance is in.
You may change this behaviour by module instance configuration. You may track all Courses in the same Category or Courses "meta-linked" to this Course.

By default, it tracks only Student's activity.
You may choose whose activity will be tracked by modifying Role Capabilities.

By default, only Teachers, Managers and Administrator may see other report of other user's activities.
You may change this behaviory by modifying Role Capabilities.

The Module is currently translated in English and Italian.

Documentation and an FAQ (small - work in progress) are available in English only.

Note
this module is based on the idea of the old Register module for Moode 1.x, but it is not an update of this module.
You cannot upgrade or restore Register data from Moodle 1.9 using this Attendance Register module.

Please note that this module is not related to Attendance module
Attendance Register (this module) automatically calculates time spent online in Moodle's courses, while Attendance module allow teacher to explicitly certify attendance to a specific "offline" session.


Important note about Moodle >2.7  compatibility

The newest version of this plugin supports the new logging system introduced by Moodle 2.7


Potential privacy issues

By modifying default Roles Capabilities, you may allow some monitoring of other users activities, beyond normal Moodle's restrictions (i.e. only Teachers, Manager and Admin may see other user's reports)

Screenshots

Screenshot #0
Screenshot #1

Contributors

CINECA elearning SUPPORT (Lead maintainer)
Lorenzo Nicora: Original author
Please login to view contributors details and/or to contact them

Comments RSS

Comments

  • Lorenzo Nicora
    Tue, 2 Apr 2013, 12:51 PM
    Hi Sven;
    You should be able to make module translation in German without any problem.
    Every message or string is taken form Moodle translation system. Nothing is hardwired.

    You should translate all strings in module's language file.

    Strings you can't find in this file are taken from general Moodle translations ("All" is an example). You should do nothing with them. They are automatically translated if you install German language pack and switch user (or site default) language.

    About date/time formatting, everything is done using Moodle's internal formatting functions, that format date/time based on site/user language.
    So, you have nothing to do to translate it too.

    If you are successful translating the module in German, please share the translation file. I'll be glad to include in the distribution.
    Thanks
  • Todd Thornton
    Mon, 22 Apr 2013, 12:15 AM
    Lorenzo,

    This is probably a very stupid question, but can you confirm something for me as I'm still trying to track down the redirect issue on my server? In my new install the final part of the URL for the attendance register page is /view.php/?id=

    There's a / after .php. In my old install of register on 1.9 there's just /view.php?id= and in almost every resource I've seen it's just .php?id=.

    Can you confirm the / should never exist? I'm assuming (for whatever reason) the / is being added by something else and causing my problem, but I don't know for sure hence the question.

    Thanks,

    Todd
  • Lorenzo Nicora
    Fri, 26 Apr 2013, 3:59 PM
    Hi Todd
    No "/" should exist after any .php in any Moodle URL.
    You problably have an url-rewrite issue. This is not related to a specific module.
    Does Worpress use url-rewriting for SEO? Isn't it messing up Moodle 's URL?
    I don't use Wordpress, so I'm just guessing.


  • Todd Thornton
    Sat, 27 Apr 2013, 12:42 AM
    No, it's not messing anything else up in Moodle except with your plugin results page. I do use SEO plugins on Wordpress, but even after disabling everything I still couldn't get it to work. It must be some bizarre problem with my particular setup as nobody else seems to have the problem. smile

    I'm using the latest version of Moodle so I went ahead and switched to the use stats block/training sessions reporting combo so I was able to show regulators I could do what they wanted via time tracking, but thanks for all your help.

    Your plugin in the 1.9 series has been a huge help to me over the past several years providing reports that I'm required to submit for regulated courses.
  • Gary Moncrieff
    Sat, 11 May 2013, 2:21 AM
    Strange this wont deploy via adminpanel,

    exception 'download_file_exception' with message 'Unable to download the package' in mdeploy.php:726
    Stack trace:
    #0 mdeploy.php(1390): worker->execute()
    #1 {main}
  • Lorenzo Nicora
    Tue, 14 May 2013, 2:05 PM
    Hi Gary,
    I don't use AdminPanel so I've no hint, but an "unable to download" error sounds like a problem related to the site you are downloading from (Moodle site)
  • Sandy Fowler
    Thu, 16 May 2013, 8:55 AM
    I am trying to determine if this plug in will meet our needs. We are required to post online attendance per day, per student. Will this plugin give us the total attendance hours per student per date. For instance:

    5/15/13 5/16/13
    Jane smith .024 hrs 4.32 hrs
    Miguel Flores 1.23 hrs 0.00 hrs

    If not can it be used as a tool to obtain this information? Other options??
  • Lorenzo Nicora
    Thu, 16 May 2013, 2:47 PM
    Hi Sandy,
    this module calculate and show time online per session of work, not per day.
    You could modify it with some PHP coding to sum sessions by day and changing in the way of displaying data (the work isn't negligible).
    An alternative method, requiring SQL but no PHP coding, could be writing a custom report based on data generated by this module.
  • Graham Moir
    Thu, 13 June 2013, 1:16 AM
    Hi Lorenzo - any news on a 2.5 version?
    thanks
  • Graham Moir
    Thu, 13 June 2013, 1:16 AM
    Hi Lorenzo - any news on a 2.5 version?
    thanks
  • Lorenzo Nicora
    Thu, 13 June 2013, 2:49 PM
    Hi Graham,
    I've no short-term schedule for testing/porting the module to 2.5
    Actually, it is possible it works without any change.
    But I've no time to test it extensively by now, sorry.

    If you'll try it on 2.5 (maybe not on a Production installation smile ) , a report about working or any specific error will be very appreciated smile
  • koe santa
    Thu, 20 June 2013, 12:03 PM
    Dear Lorenzo,
    I've used AttendanceRegister module on moodle 2.3, it's ok for me but now I want to show ID Number of students into reports. How I can do?
    thanks
  • Lorenzo Nicora
    Thu, 20 June 2013, 1:09 PM
    Hi Koe,
    you can do it with some PHP coding ;)

    The table of users is generated by html_table() function in attendanceregister_tracked_users.class.php.
    This function iterates the tracked users. You should be able to show any user's info without modifying anything else.
  • koe santa
    Fri, 21 June 2013, 10:46 AM
    Hi Lorenzo,
    I did it already thank you for your instruction. I modified 2 files first is attendanceregister_tracked_users.class.php and the second one is lang/en/attendanceregister.php.

    In the first file I add some code in function html_table() please see below
    # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
    public function html_table() {
    global $OUTPUT, $doShowPrintableVersion;

    $strNotAvail = get_string('notavailable');

    $table = new html_table();
    $table->attributes['class'] .= ' attendanceregister_userlist';

    /// Header

    $table->head = array(
    get_string('count', 'attendanceregister'),

    // # # # Koe add column idnumber in header # # #
    get_string('idnumber', 'attendanceregister'),

    get_string('fullname', 'attendanceregister'),
    get_string('total_time_online', 'attendanceregister'),
    );
    // # # # Koe add header alignment in a new column and comment the old code # # # //
    $table->align = array('left','center', 'left', 'right');
    //$table->align = array('left', 'left', 'right');

    if ( $this->register->offlinesessions ) {
    $table->head[] = get_string('total_time_offline', 'attendanceregister');
    $table->align[] = 'right';
    $table->head[] = get_string('grandtotal_time', 'attendanceregister');
    $table->align[] = 'right';
    }

    $table->head[] = get_string('last_session_logout', 'attendanceregister');
    $table->align[] = 'left';


    /// Table Rows

    if( $this->users ) {
    $rowcount = 0;
    foreach ($this->users as $user) {
    $rowcount++;

    $userAggregate = null;
    if ( isset( $this->usersSummaryAggregates[$user->id] ) ) {
    $userAggregate = $this->usersSummaryAggregates[$user->id];
    }

    // Basic columns
    $linkUrl = attendanceregister_makeUrl($this->register, $user->id);

    // # # # Koe add data in a new column # # # //
    $idnumberWithLink = '' . $user->idnumber . '';

    $fullnameWithLink = '' . fullname($user) . '';
    $onlineDuration = ($userAggregate)?( $userAggregate->onlineTotalDuration )sad null );
    $onlineDurationStr = attendanceregister_format_duration($onlineDuration );

    // # # # Koe add data in a new column and comment the old code # # # //
    $tableRow = new html_table_row( array( $rowcount, $idnumberWithLink, $fullnameWithLink, $onlineDurationStr ) );
    //$tableRow = new html_table_row( array( $rowcount, $fullnameWithLink, $onlineDurationStr ) );

    // Add class for zebra stripes
    $tableRow->attributes['class'] .= ( ($rowcount % 2)?' attendanceregister_oddrow':' attendanceregister_evenrow' );

    // Optional columns
    if ( $this->register->offlinesessions ) {
    $offlineDuration = ($userAggregate)?($userAggregate->offlineTotalDuration)sad null );
    $offlineDurationStr = attendanceregister_format_duration($offlineDuration);
    $tableCell = new html_table_cell( $offlineDurationStr );
    $tableRow->cells[] = $tableCell;

    $grandtotalDuration = ($userAggregate)?($userAggregate->grandTotalDuration )sad null );
    $grandtotalDurationStr = attendanceregister_format_duration($grandtotalDuration);
    $tableCell = new html_table_cell( $grandtotalDurationStr );
    $tableRow->cells[] = $tableCell;
    }

    $lastSessionLogoutStr = ($userAggregate)?( attendanceregister__formatDateTime( $userAggregate->lastSassionLogout ) )sad get_string('no_session','attendanceregister') );
    $tableCell = new html_table_cell( $lastSessionLogoutStr );
    $tableRow->cells[] = $tableCell;

    $table->data[] = $tableRow;
    }
    } else {
    // No User
    $row = new html_table_row();
    $labelCell = new html_table_cell();
    $labelCell->colspan = count($table->head);
    $labelCell->text = get_string('no_tracked_user', 'attendanceregister');
    $row->cells[] = $labelCell;
    $table->data[] = $row;
    }

    return $table;
    }
    }

    In file attendanceregister.php I add a new constant $string['idnumber'] = 'ID Number'; for show header column in a report.

    Thank you for your advice :D
    Koe
  • Leonardo Montenegro
    Tue, 25 June 2013, 4:45 AM
    Hello Lorenzo

    I am running Moodle 2.4.3 (Build: 20130318). I wonder if it is possible to install your plugin. Could you please clue me in on this? Thanks Leonardo
Please login to post comments