Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403]

This file contains main class for the course format Social

Copyright: 2009 Sam Hemelryk
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 149 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: format_social  - X-Ref

Main class for the Social course format

get_view_url($section, $options = array()   X-Ref
The URL to use for the specified course

param: int|stdClass $section Section object from database or just field course_sections.section
param: array $options options for view URL. At the moment core uses:
return: null|moodle_url

extend_course_navigation($navigation, navigation_node $node)   X-Ref
Loads all of the course sections into the navigation

param: global_navigation $navigation
param: navigation_node $node The course node within the navigation

get_default_blocks()   X-Ref
Returns the list of blocks to be automatically added for the newly created course

return: array of default blocks, must contain two keys BLOCK_POS_LEFT and BLOCK_POS_RIGHT

course_format_options($foreditform = false)   X-Ref
Definitions of the additional options that this course format uses for course

social format uses the following options:
- numdiscussions

param: bool $foreditform
return: array of options

allow_stealth_module_visibility($cm, $section)   X-Ref
Returns whether this course format allows the activity to
have "triple visibility state" - visible always, hidden on course page but available, hidden.

param: stdClass|cm_info $cm course module (may be null if we are displaying a form for adding a module)
param: stdClass|section_info $section section where this module is located or will be added to
return: bool

get_config_for_external()   X-Ref
Return the plugin configs for external functions.

return: array the list of configuration settings

supports_ajax()   X-Ref
Returns the information about the ajax support in the given source format.

The returned object's property (boolean)capable indicates that
the course format supports Moodle course ajax features.

return: stdClass