Blocks: Statistics (Graph Stats)

block_graph_stats
Maintained by Picture of Éric Bugnet Éric Bugnet, Picture of Vadim Dvorovenko Vadim Dvorovenko
Little graph with visitors statistics
644 sites
401 downloads
16 fans

This block allow you to view a little graph in your Moodle 2.x with visitors statistics.
This is the evolution of the Graph_Stats block.


In first page, it shows visitors (unique and multi), with details of user and course count.

In course, it shows visitor to the course only.

People with the coursereport/log:view capacity can see a simple page wich show who was connected today, and a link for the course reports of the day. 

 

You can define :

  • size
  • colors
  • style
  • number of days to shown

With help of some of you, some translation are already (partially) complete : thanks !

Screenshots

Screenshot #0

Contributors

Picture of Éric Bugnet
Éric Bugnet (Lead maintainer): Dev
Picture of Vadim Dvorovenko
Vadim Dvorovenko: Maintainer
Picture of Jean FRUITET
Jean FRUITET: Helper for Moodle 2 transition
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Jean FRUITET
    Thu, 17 Apr 2014, 5:27 AM
    A few corrections needed in detail.php

    Line 44 : change $context = get_context_instance(CONTEXT_COURSE, $course_id); to $context = context_course::instance($course_id);
    Line 53, change if (has_capability('coursereport/log:view', $context)) { to if (has_capability('report/log:view', $context)) {
    Line 55, change echo '<a href="'.$CFG->wwwroot.'/course/report/log/index.php?chooselog=1 ... to echo '<a href="'.$CFG->wwwroot.'/report/log/index.php?chooselog=1 ...
    By the way, the block graph_stats for Moodle 2.6 will work fine for Moodle 2.5
  • Picture of Wesley Ellis
    Thu, 17 Apr 2014, 10:32 PM
    I have updated the git repos with your changes Jean, made things easier. I have also started running the block through the code checker but this will take a while. I am happy to maintain this block is somebody would like to add my repo to the source list.

    https://github.com/wezley98/graph_stats
  • Picture of Wesley Ellis
    Thu, 24 Apr 2014, 11:49 PM
    Updated my repo with a new beta release. Main improvements:

    - Removed Moodle graphing
    - Graph is now 100% width (Responsive)
    - Changed settings for colours to colour pickers (Can now choose hex codes for graph colours)
    - Optimized code + tidy up
    - Corrected code using Moodle Code Checker

    Avaiable here: https://github.com/wezley98/graph_stats
  • rui
    Thu, 24 Jul 2014, 12:58 AM
    Apparently, Wesley's version isn't yet working with moodle 2.7
    I upgraded to 2.7 and graph_stats stopped seeing the user entries. It still reports the previous entries, but none since the core upgrade. Does anyone have a solution?
    Thanks
  • Picture of Mario Wehr
    Thu, 24 Jul 2014, 4:52 AM
    Hi,

    I updated Wesleys repo with 2.7 compatible log calls.
    This version should work with pre and post 2.7 Moodles.

    Feel free to test it.

    Repo: https://github.com/mwehr/graph_stats
  • Picture of Vadim Dvorovenko
    Fri, 25 Jul 2014, 4:31 PM
    Mario Wehr, we were doing the same things ..
    Please take a look at https://github.com/vadimonus/moodle-block_graph_stats
    It works only with moodle 2.7+ (for older versions please use version by Wesley Ellis), but have some code improvements.
  • Picture of Jean FRUITET
    Mon, 28 Jul 2014, 4:00 PM
    Hi Vadim, tanx a lot for these improvements.
    Can you please add all languages strings to your version ?
    https://github.com/jfruitet/block_graph_stats_m24/tree/master/lang

    Regards.
    Jean.
  • Picture of Vadim Dvorovenko
    Thu, 31 Jul 2014, 2:41 AM
    Yes, Jean, l have added them. But, i'm not shure it's right way.
    These langpacks are old, they have unused strings and does not have some new strings, added by Wesley Ellis (uniquevisitors). I've deleted unused strings, but i cannot add missing.
    Currently translation for all modules in Moodle plugins repository are maintained via AMOS (lang.moodle.org). Translation, made via AMOS (and downloaded with langpack) takes precedence over version in plugin's directory. So it's not needed any more to add translations to plugin. But for AMOS it is needed, that new version is uploaded to moodle Plugins directory. (http://lang.moodle.org/mod/forum/discuss.php?d=2485)
    Only the maintainer (Éric Bugnet) can do so. If it's not possible to contact him to update version here, or ask him to transfer plugin to other maintainer, we should create alternate plugin record (e.g. graph_stats2)
  • RabNawaz
    Thu, 18 Feb 2016, 4:16 PM
    Hello everyone
    I have started using this block on my site (lms.iba-suk.edu.pk) and it works fine. It shows the Sats only on the homepage, Will it work for course page ? Teacher should know the traffic on its course. How to do that ?
  • Picture of Vadim Dvorovenko
    Thu, 18 Feb 2016, 10:20 PM
    Yes, it will. Place block on course page, it will count page views
  • RabNawaz
    Fri, 19 Feb 2016, 3:00 AM
    Thanks Vadim.
  • Picture of Frankle Lee 李智高
    Thu, 31 Mar 2016, 3:02 AM
    Hi, I just tried to setup this useful plugin on my moodle2.92. One problem is that I am now using this in China and we could not access google thus the google related api service is not available. We have an alternative for the google api and I changed the line into , It is ok but I could not have an alternative for this line .
    So any suggestions for this ?
  • Picture of Vadim Dvorovenko
    Fri, 1 Apr 2016, 12:42 AM
    Hello, Frankle Lee 李智高. As far as i can inderstand useso.com does not provide alternative for google.com/uds. It's not the only such request from china, but currently i cannot find good opensourse javascript library for charts, which works as good as google.
  • Picture of s zed
    Mon, 10 Oct 2016, 6:07 PM
    Bonjour, Je viens d'installer ce bloc mais je ne peux l'afficher que dans les cours et pas sur la page d'accueil. (Je suis en version 3.1). De plus, dans les cours, je n'ai que le nombre d'utilisateurs par jours, aucunes données sur les connexions. D’où cela peut-il venir? Merci d'avance.
  • Picture of Arnaud TROUVE
    Fri, 14 Oct 2016, 6:40 AM
    English version below ;)

    Bonjour s zed, en effet il y a une configuration qui empêche de placer ce bloc sur la dashboard.
    En juin j'ai effectué une pull request sur github pour corriger cela mais c'est toujours en attente d'intégration. (https://github.com/vadimonus/moodle-block_graph_stats/pull/1)
    En gros il faut appliquer ce commit (https://github.com/vadimonus/moodle-block_graph_stats/pull/1/commits/5fe6b6e992a4a943c944bce926154765b8cbda16) sur ton fichier block_graph_stats.php

    Concernant les connexions en fait la requête exécutée lorsque l'on est dans un cours ne gère pas les accès multiples pour un même utilisateur. Je verrai pour fournir un patch quand j'aurai un peu de temps.

    ===================================
    To sum up s zed ask :
    - why he can not add this block to the dashboard. As i faced same issue on june i made reference to a related PR i opened.
    - why there is only distinct course viewed display on the graph when you are in a course. As you can see the query (https://github.com/vadimonus/moodle-block_graph_stats/blob/master/locallib.php#L70) count only distinct user course_viewed event even if we have checked block_graph_stats|multi in config. I'll try to provide a patch when i'll have freetime.
1 2
Please login to post comments