Your Moodle version

Reports: Forum Graph

report_forumgraph
Maintained by Picture of Andy Chan Andy Chan
The Forum Graph Report analyse interactions in a single Forum activity and create a force-directed graph using the D3.js Javascript library.
822

=ABOUT=
The Forum Graph Report analyse interactions in a single Forum activity and create a force-directed graph with the following features:
- Each node is a single user (node size depends on the no. of posts by the user).
- Each edge represent the interaction between 2 users (i.e. a user replied to another user post). Thickness indicating the no. of replies and arrow indicating who was repling.
- Force layout with draggable node.
- Two different node colours for teachers and students.
- Button to toggle the display of node label (user full name).
- Tooltip showing user full name, no. of discussions and no. of replies when rollovering node.
- Click on a node and a new window will popup showing the log (report_log in core Moodle) of the user posting/replying activities in the forum.
- A table summarising the total no. of discussions and replies in the forum, as well as the top three user who post the most.

=REMARKS=
The implementation of this report is in its early stage and it may have problems when it is installed in your Moodle. It was tested in Moodle 2.6.1 (as of Feb 2014) but it should work on Moodle 2.x envirnoment in general.

One known problem is that courses not in any course categories cannot be selected now.

Export graph as PDF/PNG is not supported now, it can only be saved as SVG file using browsers like Google Chrome.

