Files
moodle/course/format/classes/main_activity_interface.php
T
Sara Arjona 2513bca047 MDL-85433 navigation: Generalise secondary navigation for single format
Introduce flexibility by allowing course formats to define custom logic
for retrieving activity modules.
2025-06-13 15:26:08 +02:00

36 lines
1.2 KiB
PHP

<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_courseformat;
/**
* Contains the interface that any course format plugin should implement
* when it wants to only display a single activity in the course page.
*
* @package core_courseformat
* @copyright 2025 Sara Arjona <sara@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
interface main_activity_interface {
/**
* Get the main activity of the course.
*
* @return \cm_info|null The main activity object or null if main activity is not set.
*/
public function get_main_activity(): ?\cm_info;
}