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

Create user interface to add/delete new licenses

XMLWordPrintable

    • MOODLE_26_STABLE, MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • MDL-45184-master
    • Hide

      PART 1 - Manual Upgrade (Difficulty: Medium, requires database access and pre-upgrade Moodle install)

      (Pre-upgrade)

      1. Login as admin.
      2. Navigate to Site Administration > Plugins > License > Manage licences
      3. Set the default licence to 'Creative Commons' and Save changes.
      4. From the previous database, manually delete 'Creative Commons' license from the {license}

        table.

      (Post-upgrade)

      1. Login as admin.
      2. Navigate to Site Administration > Licence > Licence settings
      3. You should see the admin settings sitedefaultlicense and rememberuserlicencepref
      4. The default license should now be 'Unknown' (This confirms that the upgrade set a site default when the existing license did not exist)
      5. rememberuserlicencepref should be checked
      6. Navigate to Site Administration > Licence > Licence manager
      7. You should see the licenses listed, except 'Creative Commons' should no longer be present. (This confirms the upgrade did not reinstall missing core licenses)
      8. Navigate to Site Administration > Licence > Licence settings
      9. You should see the admin settings sitedefaultlicense and rememberuserlicencepref

      PART 2 - Custom Licences (difficulty: easy, requires admin access to a Moodle instance)

      1. Log in as Admin
      2. Navigate to Site Administration > Licence > Licence manager
      3. Click the Create licence button
      4. Add the details for a new licence including a valid http(s) URL for source and click Save changes
      5. You should have returned to the Licence Manager page, so click on the source URL of the license.
      6. Confirm that it opens the correct page for that license and it opens in a new tab/window.
      7. Click on the edit icon beside your custom licence, you should be taken to the Edit Licence page
      8. Check that the licence details match what you entered, the licence shortname should not be alterable.
      9. Alter the details and save again.
      10. Now click edit icon again to check that changes were applied correctly.
      11. Click Cancel and on returning to the Licence Manager, click the delete icon beside your custom licence, you should see a modal pop-up to confirm you wish to delete
      12. Click on Save changes in the pop up, you should be taken back to the Licence Manager and the licence should be deleted
      13. Create a new licence and make sure it is enabled in the Licence Manager.
      14. Navigate to Private Files and drag and drop a file into the file picker and Save changes.
      15. Click on the file, in the dropdown for Choose licence your custom licence should be visable.
      16. Add a file using the add icon instead of drag and drop, select 'Upload a file' from the filepicker and you should see your licence in the Choose licence dropdown here as well
      17. Select 'Recent files' and click on the file you added, in the dropdown for Choose licence your custom licence should be visable again.
      18. Return to the Site Administration > Licence > License manager and disable your custom licence you added
      19. Now carry out the steps from 12-15, checking that your custom licence is no longer displayed in the Choose licence dropdowns (unless that file had already been set to your custom licence before the licence was disabled, then it should still display the custom licence)

      PART 3 - User Licence Preferences (difficulty: easy, requires admin access to a Moodle instance)

      1. Log in as Admin
      2. Navigate to Site Administration > Licence > Licence settings
      3. Note the site default licence set (you will need this for a later step)
      4. Deselect the rememberuserlicencepref checkbox and save the settings
      5. Navigate to Private files and add a file using the add icon  ensuring that you select a licence which is NOT the site default licence
      6. Use the add icon  again and check that the Choose licence preselected licence is the site default and not the licence you chose for last file upload (it should be the site default licence)

      PART 4 - Licence deleting (difficulty: easy, requires admin access to a Moodle instance)

      1. Log in as Admin
      2. Navigate to Site Administration > Licences > Manage licences
      3. Select 'Create licence' button and add details for a new licence, click 'Save changes' and you should be returned to Licence Manager page
      4. You should see your licence in the table
      5. Click the Delete icon beside the licence you just created (a trash can) and you should be prompted by a modal pop-up, click 'Save changes' and you should return to Licence Manager page again
      6. Confirm custom licence is no longer in table
      7. Create another new licence. Ensure that you do not set this license as the site's default licence.
      8. Navigate to Private files and add a new file seleting your custom licence as the file's licence and save changes
      9. Navigate back to Site Administration > Licences > Manage licences
      10. Attempt to delete the custom license, you should see an exception message displayed informing you that you 'Cannot delete a licence which is currently assigned to one or more files'

       

      Show
      PART 1 - Manual Upgrade (Difficulty: Medium, requires database access and pre-upgrade Moodle install) (Pre-upgrade) Login as admin. Navigate to Site Administration > Plugins > License > Manage licences Set the default licence to 'Creative Commons' and Save changes. From the previous database, manually delete 'Creative Commons' license from the {license} table. (Post-upgrade) Login as admin. Navigate to  Site Administration > Licence > Licence settings You should see the admin settings sitedefaultlicense and rememberuserlicencepref The default license should now be 'Unknown' (This confirms that the upgrade set a site default when the existing license did not exist) rememberuserlicencepref should be checked Navigate to  Site Administration > Licence > Licence manager You should see the licenses listed, except 'Creative Commons' should no longer be present. (This confirms the upgrade did not reinstall missing core licenses) Navigate to Site Administration > Licence > Licence settings You should see the admin settings sitedefaultlicense and rememberuserlicencepref PART 2 - Custom Licences (difficulty: easy, requires admin access to a Moodle instance) Log in as Admin Navigate to  Site Administration > Licence > Licence manager Click the  Create licence  button Add the details for a new licence including a valid http(s) URL for source and click  Save changes You should have returned to the Licence Manager page, so click on the source URL of the license. Confirm that it opens the correct page for that license and it opens in a new tab/window. Click on the edit icon beside your custom licence, you should be taken to the Edit Licence page Check that the licence details match what you entered, the licence shortname should not be alterable. Alter the details and save again. Now click edit icon again to check that changes were applied correctly. Click  Cancel  and on returning to the Licence Manager, click the delete icon beside your custom licence, you should see a modal pop-up to confirm you wish to delete Click on Save changes  in the pop up, you should be taken back to the Licence Manager and the licence should be deleted Create a new licence and make sure it is enabled in the Licence Manager. Navigate to  Private Files  and drag and drop a file into the file picker and Save changes . Click on the file, in the dropdown for  Choose licence your custom licence should be visable. Add a file using the add icon instead of drag and drop, select 'Upload a file' from the filepicker and you should see your licence in the  Choose licence  dropdown here as well Select 'Recent files' and click on the file you added, in the dropdown for  Choose licence your custom licence should be visable again. Return to the  Site Administration > Licence > License manager  and disable your custom licence you added Now carry out the steps from 12-15, checking that your custom licence is no longer displayed in the  Choose licence  dropdowns (unless that file had already been set to your custom licence before the licence was disabled, then it should still display the custom licence) PART 3 - User Licence Preferences (difficulty: easy, requires admin access to a Moodle instance) Log in as Admin Navigate to  Site Administration > Licence > Licence settings Note the site default licence set (you will need this for a later step) Deselect the  rememberuserlicencepref  checkbox and save the settings Navigate to  Private files  and add a file using the add icon  ensuring that you select a licence which is NOT the site default licence Use the add icon  again and check that the  Choose licence  preselected licence is the site default and not the licence you chose for last file upload (it should be the site default licence) PART 4 - Licence deleting (difficulty: easy, requires admin access to a Moodle instance) Log in as Admin Navigate to  Site Administration > Licences > Manage licences Select 'Create licence' button and add details for a new licence, click 'Save changes' and you should be returned to Licence Manager page You should see your licence in the table Click the  Delete  icon beside the licence you just created (a trash can) and you should be prompted by a modal pop-up, click 'Save changes' and you should return to Licence Manager page again Confirm custom licence is no longer in table Create another new licence. Ensure that you do not set this license as the site's default licence. Navigate to  Private files  and add a new file seleting your custom licence as the file's licence and save changes Navigate back to  Site Administration > Licences > Manage licences Attempt to delete the custom license, you should see an exception message displayed informing you that you 'Cannot delete a licence which is currently assigned to one or more files'  

      While we can currently enable or disable the provided license types, there is no way to create new license types, modify the existing ones or delete them. I would be interested in seeing a UI for adding new licenses.

      For example, all of the ones listed in the licenses table represent CC 3.0 and 4.0 is now available. It would be nice if CC had an xml file with all the the available licenses that could easily be imported but for now it would be nice to be able to add licenses like the Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/

      Peace - Anthony

        1. MDL-45184.jpg
          MDL-45184.jpg
          57 kB
        2. MDL-45184 (2).jpg
          MDL-45184 (2).jpg
          64 kB
        3. MDL-45184 (3).jpg
          MDL-45184 (3).jpg
          62 kB
        4. MDL-45184 (4).jpg
          MDL-45184 (4).jpg
          48 kB
        5. Screenshot from 2019-11-20 09-24-00.png
          Screenshot from 2019-11-20 09-24-00.png
          61 kB

            tom_d Tom Dickman
            aborrow Anthony Borrow
            Brendan Heywood Brendan Heywood
            Jun Pataleta Jun Pataleta
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            8 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 days, 2 hours, 10 minutes
                4d 2h 10m

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