-
Functional Test
-
Minor
-
None
-
Moodle 4.3
This test requires admin access. If you would like to use the QA testing site for running it, please see the QA testing guide for details of how to request admin access. Begin just after the hourly reset to give yourself plenty of time to complete the test!
This is an exploratory test of a new feature or improvement, so please feel free to try anything you like and not just the test steps!
Setup / basic info
- Any MoodleNet instance you can be used for this testing, however you will need to be able to log into the site and the following prototype MoodleNet instance and account are available:
- MoodleNet URL: https://mn3-prototype.moodle.net/
- Test credentials:
user: schmickmoodler+MDLtest@gmail.com
pass: (zmq0xwb_ghf_ufd_CAX
(Note: If the above site is unavailable, or you don't want to use that URL or account, you can use a different site/user such as https://moodle.net, though that is a production site, the drafts created in this testing are not automatically published publicly. Note that creating a brand new MoodleNet account on any MoodleNet site will require a valid email address because you have to click through a verification email before the account will be activated).
- Before starting the testing, you should log into the MoodleNet site you will be sharing to (such as with the the credentials above).
- Sharing from Moodle to MoodleNet is an experimental feature, which needs to be enabled in Moodle via Site administration > Development > Experimental > Experimental settings, by enabling Enable sharing to MoodleNet (outbound).
- Once the feature is enabled, you can view its settings in Site administration > General > MoodleNet > MoodleNet outbound settings.
- Before the OAuth 2 service can be set in the outbound settings, the service must be configured. In the description text for the OAuth 2 service setting there is a link to the OAuth 2 services page on the word "create", click it.
- Once on the OAuth 2 service page, click the MoodleNet button, set the Name field to "MoodleNet exploratory", then set the Service base URL field to the URL of the MoodleNet site (eg https://mn3-prototype.moodle.net/). Do not touch any of the other fields on that page. Press Save changes.
- Once saved, verify you see MoodleNet exploratory in the list of OAuth 2 services (internal services and discovery should have ticks, login and system account connected should have crosses).
- Click the edit cog on the MoodleNet exploratory row and verify the Client ID and Client secret have been automatically populated.
- Now that the service has been set up, it needs to be enabled for MoodleNet sharing. Return to Site administration > General > MoodleNet > MoodleNet outbound settings.
- Verify in the MoodleNet outbound settings that MoodleNet exploratory is available in the OAuth 2 service dropdown. Select it and press Save changes.
Features to test
As a teacher, I can share an individual activity to MoodleNet as a backup
- As a teacher, visit a course containing multiple activities.
- Create a new activity in the course (we will be deleting it later), it should have a description. Make a note of the name and description of the activity.
- Open the new activity.
- Go into the activity's More menu and select Share to MoodleNet.
- Verify in the modal that opens, you see a heading which includes the name of the activity, as well as the correct activity type (eg QUIZ or ASSIGNMENT).
- Verify the text in the body of the modal references an "activity" and not a "course".
- Verify the correct "sharing to" site is listed at the bottom of the modal (following the above setup steps, it should say MoodleNet exploratory).
- Press the "Share" button.
- If a popup window appears asking for access to MoodleNet, press Authorize to allow your current Moodle user to share to the MoodleNet account that you logged into during the setup steps. You can also test cancelling the authorization, it should simply return you to the original share modal, where you can again press "Share" and be prompted to authorize again.
- Once authorized (or if you are not prompted because you have recently already authorized), verify the modal updates to briefly show a "Sharing to MoodleNet" screen.
- Verify after a short time, the modal again updates to display a Saved to MoodleNet drafts message.
- Press the Go to MoodleNet drafts button in the modal.
- Verify a new tab/window opens in the MoodleNet site you are logged into, where the resource name matches the name of the activity you shared and the description below the title matches the activity's description.
- Click the Download file button, to download a copy of the backup file that was shared to MoodleNet.
- To check the expected content was shared, restore that backup into a course and verify the activity matches the original activity you shared and that no user data was included in the backup.
It should also be possible to share an activity from the course homepage, by:
- Visiting the course homepage with edit mode enabled.
- Pressing Bulk actions.
- Selecting exactly one activity.
- Pressing Share to MoodleNet in the floating footer on the page.
- From this point, all of the activity sharing steps should appear and work exactly the same as described above (though you probably won't see the authorization popup since you have already authorized above).
As a teacher, I can share part of a course to MoodleNet as a backup
- Return to the course homepage with edit mode enabled and again enable Bulk actions.
- Select several activities (it must be more than one) and press the Share to MoodleNet button in the floating footer.
- Verify in the modal that opens, you see a heading which includes the course name, as well as COURSE (which replaces the activity type you would have seen for activity sharing).
- Verify the text in the body of the modal references "selected activities" and the number of activities being included in the course matches the number you selected in the bulk action.
- Verify the correct "sharing to" site is listed at the bottom of the modal.
- Press the "Share" button.
- Again, if you are prompted with an authorization popup, press Authorize.
- Verify the modal updates to briefly shows the same "Sharing to MoodleNet" screen, followed by the Saved to MoodleNet drafts message as before.
- Press the Go to MoodleNet drafts button in the modal.
- Verify that as before, you are taken to the correct resource on the MoodleNet site you shared to.
- Verify the resource name/title matches the course name, and the description matches the course's description.
- Click the Download file button, to download a copy of the backup file that was shared to MoodleNet.
- Restore that backup into a new course and verify the course details are correct, the activities included match those you selected to share and no user data was included in the backup.
As a teacher, I can share a whole course to MoodleNet as a backup
- From the course homepage, select Share to MoodleNet from the More dropdown menu.
- Verify in the modal that opens, you see a heading which includes the course name, as well as COURSE, the same as in the previous test.
- Verify the text in the body of the modal references the "course" being shared and does not reference activities.
- Verify the correct "sharing to" site is listed at the bottom of the modal.
- Press the "Share" button.
- As with the previous test, verify you see the expected sharing and success modals.
- As with the previous test, verify when you visit the draft in MoodleNet, the expected course name/description are displayed.
- As with the previous test, download the file from MoodleNet and restore it into a new course.
- Verify the whole course matches the original course that was shared, but that no user data was included in the backup.
As a teacher, I can view the share progress of resources I have shared to MoodleNet
- On the course homepage, navigate to More > MoodleNet share progress.
- Verify you see a list of all of the activities and courses you have shared to MoodleNet in the previous tests, in descending share order (so the most recently shared should be at the top of the list).
- Verify the details in the table are correct:
- The names should match the name of the course/activity that was shared, and clicking the name should open a tab/window with the correct MoodleNet draft.
- The type should match the activity type for activity sharing, and be "Course" for both the partial and whole course sharing items.
- The send date should be today's date (or whenever you executed the sharing).
- The send status should be "sent" for all items.
- Delete one of the new courses you created in the earlier test steps.
- Delete the activity you created in the activity sharing test.
- Navigate back to the MoodleNet share progress page.
- Verify:
- Even though the course/activity are deleted, their respective rows are still listed in the table.
- There is appropriate placeholder text for the names of the deleted items.
- The type for the course is still "Course", the activity's type is now "Activity", since we can no longer check the specific type for the deleted activity.
- The send date/status are unchanged.
- All other data in the table remains unchanged.
As a student I do not have access to MoodleNet sharing
- Log in as a student enrolled in the course.
- Verify on the course homepage, you do not see either the Share to MoodleNet or MoodleNet share progress options in the More dropdown, if that menu is available.
- Open an activity in the course and verify you do not see a Share to MoodleNet option in the More dropdown menu, if that menu is available.
- has a clone
-
MDLQA-18434 CLONE - Sharing to MoodleNet exploratory test
- Passed