Your Moodle version

Blocks: Section

block_section
Maintained by Picture of Nathan Robbins Nathan Robbins
The Section block displays the contents of a course section as a block.
Moodle 2.1, 2.2, 2.3

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.

Screenshots

Screenshot
Screenshot

Contributors

Picture of Nathan Robbins
Nathan Robbins (Lead 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?
    -Derek
  • 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?

    -Derek
  • Picture of Nathan Robbins
    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
    Hi,

    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()

    Thanks,
    Paul
  • 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.
Please login to post comments