Compile discussions

Blocks ::: block_compile_discussions
Maintained by Steve Bond
This block will list all the forums and advanced forums in a course, in two drop-down menus. Selection of a forum from the menu will display all discussions in that forum, in nested layout, on a single page. This can be convenient for printing.
Latest release:
9 sites
2 downloads
3 fans
Current versions available: 1

This block allows a user to display all discussions in a forum on a single page, which can be printed out or archived.

The block displays drop-down menus listing all forums and advanced forums. Selection of a forum from the menu outputs the single-page display.

The discussions and posts are shown in nested format. Any attached files are shown as links on the page. Inline images are rendered.

Potential privacy issues

None

Screenshots

Screenshot #0
Screenshot #1

Contributors

Steve Bond (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Rex Lorenzo
    Wed, 17 Dec 2014, 6:17 AM
    Some code review comments:

    1) Should use lang strings for string output of Discussion and Forum titles in compile.php.
    2) In compile.php, consider using html_writer for HTML tags.
    3) In compile.php use the Moodle core library call userdate() instead of strftime to support if a system is using a different calendar system.
    4) Also, the use of exit in compile.php doesn't look right and is unnecessary. Should also add a function phpdoc for get_children(), but that is just a nicety.
    5) I'm worried that there is no limit to how many posts/discussions are compiled. Maybe have a config setting to control how many forum posts/discussions are compiled? Or use the existing $CFG-> forum_manydiscussions setting?
    6) Do the results change that much or are different by each user? Maybe cache the results and have a cron that updates the compiled output? That is what the recent activity block does. See https://github.com/moodle/moodle/tree/master/blocks/recent_activity
  • Steve Bond
    Wed, 17 Dec 2014, 5:09 PM
    Hi Rex,
    Thanks for these notes, very useful. I'm only an occasional developer so I often fall behind or forget how to do stuff right, so it's good to get feedback. I'll make some improvements when I get a chance.

    I'm not sure what the answer is to #5 - some sort of paging I suppose, if the page gets too long.
  • David Mudrák
    Fri, 19 Dec 2014, 7:03 AM
    Thanks Steve for this contribution, and thanks Rex for peer-reviewing it. I spotted yet another things you may want to look at and reported them as issues #1 and #2 in your bug tracker.

    With the hope the raised issues will be addressed in future updates of your block, you are cleared to land now. Welcome to the Plugins directory!
  • Phil Rogers
    Wed, 18 Nov 2015, 6:02 PM
    Is there any plans to bring out a version for 2.7? It would be greatly appreciated!

    Regards,

    Phil
  • Steve Bond
    Fri, 27 Nov 2015, 6:08 PM
    Hi Phil,
    Actually the 2,6 version still works fine in 2.7. We've got it installed and working in 2.7.11 here. I'll branch it and add a new version here when I get a minute.
  • Mark Chaney
    Mon, 4 Jan 2016, 4:00 PM
    Hi Steve,

    Are there any plans to upgrade this plugin for Moodle 3?

    Thanks

    Mark
  • Steve Bond
    Tue, 5 Jan 2016, 7:24 PM
    Hi Mark,

    At some point soon I will need to upgrade this to 2.7 and 2.9 for use at my institution, but I don't think there will be a 3.0 version any time soon. Of course, the code might well work in 3.0 anyway.
Please login to post comments