Created
September 29, 2011 09:14
-
-
Save wheresalice/1250366 to your computer and use it in GitHub Desktop.
Show the number of unique users using a Moodle website in blocks of 15 minutes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre> | |
<?php | |
require_once('config.php'); | |
$sql = 'SELECT time/(15*60), COUNT(DISTINCT userid) FROM mdl_log | |
GROUP BY time/(15*60)'; | |
print_r(recordset_to_array(get_recordset_sql($sql))); | |
?> | |
</pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment