Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
core\moodlenet\course_partial_packager Class Reference
Inheritance diagram for core\moodlenet\course_partial_packager:
core\moodlenet\course_packager core\moodlenet\resource_packager

Public Member Functions

 __construct (stdClass $course, array $cmids, int $userid,)
 Constructor for course partial packager.
 
 get_package ()
 Prepare the backup file using appropriate setting overrides and return relevant information.
 

Protected Member Functions

 get_all_activity_tasks (backup_controller $controller)
 Get all the activity tasks in the controller.
 
 get_all_task_settings (backup_controller $controller)
 Get all backup settings available for override.
 
 get_backup_controller ()
 Get the backup controller for the course.
 
 override_task_setting (array $alltasksettings, string $settingname, int $settingvalue)
 Override a backup task setting with a given value.
 
 package (backup_controller $controller)
 Package the resource identified by resource id into a new stored_file.
 
 remove_unselected_activities (backup_controller $controller)
 Remove unselected activities in the course backup.
 

Protected Attributes

int[] array $cmids
 $cmids List of course module ids of selected activities.
 
cm_info cm_info $cminfo
 $cminfo The course module which the resource belongs to.
 
stdClass stdClass $course
 $course The course which the resource belongs to.
 
string string $resourcefilename = 'resource'
 $resourcefilename The filename for the resource.
 
int int $userid
 $userid The ID of the user performing the packaging.
 

Constructor & Destructor Documentation

◆ __construct()

core\moodlenet\course_partial_packager::__construct ( stdClass $course,
array $cmids,
int $userid )

Constructor for course partial packager.

Parameters
stdClass$courseThe course to package
array$cmidsList of course module id of selected activities.
int$useridThe ID of the user performing the packaging

Member Function Documentation

◆ get_all_activity_tasks()

core\moodlenet\course_partial_packager::get_all_activity_tasks ( backup_controller $controller)
protected

Get all the activity tasks in the controller.

Parameters
backup_controller$controllerThe backup controller.
Return values
backup_activity_task[]Array of activity tasks.

◆ get_all_task_settings()

core\moodlenet\resource_packager::get_all_task_settings ( backup_controller $controller)
protectedinherited

Get all backup settings available for override.

Return values
arraythe associative array of taskclass => settings instances.

◆ get_backup_controller()

core\moodlenet\course_packager::get_backup_controller ( )
protectedinherited

Get the backup controller for the course.

Return values
backup_controllerthe backup controller for the course.

Reimplemented from core\moodlenet\resource_packager.

◆ get_package()

core\moodlenet\resource_packager::get_package ( )
inherited

Prepare the backup file using appropriate setting overrides and return relevant information.

Return values
stored_file

◆ override_task_setting()

core\moodlenet\resource_packager::override_task_setting ( array $alltasksettings,
string $settingname,
int $settingvalue )
protectedinherited

Override a backup task setting with a given value.

Parameters
array$alltasksettingsAll task settings.
string$settingnameThe name of the setting to be overridden (task class name format).
int$settingvalueValue to be given to the setting.

◆ package()

core\moodlenet\course_partial_packager::package ( backup_controller $controller)
protected

Package the resource identified by resource id into a new stored_file.

Parameters
backup_controller$controllerThe backup controller.
Return values
stored_file

Reimplemented from core\moodlenet\resource_packager.

◆ remove_unselected_activities()

core\moodlenet\course_partial_packager::remove_unselected_activities ( backup_controller $controller)
protected

Remove unselected activities in the course backup.

Parameters
backup_controller$controllerThe backup controller.

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