Show
Requirements
Set up and run the MoodleNet mock server ( https://github.com/moodlehq/moodlenet_mock ).
If it doesn't work properly (because there are some issues with the certificates), you can use the prototype site instead of: https://mn3-prototype.moodle.net/ Ping Huong or Sara to get the credentials.
Initial setup
Log in as admin.
Navigate to Admin > Security > HTTP security and clear the values for "cURL blocked hosts list " and "cURL allowed ports list" so they do not prevent us from reaching the MoodleNet mock server.
Navigate to "Site administration > Development > Experimental".
Enable the "Enable sharing to MoodleNet" setting.
Navigate to Site Administration / Server / OAuth 2 services.
Click on the MoodleNet button.
Change the Service base URL to: https://moodlenet.test
Change the Name to: MoodleNet Local
Save changes.
Navigate to Site Administration / General / MoodleNet outbound settings.
Select MoodleNet Local in the OAuth 2 service dropdown.
Create a new Course.
Create 3 Assign activities called: Assign 1, Assign 2 and Assign 3.
Testing
Login as editing teacher/manager role.
Navigate to the Course.
Turn on the Edit mode.
Click on the Bulk actions button.
Verify that you will see the Share to MoodleNet button in the footer.
Verify that the button is disabled (Blur).
Click on the Share to MoodleNet button.
Verify that you will not see any errors.
Click on the checkbox next to Assign 1.
Click on the checkbox next to Assign 2.
Verify that the button is enabled .
Click on the Share to MoodleNet button in the footer.
Verify that you will see the course name and share type of 'COURSE'.
Verify that you will see The selected activities are being shared with MoodleNet as a resource .
Verify that you will see: 2 activities will be included in the course.
Verify that you will see: Sharing to: MoodleNet Local.
Click on the Share button.
If there is a popup open that asks you to authorize with the MoodleNet site, click Authorize/Allow.
Verify that the dialogue will show that the system is packaging the activity.
Verify that you will see a successful dialogue say that: Saved to MoodleNet drafts
Verify that you will see Almost done! Visit your draft in MoodleNet to finish sharing your content.
Click the Go to MoodleNet drafts button.
Verify that you can download the mbz file.
In the course, navigate to More -> Course reuse -> Restore and upload the downloaded file.
Verify that the backup type is Course .
Try to restore the course.
Verify that the newly restored course only contains Assign 1 and Assign 2 activities.