Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250620) (7d9030acd6e)
mod_assign\courseformat\overview Class Reference
Inheritance diagram for mod_assign\courseformat\overview:
core_courseformat\activityoverviewbase

Public Member Functions

 __construct (cm_info $cm, protected core\output\renderer_helper readonly core\output\renderer_helper $rendererhelper,)
 Constructor.
 
 get_actions_overview ()
 Retrieves the actions overview for the activity.
 
 get_completion_overview ()
 Retrieves the completion overview for the activity.
 
 get_due_date_overview ()
 Retrieves the due date overview for the activity.
 
 get_extra_overview_items ()
 Get the plugin specific overview items for the activity.
 
 get_grades_overviews ()
 Retrieves the grades overview items for the activity.
 
 get_name_overview ()
 Get the name of the activity.
 

Static Public Member Functions

static redirect_to_overview_page (int $courseid, string $modname)
 Redirects to the overview page for the activity.
 

Protected Member Functions

 get_grade_item_names (array $items)
 Retrieves the grade item names for the activity.
 

Protected Attributes

cm_info module_context $context
 The course module.
 
stdClass stdClass $course
 $course
 
courseformat courseformat $format
 $format the course format
 

Constructor & Destructor Documentation

◆ __construct()

mod_assign\courseformat\overview::__construct ( cm_info $cm,
protected core\output\renderer_helper readonly core\output\renderer_helper $rendererhelper )

Constructor.

Parameters
cm_info$cmthe course module instance.
core\output\renderer_helper$rendererhelperthe renderer helper.
Parameters
$rendererhelper$rendererhelper the renderer helper

Member Function Documentation

◆ get_actions_overview()

mod_assign\courseformat\overview::get_actions_overview ( )

Retrieves the actions overview for the activity.

Return values
overviewitem|nullnull if module does not have a main action item.

Reimplemented from core_courseformat\activityoverviewbase.

◆ get_completion_overview()

core_courseformat\activityoverviewbase::get_completion_overview ( )
inherited

Retrieves the completion overview for the activity.

Return values
overviewitem|nullnull if completion is not enabled.

◆ get_due_date_overview()

mod_assign\courseformat\overview::get_due_date_overview ( )

Retrieves the due date overview for the activity.

Return values
overviewitem|nullnull if module does not have a due date.

Reimplemented from core_courseformat\activityoverviewbase.

◆ get_extra_overview_items()

mod_assign\courseformat\overview::get_extra_overview_items ( )

Get the plugin specific overview items for the activity.

Plugins can override this method to provide their own overview items.

The resulting array must be indexed by item shortname.

Return values
overviewitem[]Array of overview items indexed by item shortname.

Reimplemented from core_courseformat\activityoverviewbase.

◆ get_grade_item_names()

core_courseformat\activityoverviewbase::get_grade_item_names ( array $items)
protectedinherited

Retrieves the grade item names for the activity.

By default, the overview will display the grade if the activities has only one grade item. The name of the grade item will be 'Grade'. For plugins with multiple grade items, the plugin must override this method and provide names for each grade item that want to be displayed.

Parameters
grade_item[]$items
Return values
array<integer,string>the grade item names indexed by item id.

Reimplemented in mod_workshop\courseformat\overview.

◆ get_grades_overviews()

core_courseformat\activityoverviewbase::get_grades_overviews ( )
inherited

Retrieves the grades overview items for the activity.

Most activities will have none or one grade. However, some activities may have multiple grades, such as workshop or quiz.

It is not recommended to override this method unless the plugin has specific requirements. Instead, plugins should override get_grade_item_names to provide the grade item names.

Return values
overviewitem[]Array of overview items representing the grades.

◆ redirect_to_overview_page()

static core_courseformat\activityoverviewbase::redirect_to_overview_page ( int $courseid,
string $modname )
staticinherited

Redirects to the overview page for the activity.

Parameters
int$courseidThe course id.
string$modnameThe module name.

The documentation for this class was generated from the following file: