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.

(no description)

File Size: 100 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

course_partial_sender:: (3 methods):
  __construct()
  log_event()
  validate_course_module_ids()


Class: course_partial_sender  - X-Ref

API for sharing a number of Moodle LMS activities as a course backup to MoodleNet instances.

__construct(int $courseid,protected int $userid,protected moodlenet_client $moodlenetclient,protected client $oauthclient,protected array $cmids,protected int $shareformat = self::SHARE_FORMAT_BACKUP,)   X-Ref
Constructor for course sender.

param: int $courseid The course ID of the course being shared
param: int $userid The user ID who is sharing the activity
param: moodlenet_client $moodlenetclient The moodlenet_client object used to perform the share
param: client $oauthclient The OAuth 2 client for the MoodleNet instance
param: int $shareformat The data format to share in. Defaults to a Moodle backup (SHARE_FORMAT_BACKUP)

log_event(string $resourceurl,int $responsecode,)   X-Ref
Log an event to the admin logs for an outbound share attempt.

param: string $resourceurl The URL of the draft resource if it was created
param: int $responsecode The HTTP response code describing the outcome of the attempt
return: void

validate_course_module_ids(\stdClass $course,array $cmids,)   X-Ref
Validate the course module ids.

param: \stdClass $course Course object
param: array $cmids List of course module ids to check
return: void