Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-78267

Add ability for teachers to customise courses shared to MoodleNet

    XMLWordPrintable

Details

    • MOODLE_403_STABLE
    • MOODLE_403_STABLE
    • MDL-78267-master-2
    • Hide

      Initial setup

      1. Set up and run the MoodleNet mock server (https://github.com/HuongNV13/moodlenet_mock/) using branch addDownloadFile and 'moodlenet.test' as the domain.
      2. Log in as admin.
      3. 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.
      4. Navigate to "Site administration > Development > Experimental".
      5. Enable the "Enable sharing to MoodleNet" setting.
      6. Navigate to Site Administration / Server / OAuth 2 services.
      7. Click on the MoodleNet button.
      8. Change the Service base URL to: moodlenet.test
      9. Change the Name to: MoodleNet Local
      10. Save changes.
      11. Navigate to Site Administration / General / MoodleNet outbound settings.
      12. Select MoodleNet Local in the OAuth 2 service dropdown.
      13. Create a new Course.
      14. Create 3 Assign activities called: Assign 1, Assign 2 and Assign 3.

      Test scenario (Share multiple activities):

      1. Login as editing teacher/manager role.
      2. Navigate to the Course.
      3. Turn on the Edit mode.
      4. Click on the Bulk edit button.
      5. Verify that you will see Share to MoodleNet button in the footer.
      6. Verify that the button is disabled (Blur).
      7. Click on the checkbox next to Assign 1.
      8. Click on the checkbox next to Assign 2.
      9. Verify that the button is enabled.
      10. Click on the Share to MoodleNet button in the footer.
      11. Verify that you will see the course shortname.
      12. Verify that you will see The selected activities are being shared with MoodleNet as a resource.
      13. Verify that you will see: 2 activities will be included in the course.
      14. Verify that you will see: Sharing to: MoodleNet Local.
      15. Click on the Share button.
      16. Verify that a new popup will be open and ask you to authorize with MoodleNet mock server.
      17. Click Allow button.
      18. Verify that the popup will be closed and the dialogue will show that the system is packaging the activity.
      19. Verify that you will see a successful dialogue say that: Saved to MoodleNet drafts 
      20. Verify that you will see Almost done! Visit your draft in MoodleNet to finish sharing your content.
      21. Click the Go to MoodleNet drafts button.
      22. Verify that you can download the mbz file.
      23. In the course, navigate to More -> Course reuse -> Restore and upload the downloaded file.
      24. Verify that the backup type is Course.
      25. Try to restore the course.
      26. Verify that the newly restored course only contains Assign 1 and Assign 2 activities.

      Test scenario (Share single activity):

      1. Login as editing teacher/manager role.
      2. Navigate to the Course.
      3. Turn on the Edit mode.
      4. Click on the Bulk edit button.
      5. Verify that you will see Share to MoodleNet button in the footer.
      6. Verify that the button is disabled (Blur).
      7. Click on the checkbox next to Assign 1.
      8. Verify that the button is enabled.
      9. Click on the Share to MoodleNet button in the footer.
      10. Verify that you will see the activity name.
      11. Verify that you will see This activity is being shared with MoodleNet as a resource.
      12. Verify that you will not see: 1 activities will be included in the course
      13. Verify that you will see: Sharing to: MoodleNet Local.
      14. Click on the Share button.
      15. Verify that a new popup will be open and ask you to authorize with MoodleNet mock server.
      16. Click Allow button.
      17. Verify that the popup will be closed and the dialogue will show that the system is packaging the activity.
      18. Verify that you will see a successful dialogue say that:  Saved to MoodleNet drafts 
      19. Verify that you will see Almost done! Visit your draft in MoodleNet to finish sharing your content.
      20. Click the Go to MoodleNet drafts button.
      21. Verify that you can download the mbz file.
      22. In the course, navigate to More -> Course reuse -> Restore and upload the downloaded file.
      23. Verify that the backup type is Activity.
      24. Try to restore and confirm that you can restore the Assign 1 activity.

      Behat test:

      1. Apply this commit: https://github.com/HuongNV13/moodle/commit/b3b9b4500cb4f7efffffa723f6821e82b8c33836

        git fetch https://github.com/HuongNV13/moodle insecureCerts
        git cherry-pick FETCH_HEAD
        

      2. Re-init the Behat environment.
      3. Open config.php and add define('TEST_MOODLENET_MOCK_SERVER', 'https://moodlenet.test');
      4. Make sure all the tests in lib/tests/behat/moodlenet_share_partial_course.feature are passed.
      Show
      Initial setup Set up and run the MoodleNet mock server ( https://github.com/HuongNV13/moodlenet_mock/ ) using branch addDownloadFile and 'moodlenet.test' as the domain. 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: 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. Test scenario (Share multiple activities): Login as editing teacher/manager role. Navigate to the Course. Turn on the Edit mode. Click on the Bulk edit button. Verify that you will see Share to MoodleNet button in the footer. Verify that the button is disabled (Blur). 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 shortname. 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. Verify that a new popup will be open and ask you to authorize with MoodleNet mock server. Click Allow button. Verify that the popup will be closed and 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. Test scenario (Share single activity): Login as editing teacher/manager role. Navigate to the Course. Turn on the Edit mode. Click on the Bulk edit button. Verify that you will see Share to MoodleNet button in the footer. Verify that the button is disabled (Blur). Click on the checkbox next to Assign 1. Verify that the button is enabled . Click on the Share to MoodleNet button in the footer. Verify that you will see the activity name. Verify that you will see This activity is being shared with MoodleNet as a resource . Verify that you will not see: 1 activities will be included in the course Verify that you will see: Sharing to: MoodleNet Local. Click on the Share button. Verify that a new popup will be open and ask you to authorize with MoodleNet mock server. Click Allow button. Verify that the popup will be closed and 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 Activity. Try to restore and confirm that you can restore the Assign 1 activity. Behat test: Apply this commit: https://github.com/HuongNV13/moodle/commit/b3b9b4500cb4f7efffffa723f6821e82b8c33836 git fetch https: //github .com /HuongNV13/moodle insecureCerts git cherry-pick FETCH_HEAD Re-init the Behat environment. Open config.php and add define('TEST_MOODLENET_MOCK_SERVER', ' https://moodlenet.test'); Make sure all the tests in lib/tests/behat/moodlenet_share_partial_course.feature are passed.
    • 10
    • Team Hedgehog 2023 Sprint 2.3, Team Hedgehog 2023 Review 2, Team Hedgehog 2023 Sprint 3.1, Team Hedgehog 2023 Sprint 3.2

    Description

      This issue resolves the following user story:

      1. As a teacher, I can select/deselect activities and resources when sharing a course to MoodleNet, so I can customise which course content is available to other MoodleNet users.

      Requirements

      1. Before sending, the teacher has the ability to select/deselect any activity/resource they wish. Only the selected items will form part of the course that is uploaded to MoodleNet.
      2. User/student data is not included.
      3. Note: Further requirements will be outlined prior to development commencing on this issue, following upcoming prototype refinements to ensure usability in courses with larger numbers of activities.

      Attachments

        Issue Links

          Activity

            People

              huongn@moodle.com Huong Nguyen
              michaelh Michael Hawkins
              Michael Hawkins Michael Hawkins
              Ilya Tregubov Ilya Tregubov
              Ron Carl Alfon Yu Ron Carl Alfon Yu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 weeks, 3 days, 2 hours, 18 minutes
                  2w 3d 2h 18m

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.