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

Add site administration config to control sharing to MoodleNet

XMLWordPrintable

    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_402_STABLE
    • MDL-75319-master-2
    • Hide

      Initial setup

      1. Set up and run the MoodleNet mock server (https://github.com/snake/moodlenet_mock) using '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 Admin > Server > OAuth 2 services.
      5. Click on the "MoodleNet' button.
      6. Change the URL to "https://moodlenet.test" (so that it points to the mock running locally).
      7. Click Save changes.
      8. Navigate to Admin > Server > OAuth 2 services.
      9. Click on the "Custom" button.
      10. Fill in the form with the below values:
        1. Name: Test service
        2. Client ID: secret
        3. Client secret: thisissecret
      11. Click Save changes.
      12. Disable all the services by clicking on the "eye" icon.

      Testing 1

      1. Navigate to "Site administration > Development > Experimental".
      2. Verify that you will see a setting called "Enable sharing to MoodleNet".
      3. Verify that the default value is unchecked.
      4. Navigate to "Site administration > General > MoodleNet.
      5. Verify that you will not see MoodleNet outbound settings.
      6. Verify that you will see MoodleNet inbound settings.

      Testing 2

      1. Navigate to "Site administration > Development > Experimental".
      2. Enable the "Enable sharing to MoodleNet" setting.
      3. Navigate to "Site administration > General > MoodleNet.
      4. Verify that you will see MoodleNet outbound settings.
      5. Click on that section.
      6. Verify that the "OAuth 2 service" value is "None".
      7. Verify that you will see "Select the OAuth 2 service that is configured to talk to the MoodleNet server. If the service doesn't exist yet, you will need to create it."
      8. Click on the "create" link.
      9. Verify that you will see the OAuth 2 services page.

      Testing 3

      1. Enable all the created services by clicking on the "eye" icon.
      2. Navigate to "Site administration > General > MoodleNet > MoodleNet outbound settings".
      3. Verify that you will see MoodleNet in the "OAuth 2 service" select box.
      4. Verify that you will not see Test service in the "OAuth 2 service" select box.

      Testing 4

      1. Navigate to Site admin > Users > Permissions > Capability overview.
      2. Search "moodlenet:sendactivity" and select the capability that appears.
      3. Under roles, select All and click "Get the overview".
      4. Verify under "Permissions in System", only Manager and Teacher are set to "Allow".
      Show
      Initial setup Set up and run the MoodleNet mock server ( https://github.com/snake/moodlenet_mock ) using '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 Admin > Server > OAuth 2 services. Click on the "MoodleNet' button. Change the URL to "https://moodlenet.test" (so that it points to the mock running locally). Click Save changes. Navigate to Admin > Server > OAuth 2 services. Click on the "Custom" button. Fill in the form with the below values: Name: Test service Client ID: secret Client secret: thisissecret Click Save changes. Disable all the services by clicking on the "eye" icon. Testing 1 Navigate to "Site administration > Development > Experimental". Verify that you will see a setting called "Enable sharing to MoodleNet". Verify that the default value is unchecked . Navigate to "Site administration > General > MoodleNet. Verify that you will not see MoodleNet outbound settings. Verify that you will see MoodleNet inbound settings. Testing 2 Navigate to "Site administration > Development > Experimental". Enable the "Enable sharing to MoodleNet" setting. Navigate to "Site administration > General > MoodleNet. Verify that you will see MoodleNet outbound settings. Click on that section. Verify that the "OAuth 2 service" value is "None". Verify that you will see "Select the OAuth 2 service that is configured to talk to the MoodleNet server. If the service doesn't exist yet, you will need to create it." Click on the "create" link. Verify that you will see the OAuth 2 services page. Testing 3 Enable all the created services by clicking on the "eye" icon. Navigate to "Site administration > General > MoodleNet > MoodleNet outbound settings". Verify that you will see MoodleNet in the "OAuth 2 service" select box. Verify that you will not see Test service in the "OAuth 2 service" select box. Testing 4 Navigate to Site admin > Users > Permissions > Capability overview. Search " moodlenet:sendactivity " and select the capability that appears. Under roles, select All and click "Get the overview". Verify under "Permissions in System", only Manager and Teacher are set to "Allow".
    • 6
    • Team Hedgehog Sprint 2.1, Team Hedgehog Sprint 2.2

      MoodleNet sharing functionality requires some site administration settings to control access to sharing to MoodleNet and which MoodleNet instance can be shared to.

      Requirements

      1. Since the sharing to MoodleNet functionality is in core and independent from the existing settings for content being sent from MoodleNet into the LMS, it will need to be be a separate section in settings. As discussed with huongn@moodle.com, it should be possible to include this on the same, but under separate sections (to keep all MoodleNet related settings on the same general > MoodleNet category. I would suggest we rename the existing section from "MoodleNet settings" to "MoodleNet inbound settings" and include the new settings under "MoodleNet outbound settings".
      2. The sharing to MoodleNet functionality needs to be behind an experimental feature flag, which controls whether it is enabled or disabled for the site (disabled by default since it is experimental).
      3. A single select dropdown is required to select which MoodleNet instance can be shared to. The options should be all MoodleNet OAuth 2 providers that have been configured on the Moodle instance. Although multiple MoodleNet providers may be configured in OAuth settings, the scope for phase 1 of this project is to only allow one of them to be enabled for sharing to.
      4. If no MoodleNet OAuth providers are configured, the dropdown in #3 should be disabled with the validation indicating that at least one provider needs to be configured to use it.
      5. The description for the setting added in #3 should clearly outline what the setting is for, and hyperlink to the relevant site admin page to configure MoodleNet OAuth providers (so if the list is empty/incomplete, the admin can easily navigate to complete setting it up).
      6. The settings should use “progressive disclosure”, where the options such as which site is available to share to should be hidden until the share to MoodleNet feature is enabled (the setting in requirement #2).
      7. In this issue we should also create a new capability for being able to share to MoodleNet, which is given to editing teachers and managers by default. All following project issues will require both the admin settings and capability, so it makes sense to implement them together here first.
      8. Behat/unit tests implemented as applicable.

      User stories

      This issue resolves the following user story:

      1. As a site admin, I can set any configured MoodleNet OAuth 2 issuer as the available MoodleNet instance to share to, so it is easy for teachers to authorise their LMS account to share to their account on that MoodleNet instance, and so I can control which MoodleNet instance this is allowed for.

            huongn@moodle.com Huong Nguyen
            michaelh Michael Hawkins
            Michael Hawkins Michael Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 6 hours, 39 minutes
                2d 6h 39m

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