TimeStat: track student presence in your Moodle by the second

--- Advertisement ---

Post Pages - Post Inline - WIRIS

TimeStat is a cool module that Frankie Kam suggested we give a go.  The module tallies and reports total seconds and minutes that students have been in a course. It’s great for tracking overall usage and gives a little better information than just click tallies and page views.

While the installation process was a little more involved than just installing a block the readme file was clear and concise:

1. Copy files ‘ajax_connection.js’, ‘timestatlib.php’, ‘timestatscript.js’ to folder ‘/moodle/lib’

2. Add one line of code in file weblib.php:


so it should look like:

function print_footer($course=NULL, $usercourse=NULL, $return=false) {
           global $USER, $CFG, $THEME, $COURSE;

3. Folder ‘timestat’ contains Moodle block which is installed in standard way.

The hardest part is navigating/editing the weblib.php, heres a screenshot of what it looked like after I added the necessary line of code:

Once the block and other files are installed, just open your Moodle as Admin and click notifications to have the block installed properly.  Now that it’s available, add the block to any course

and instantly you have an easy way to track student usage in seconds and minutes.  Pretty handy!

You can even track by individual resource/activity.

For more information or to download the plugin/addon visit

Timestat was added to the Plugin Repository by Łukasz Sanokowski.

2 Responses

  1. Thanks for promoting this block. It had escaped my notice until I came here via Frankie’s durian powered blog. I’m a bit perplexed, however.

    You say, “1. Copy files ‘ajax_connection.js’, ‘timestatlib.php’, ‘timestatscript.js’ to folder ‘/moodle/lib’”

    However, there is nothing in the readme.txt file in the timestat block to warrant this. There are only two steps in the installation of timestat. To quote the readme file, it says,” Installation guide:

    1) Install block in standard way (copy it to ‘/moodle/blocks’ folder and
    click ‘Notifications’ in admin panel)

    2) Add one line of code in file weblib.php:


    There is nothing about installing additional files to moodle/lib. The block seems to be working in my 1.9.12 Moodle. Have I missed something?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

The Latest

The eLearn Podcast

--- Advertisement ---

Post Pages - Sidebar 4 - CourseMerchant

--- Advertisement ---

Post Pages - Sidebar 7 - Titus Learning

--- Advertisement ---

Post Pages - Sidebar 5 - Edwiser (RemUI)

Subscribe to our newsletter

Education technology has the power to change lives. 

To get the latest news, information and resources about online learning from around the world by clicking on the button below.