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

Final clean up and sanity check of ltiservice->ltixservice

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • 4.4
    • LTI External tool
    • MOODLE_404_STABLE
    • MDL-80231-main
    • Hide

      Service config migration test

      1. Create a fresh site based on the weekly before the LTI feature branch - 67b2c432252

        git checkout 67b2c432252
        mdk install
        

      2. Go to "Site admin > Plugins > Activities > External tools > Manage tools"
      3. Click "Configure a tool manually"
      4. Enter:
      5. Expand the "Services" section
      6. For each of the 3 service selects, choose the last option
      7. Now, via shell or whatever tool you like, open up the DB and check the lti_types_config:

        select * from mdl_lti_types_config where name ilike 'ltiservice\_%' order by id;
        

      8. You will see 3 entries for the tool you just created.
      9. Note the name+value for each row. You should see the following:
        ltiservice_gradesynchronization | 2
        ltiservice_memberships | 1
        ltiservice_toolsettings | 1
        Just keep this open and note the number of rows; we'll check back in a second.
      10. Now, checkout the patch
      11. Upgrade the site (ignore any capability-derived warnings you see during upgrade - this is normal for deprecated caps. If you're using Whoops in dev mode, you may just need to reload during the site upgrade if you're on web)
      12. Verify the upgrade completes without any problems.
      13. In your DB shell/tool the SQL again:

        select * from mdl_lti_types_config where name ilike 'ltiservice\_%' order by id;
        

      14. Verify you have no results now.
      15. In your DB shell/tool, run the following SQL:

        select * from mdl_lti_types_config where name ilike 'ltixservice\_%' order by id;
        

      16. Verify you now see all the rows again, this time with name prefix 'ltixservice_'.
      17. Verify all values are as you originally noted earlier
      18. Back in the site, go to "Site admin > General > LTI > Manage tools"
      19. Edit the tool "Example"
      20. Expand the "Service" section
      21. Verify that each select is still set to the last option available
      22. For each of the 3 service selects, choose the first option
      23. Save the form
      24. Edit the tool "Example" again
      25. Expand the "Service" section
      26. Verify that each select is still set to the first option available
      Show
      Service config migration test Create a fresh site based on the weekly before the LTI feature branch - 67b2c432252 git checkout 67b2c432252 mdk install Go to "Site admin > Plugins > Activities > External tools > Manage tools" Click "Configure a tool manually" Enter: Name: Example Tool URL: http://example.com Expand the "Services" section For each of the 3 service selects, choose the last option Now, via shell or whatever tool you like, open up the DB and check the lti_types_config: select * from mdl_lti_types_config where name ilike 'ltiservice\_%' order by id; You will see 3 entries for the tool you just created. Note the name+value for each row. You should see the following: ltiservice_gradesynchronization | 2 ltiservice_memberships | 1 ltiservice_toolsettings | 1 Just keep this open and note the number of rows; we'll check back in a second. Now, checkout the patch Upgrade the site (ignore any capability-derived warnings you see during upgrade - this is normal for deprecated caps. If you're using Whoops in dev mode, you may just need to reload during the site upgrade if you're on web) Verify the upgrade completes without any problems. In your DB shell/tool the SQL again: select * from mdl_lti_types_config where name ilike 'ltiservice\_%' order by id; Verify you have no results now. In your DB shell/tool, run the following SQL: select * from mdl_lti_types_config where name ilike 'ltixservice\_%' order by id; Verify you now see all the rows again, this time with name prefix 'ltixservice_'. Verify all values are as you originally noted earlier Back in the site, go to "Site admin > General > LTI > Manage tools" Edit the tool "Example" Expand the "Service" section Verify that each select is still set to the last option available For each of the 3 service selects, choose the first option Save the form Edit the tool "Example" again Expand the "Service" section Verify that each select is still set to the first option available

      This is a clean up type issue. Once all the services have been migrated to core_ltix, we'll want to make sure we've properly removed support for ltiservice type plugins.

      We'll want to do at least the following:

      • Update the types helper + generator, removing 'ltiservice_' prefix for storing service config. Just use the 'ltixservice_' prefix only now.
      • helper::get_services() also refers to both and should just use ltixservice_
      • Since existing tools will already have config in the DB using keys like "ltiservice_gradesynchronisation", "ltiservice_memberships", "ltiservice_toolsettings", etc. we'll need to tidy this legacy data up, in an upgrade step, so that existing tool config isn't impacted
      • Remove any other files which might be related to services (and pending the decision on the ltiservice deprecation strategy, we may need to leave some - tbd)

      See also the comment here:
      https://tracker.moodle.org/browse/MDL-79593?focusedId=1043811&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1043811

            jaked Jake Dallimore
            jaked Jake Dallimore
            Ilya Tregubov Ilya Tregubov
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 5 hours, 30 minutes
                3d 5h 30m

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