Forum Graph

Reports ::: report_forumgraph
Maintained by 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.
Latest release:
171 sites
22 fans
Current versions available: 2

Forum Graph Report for Moodle



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.


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 3.1.1 as of mid-August 2016.

One known problem is that courses not in any course categories cannot be selected now. Also it may not work on large forum with lots of posts.

Export graph as image/document is not supported now, but the graph itself is a <svg> HTML tag in the source code so it is possible to save it using some brower extensions or bookmarklets.


Developer: Andy Chan <>, Programmer, CITE, HKU (


D3.js (Library released under BSD license)

Force Layout


Screenshot #0
Screenshot #1


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

Comments RSS

Show comments
  • Mon, Feb 24, 2014, 2:59 PM
    Arturo: Thanks for reporting the problem, I updated the plugin and it should work in 2.6.
  • 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!
  • 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.
  • 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

    Problems that appear:

    1. Courses disappear in short time

    2. Graphs are not displayed

    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 Port 80

    Thanks for your help.
  • 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
  • Tue, Apr 29, 2014, 9:02 AM
    Does this work for the Advanced Forums module?
  • 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.
  • Tue, Apr 29, 2014, 10:58 AM
    Carl: No, this report only work with the core forum module.
  • 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?
  • the Tallest Man in Western Japan?
    Sun, Apr 10, 2016, 6:17 PM
    Any possibilities of this making it to 2.9 or 3.0?
  • Sat, May 7, 2016, 2:37 PM
    Any possibilities of this making it to 2.9 or 3.0? +1
  • Ricardo Caiado
    Sat, Mar 17, 2018, 10:46 PM

    Any update to Moodle 3.4?

  • Wed, Mar 20, 2019, 5:20 PM
    hi Andy,
    Thank for the plugin. I've just updated my plugin and hope to test it out.
  • Ricardo Caiado
    Fri, Apr 16, 2021, 12:52 AM

    Any update to Moodle 3.10?

1 2
Please login to post comments