Details
-
Type:
New Feature
-
Status: Closed
-
Priority:
Minor
-
Resolution: Done
-
Affects Version/s: 3.9
-
Fix Version/s: None
-
Component/s: Other
-
Labels:
-
Story Points:5
-
Sprint:Moodlenet massive mop-up 2
Description
We currently have a workflow for file import only. We want to support links too.
As a teacher
I want to be able to send links I've shared on MoodleNet to Moodle and have them be imported into an activity instance
So that I don't need to manually create resources in Moodle using the URL
Acceptance criteria:
1. [MoodleNet side]: A teacher is able to use the 'send to Moodle' button in MoodleNet to initiate an import for a link.
2. Once initiated, the workflow should present the same steps as the file import process (confirm, course select, format select)
3. Relevant strings should be updated to reflect the name of the item being imported during the various stages
4. The teacher is able to select from a range of supported link handlers at the 'format select' stage.
5. Once selected, the resource should be created and should have a 'name' and 'description' value matching those provided by MoodleNet.
6. mod_url must always be available to handle link import in core, and other modules should also be able to register interest in handling links (core already supports this - we just want to confirm it works nicely)
Spec:
1. MoodleNet will provide a 'type' field in the POST data being sent to admin/tool/moodlenet/import.php, letting Moodle know whether a resource is to be treated as a file or as a link. Supported values are 'link' and 'file' right now only.
2. MoodleNet will send JSON data in the 'resource_info' field in the aforementioned POST, containing 'name' and 'summary' fields, among others. These are to be used for the 'name' and 'description' values in Moodle. Sample below:
{
|
"collection": { |
"community": { |
"canonicalUrl": "https://team.moodle.net/pub/actors/K12_teachers", |
"icon": "https://team.moodle.net/uploads/01E2K4E9HWJK4ZQ5M8J2D6PA1H/school.jpg", |
"name": "K12 teachers", |
"preferredUsername": "K12_teachers@team.moodle.net", |
"summary": "Just a general space to hang out and chat if you're a schoolteacher!" |
},
|
"canonicalUrl": "https://team.moodle.net/pub/actors/Teacher_humour", |
"icon": null, |
"name": "Teacher humour", |
"preferredUsername": "Teacher_humour@team.moodle.net", |
"summary": "Share memes and other funny things you come across! (keep it clean, people)" |
},
|
"canonicalUrl": "https://team.moodle.net/pub/objects/e7a8770b-b6b2-40fb-a6ae-da9ed6a0203d", |
"icon": "https://s18670.pcdn.co/wp-content/uploads/laughing.jpg", |
"licence": "CC-BY-SA", |
"name": "30 Cheesy Teacher Jokes That Crack Us Up", |
"summary": "Need a good laugh? We've got you covered.", |
"url": "https://www.weareteachers.com/cheesy-teacher-jokes/" |
}
|
Attachments
Issue Links
- Testing discovered
-
MDL-68763 If only one import format option is available, skip the selection step for the user
-
- Closed
-