Course Tool Plugins
Course tool plugins add new tools to the course homepage alongside built-in tools like Documents, Exercises, and Forums.
How Course Tool Plugins Work
When a plugin registers itself as a course tool:
It appears in the course homepage tool grid
Teachers can show/hide it like any other tool
Clicking the tool opens the plugin's interface within the course context
Registering as a Course Tool
In your plugin class, set $isCoursePlugin = true. To automatically add a tool icon to the course homepage, also set $addCourseTool = true:
class MyToolPlugin extends Plugin
{
protected function __construct()
{
parent::__construct('1.0', 'Author');
$this->isCoursePlugin = true;
$this->addCourseTool = true;
}
}Per-Course Settings
Define course-level configuration fields via the $course_settings property:
These appear in the course settings panel and can be validated by overriding validateCourseSetting(string $variable) (return false to reject a value) or acted on via course_settings_updated(array $values).
Installation and Uninstallation
To register the plugin fields across all existing courses on install:
To install into a single course (e.g., when a new course is created):
To remove fields from a specific course:
Integration Points
Course tool plugins integrate through:
LegacyPluginCourseTool(src/CoreBundle/Tool/LegacyPluginCourseTool.php) — Registers the plugin as a tool in the courseCToolStateProvider(src/CoreBundle/State/CToolStateProvider.php) — Resolves which tools (including plugin tools) appear on the course homepageThe tool appears in the
CToolcollection for the course
Course Context
When a learner clicks your plugin's tool, your plugin code runs within the course context. You can access:
The current course (via
api_get_course_id()or the CID request store)The current session (if applicable)
The current user
Course-level plugin settings
Examples
Built-in course tool plugins:
BigBlueButton (
Bbb/) — Video conferencing within coursesZoom (
Zoom/) — Zoom meetings within coursesOnlyOffice (
Onlyoffice/) — Document editing within courses
Last updated
Was this helpful?