API for sharing Moodle LMS resources to MoodleNet instances.
More...
|
| __construct (int $resourceid, protected int $userid, protected moodlenet_client $moodlenetclient, protected client $oauthclient, protected int $shareformat=self::SHARE_FORMAT_BACKUP,) |
| Class constructor.
|
|
| share_resource () |
| Share a resource to MoodleNet.
|
|
|
int const | MAX_FILESIZE = 1070000000 |
| Maximum upload file size (1.07 GB).
|
|
int const | SHARE_FORMAT_BACKUP = 0 |
| Backup share format - the content is being shared as a Moodle backup file.
|
|
API for sharing Moodle LMS resources to MoodleNet instances.
- Copyright
- 2023 Safat Shahin safat.nosp@m..sha.nosp@m.hin@m.nosp@m.oodl.nosp@m.e.com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core\moodlenet\resource_sender::__construct |
( |
int | $resourceid, |
|
|
protected int | $userid, |
|
|
protected moodlenet_client | $moodlenetclient, |
|
|
protected client | $oauthclient, |
|
|
protected int | $shareformat = self::SHARE_FORMAT_BACKUP ) |
Class constructor.
- Parameters
-
int | $resourceid | The resource ID of the resource being shared. |
int | $userid | The user ID who is sharing the activity. |
moodlenet_client | $moodlenetclient | The moodlenet_client object used to perform the share. |
client | $oauthclient | The OAuth 2 client for the MoodleNet instance. |
int | $shareformat | The data format to share in. Defaults to a Moodle backup (SHARE_FORMAT_BACKUP). |
- Exceptions
-
Reimplemented in core\moodlenet\activity_sender, and core\moodlenet\course_sender.
◆ get_allowed_share_formats()
static core\moodlenet\resource_sender::get_allowed_share_formats |
( |
| ) |
|
|
staticprotected |
Return the list of supported share formats.
- Return values
-
array | Array of supported share format values. |
Reimplemented in core\moodlenet\course_sender.
◆ prepare_share_contents()
core\moodlenet\resource_sender::prepare_share_contents |
( |
| ) |
|
|
protected |
Prepare the data for sharing, in the format specified.
- Return values
-
◆ share_resource()
core\moodlenet\resource_sender::share_resource |
( |
| ) |
|
|
abstract |
The documentation for this class was generated from the following file: