-
New Feature
-
Resolution: Done
-
Critical
-
4.1, 4.2
-
MOODLE_401_STABLE, MOODLE_402_STABLE
-
MOODLE_402_STABLE
-
MDL-75933-master-4 -
-
10
-
Team Hedgehog Sprint 2.1, Team Hedgehog Sprint 2.2, Team Hedgehog 2023 Sprint 1.3
One or more new web services are required which utilise the APIs created in MDL-75932, to facilitate sharing to MoodleNet. For the scope of this issue, it will likely only require a single web service.
Requirements
- Parameters: cmid of the activity to be shared.
- Returns: MoodleNet draft resource URL.
- As this functionality lives in core, any web services will be located in lib/classes/external.
- Although in this phase of the project only a single MoodleNet instance will be available (so the teacher will not be able to change it in the UI), we should still require passing in the relevant MoodleNet site. This will future proof for later phases when multiple MoodleNet sites may be enabled for sharing.
- We could potentially also pass in a parameter for share format, which in the current scope would always be an activity backup (in future there would be options for raw file or URL).
- All operations must perform appropriate validation and capability checks (eg the capability created in
MDL-75319) to ensure they are allowed to perform the relevant action. For example:- The user performing the action is allowed to share to MoodleNet.
- The user is allowed to share the content they are trying to share.
- The MoodleNet site specified is one which the admin has enabled for sharing to (in this phase, it will have to match the one option that has been configured).
- Unit testing as appropriate.
User stories
Although this issue does not provide any functionality directly to teachers, it makes the relevant API available to the frontend which will help satisfy the following user stories:
- As a teacher, I can synchronously share a single activity/resource to MoodleNet as a Moodle backup file, so it is available for others to import into their Moodle courses.
- As a teacher, I will be provided with a link to my draft resource on MoodleNet, so I can complete any additional metadata requirements and publish my resource.
- As a teacher, I will be notified if an attempt to share to MoodleNet fails, so I can take appropriate action.
- As a site admin, I can enable or disable teachers' access to share to the MoodleNet site I have configured, so I have control over whether the content is published outside of my LMS.
Out of scope
- Only the final success/fail status of the share/upload needs to be covered by the web service. Additional status updates (eg packaging) will be implemented separately on
MDL-77298. - This web service only needs to handle sharing a single activity. In future, when course sharing is implemented, this will be covered by a separate web service. That means we should not need to factor course sharing into the design of this web service (except perhaps keeping it in mind we will want to name things in such a way that can be reused consistently with course, eg something like moodlenet_share_activity / moodlenet_share_single, so later we can be consistent with something like moodlenet_share_course).
- blocks
-
MDL-75785 Implement the Share to MoodleNet modal and activity menu item
- Closed
-
MDL-77297 Validate connection to MoodleNet before packaging resource to share
- Open
-
MDL-77296 Record MoodleNet share progress data in a consumable format
- Closed
- is blocked by
-
MDL-75319 Add site administration config to control sharing to MoodleNet
- Closed
-
MDL-75932 Create core\moodlenet APIs
- Closed
- will help resolve
-
MDL-75316 (PARENT) Implement LMS foundation for sharing content to MoodleNet (share activities)
- Closed