Blocks ::: block_section
Maintained by Arnaud Trouvé, Logo andilAndil Technologies de l'information et de la formation
The Section block displays the contents of a course section as a block.
Latest release:
43 sites
7 fans
Moodle 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11

The Section block displays the contents of a course section as a block.

The section displayed and the block title are configurable per instance.
The block is hidden when the specified section does not exist.

The latest version can display sections from other courses.


Screenshot #0
Screenshot #1


Arnaud Trouvé (Lead maintainer)
Logo andil
Andil Technologies de l'information et de la formation
Nathan Robbins: Original maintainer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Just wondering . . .
    Wed, Aug 29, 2012, 7:48 AM
    Any chance of a screen shot?
  • Just wondering . . .
    Sat, Nov 3, 2012, 11:23 AM
    Having another look at this. I'm not exactly sure of the purpose of this block. Does it show just the contents of the current section in single section view, or one particular section on every view??
    What is the meaning of "contents"? Does a label get displayed?
    I'm intrigued by the comment "The latest version can display sections from other courses" Could we have a section that has qualification information linked to in this block on every course in the qual?
    Is there somewhere in the universe where this block is, and I could see it in action?

  • Mon, Nov 5, 2012, 9:23 PM
    My main reason for creating the block was to display the activities and resources from a section of one course on the page of another course. The activities and resources, including labels, appear exactly as they would in the original section (though long text will wrap due to the narrow width of blocks). This can be used to display a common activity in a meta-course on the child courses, child-course sections in a meta-course page, or forums from a site-wide community discussion course.

    What do you mean by qualification information? I am not familiar with that term in this context.

    Unfortunately, I don't have a public example. Most of my work is done for employee education within my company.
  • My Hero
    Tue, Feb 25, 2014, 10:33 AM

    Any chance of having this block upgraded to work in moodle 2.6? When editing is turned on I get the error:

    Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
    Debug info: Argument 1 passed to make_editing_buttons() must be an instance of stdClass, instance of cm_info given, called in [dirroot]/blocks/section/block_section.php on line 154 and defined
    Error code: codingerror
    Stack trace:

    line 393 of /lib/setuplib.php: coding_exception thrown
    line 2419 of /lib/deprecatedlib.php: call to default_error_handler()
    line 154 of /blocks/section/block_section.php: call to make_editing_buttons()
    line 775 of /blocks/moodleblock.class.php: call to block_section->get_content()
    line 238 of /blocks/moodleblock.class.php: call to block_list->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 353 of /lib/blocklib.php: call to block_manager->ensure_content_created()
    line 6 of /theme/canvas/layout/general.php: call to block_manager->region_has_content()
    line 870 of /lib/outputrenderers.php: call to include()
    line 800 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
    line 252 of /course/view.php: call to core_renderer->header()

  • My Hero
    Tue, Feb 25, 2014, 10:48 AM
    As a dirty hack, I commented out line 154 and the error is gone. I am positive there is a better way to do this, but I hope there aren't any adverse effects.
  • Mon, Dec 2, 2019, 10:08 PM
    Hi Nathan,

    I forked your repo and done some changes to make it compatible with recent moodle versions. (
    It seems you are not longer maintaining it, so I'd like to adopt it.
    If you are OK with this could you change the repository ownership and add me as maintainer in the Moodle plugin DB please ?

    Arnaud Trouvé
  • Tue, Jan 7, 2020, 12:36 AM
    Thanks David Mudrák for setting me as maintainer and Thanks Nathan for the original work on this plugin !

    As explained in my previous message I have updated the plugin to work with recent moodle versions (tested on Moodle 3.5 and 3.8).
    It can be find at :
    I'll try to do a proper release ASAP.
Please login to post comments