=CREDITS=
Andy Chan <ctchan.andy@gmail.com>, Programmer, CITE (http://www.cite.hku.hk)

=LINKS=
D3.js http://d3js.org/
Force Layout https://github.com/mbostock/d3/wiki/Force-Layout

Screenshots

Screenshot
Screenshot

Contributors

Picture of Andy Chan
Andy Chan (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Anthony Borrow
    Fri, Sep 13, 2013, 1:35 PM
    Andy,

    Many thanks for sharing this plugin with the Moodle community. I noticed that there were a couple of minor validation errors in the version.php which I would ask you to fix up. Specifically,

    Maturity information ($plugin->maturity) not found in version.php
    Release name ($plugin->release) not found in version.php

    If you need more information about these variables you can read about them at http://docs.moodle.org/dev/version.php. Since you mention that there are likely some errors, I would suggest MATURITY_ALPHA. I would also recommend creating a documentation page in Moodle Docs. You may find it helpful to review http://docs.moodle.org/en/Development:Guidelines_for_contributed_code for some suggestions about that.

    In testing the code, I noticed a number of PHP warnings and notices that you will want to look at. I recommend testing your code with debugging mode set to show ALL PHP warnings and notices. Here are some of the ones that I noticed:

    Notice: Undefined variable: i in /var/www/m24/report/forumgraph/lib.php on line 79

    Warning: Creating default object from empty value in /var/www/m24/report/forumgraph/lib.php on line 79

    Notice: Undefined variable: i in /var/www/m24/report/forumgraph/lib.php on line 83

    Notice: Undefined offset: 1 in /var/www/m24/report/forumgraph/index.php on line 110

    Notice: Undefined variable: cm in /var/www/m24/report/forumgraph/index.php on line 243

    Notice: Trying to get property of non-object in /var/www/m24/report/forumgraph/index.php on line 243

    Notice: Undefined variable: replies_count in /var/www/m24/report/forumgraph/index.php on line 221

    Overall, the plugin installs well and seems to work even with the PHP warnings and notices. Hopefully you will find others willing to help you test and improve upon the good work that you have started. I'm going to go ahead and approve the plugin but do not hesitate to let me know if you have any questions or if I can be of any help.

    Peace - Anthony
  • Anthony Borrow
    Fri, Sep 13, 2013, 1:35 PM
    p.s. - After creating the documentation, please add the URL to the plugin entry under external documentation
  • Picture of Andy Chan
    Mon, Sep 16, 2013, 12:54 PM
    Thanks for your detail comment Anthony, I updated my plugin and hopefully it works better now.
  • Anthony Borrow
    Mon, Sep 16, 2013, 10:18 PM
    Andy - You may also want to test on Moodle 2.5 and if it works OK then you can mark the version as being for both 2.4 and 2.5. In Moodle 2.5, folks can install to their site directly from the Moodle plugins page. Peace - Anthony
  • Picture of Arturo Formariz
    Fri, Feb 21, 2014, 4:42 PM
    Thanks for this great plugin.

    I´ve tried it in 2.6 and it doesn´t work.

    I´ll be great if you could upgrade the plugin for work in 2.6.

    Thanks for your work.

    Regards
  • Picture of Andy Chan
    Mon, Feb 24, 2014, 2:59 PM
    Arturo: Thanks for reporting the problem, I updated the plugin and it should work in 2.6.
  • Picture of Arturo Formariz
    Wed, Feb 26, 2014, 10:41 PM
    Hi Andy.

    Still with problems with the new download.

    When I go to notificatios to install the plugin, the name of the plugin is not displayed. Anyway I try to install and I get the following errors at the beginning of the page:

    Invalid get_string() identifier: 'modulename' or component 'mod_forumgraph'. Perhaps you are missing $string['modulename'] = ''; in mod/forumgraph/lang/en/forumgraph.php?
    line 293 of /lib/classes/string_manager_standard.php: call to debugging()
    line 6831 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
    line 64 of /lib/classes/plugininfo/mod.php: call to get_string()
    line 131 of /lib/classes/plugininfo/base.php: call to core\plugininfo\mod->init_display_name()
    line 88 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base::make_plugin_instance()
    line 368 of /lib/classes/plugin_manager.php: call to core\plugininfo\base::get_plugins()
    line 33 of /admin/settings/plugins.php: call to core_plugin_manager->get_plugins_of_type()
    line 6389 of /lib/adminlib.php: call to require()
    line 3518 of /lib/navigationlib.php: call to admin_get_root()
    line 3375 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
    line 717 of /lib/pagelib.php: call to settings_navigation->initialise()
    line 734 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
    line 109 of /blocks/admin_bookmarks/block_admin_bookmarks.php: call to moodle_page->__get()
    line 296 of /blocks/moodleblock.class.php: call to block_admin_bookmarks->get_content()
    line 238 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
    line 956 of /lib/blocklib.php: call to block_base->get_content_for_output()
    line 1008 of /lib/blocklib.php: call to block_manager->create_block_contents()
    line 361 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
    line 48 of /theme/essential/layout/columns2.php: call to core_renderer->standard_head_html()
    line 870 of /lib/outputrenderers.php: call to include()
    line 800 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
    line 2568 of /lib/outputrenderers.php: call to core_renderer->header()
    line 362 of /lib/setuplib.php: call to core_renderer->fatal_error()
    line 1158 of /lib/upgradelib.php: call to default_exception_handler()
    line 1596 of /lib/upgradelib.php: call to upgrade_handle_exception()
    line 431 of /admin/index.php: call to upgrade_noncore()

    And this one in the main page:

    The extension "mod_forumgraph" is installed a wrong location "$ CFG-> dirroot / mod / forumgraph", the planned location is ""

    Debug info:
    Error code: detectedmisplacedplugin
    Stack trace:
    line 583 of /lib/upgradelib.php: plugin_misplaced_exception thrown
    line 395 of /lib/upgradelib.php: call to upgrade_plugins_modules()
    line 1584 of /lib/upgradelib.php: call to upgrade_plugins()
    line 431 of /admin/index.php: call to upgrade_noncore()



    Thanks a lot!
  • Picture of Andy Chan
    Thu, Feb 27, 2014, 9:43 AM
    Arturo: Have you installed it in the /mod folder? It is a report (report_forumgraph) and thus should be put inside the /report folder.
  • Picture of Stergios Tsimakis
    Tue, Mar 25, 2014, 4:09 AM
    Mr. Andy Chan

    Forum graph is installed on my PC with the following configuration:

    Ubuntu 12.04
    Apache2 2.4.22
    PHP 5.5.9 - Zend OPcache v7.0.3
    moodle 2.6.1
    report_forumgraph_moodle26_2014022400.zip

    Problems that appear:

    1. Courses disappear in short time

    2. Graphs are not displayed

    3.
    When clicking on “User with most posts” send :
    Not Found
    The requested URL /report/log/index.php was not found on this server.
    Apache/2.4.7 (Ubuntu) Server at 192.168.1.50 Port 80

    Thanks for your help.
  • Picture of Andreas Panagiotopoulos
    Mon, Apr 14, 2014, 4:07 PM
    Thank you Andy for this grate plugin.

    How can we export graph to SVG?
  • Matt Bury
    Tue, Apr 29, 2014, 4:39 AM
    Hi Andy, thanks for contributing this. It looks really promising.

    I've successfully installed it on Moodle 2.6.2 on a LAMP stack (Ubuntu Linux). When I look at the reports page, I get text summaries of the selected Forum module instances but no graphs.

    Also, when I click on user names, I get a 404 error: "The requested URL /report/log/index.php was not found on this server."

    I hope this helps! smile
  • Picture of Carl Thelen
    Tue, Apr 29, 2014, 9:02 AM
    Does this work for the Advanced Forums module?
  • Picture of Andy Chan
    Tue, Apr 29, 2014, 10:57 AM
    Thanks all for your questions, here my replies:

    1. The graph do display in my own Moodle using Google Chrome, if you can see the summaries (e.g. top 3 posters), the selected forum should be normal. If possible, please turn on debug message and send me the screen capture.

    2. The "/report/log/index.php" was a bug because I did not use absolute path to link to the log report. If your Moodle installation is not at a sub domain but under a folder, it cause a 404 error. It should now be fixed, please download the new version.

    3. I found that Google Chrome no longer let me save the graph as SVG (the save as image option no longer available when right clicking). Currently I did not have a solution yet.
  • Picture of Andy Chan
    Tue, Apr 29, 2014, 10:58 AM
    Carl: No, this report only work with the core forum module.
  • Picture of Paulo Machado
    Sun, Nov 9, 2014, 10:33 AM
    I have a problem:
    if i login with "administrator" this report is correct, but if i login with a "teacher" i receive information "... don't have permission to execute this operation View forum graph"
    Can you help me?
Please login to post comments