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: 132 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: share_recorder  - X-Ref

Record the sharing of content to MoodleNet.

get_allowed_share_types()   X-Ref
Get all allowed share types.

return: array

get_allowed_share_statuses()   X-Ref
Get all allowed share statuses.
Note that the particular status values aid in sorting.

return: array

insert_share_progress(int $sharetype, int $userid, int $courseid, ?int $cmid = null)   X-Ref
Create a new share progress record in the DB.

param: int $sharetype The type of share (e.g. TYPE_COURSE).
param: int $userid The ID of the user performing the share.
param: int $courseid The associated course id.
param: int|null $cmid The associated course module id (when sharing activity).
return: int Returns the inserted record id.

update_share_progress(int $shareid, int $status, ?string $resourceurl = null)   X-Ref
Update the share progress record in the DB.

param: int $shareid The id of the share progress row being updated.
param: int $status The status of the share progress (e.g. STATUS_SENT).
param: string|null $resourceurl The resource url returned from MoodleNet.