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

LMS AI Subsystem - base implementation

XMLWordPrintable

    • MDL-80889-main-s1
    • Hide
      1. Apply the patch and run the upgrade process.
      2. In order to test manually, you need to install AI provider plugin and placement plugin
      3. Go to MDL-80894. Cherry pick the patch commits, but leave the "MDL-80889 AI: LMS Subsystem" commit, we only need the AI provider plugin OpenAI codebase
      4. Run the upgrade process.
      5. Go to MDL-80891. Cherry pick the patch commits, but leave the "MDL-80889 AI: LMS Subsystem" commit, we only need the AI placement plugin text editor.
      6. Run the upgrade process
      7. Navigate to Site admin >> General >> AI >> Manage settings for AI providers
      8. VERIFY there is a OpenAI API Provider plugin, and it's in a disabled state.
      9. Enable OpenAI provider the plugin
      10. VERIFY the toggle button is turning ON
      11. Disable the OpenAI provider the plugin
      12. Click the settings link
      13. VERIFY there is a Provider specific settings form
      14. VERIFY there is a Provider actions table under the save changes button
      15. VERIFY all actions in the provider actions table is in a enabled state.
      16. Disabled the Generate text action
      17. Reload the page
      18. VERIFY that the Generate text action is in a disabled state.
      19. Navigate to Site admin >> General >> AI >> Manage settings for AI placements
      20. VERIFY there is a TinyMCE Editor Placement plugin, and it's in a disabled state.
      21. Click the settings link
      22. VERIFY there is a Placement actions table under the save changes button
      23. VERIFY all actions in the provider actions table is in a enabled state.
      24. Disabled the Generate text action
      25. Reload the page
      26. VERIFY that the Generate text action is in a disabled state.
      Show
      Apply the patch and run the upgrade process. In order to test manually, you need to install AI provider plugin and placement plugin Go to MDL-80894 . Cherry pick the patch commits, but leave the " MDL-80889 AI: LMS Subsystem" commit, we only need the AI provider plugin OpenAI codebase Run the upgrade process. Go to MDL-80891 . Cherry pick the patch commits, but leave the " MDL-80889 AI: LMS Subsystem" commit, we only need the AI placement plugin text editor. Run the upgrade process Navigate to Site admin >> General >> AI >> Manage settings for AI providers VERIFY there is a OpenAI API Provider plugin, and it's in a disabled state. Enable OpenAI provider the plugin VERIFY the toggle button is turning ON Disable the OpenAI provider the plugin Click the settings link VERIFY there is a Provider specific settings form VERIFY there is a Provider actions table under the save changes button VERIFY all actions in the provider actions table is in a enabled state. Disabled the Generate text action Reload the page VERIFY that the Generate text action is in a disabled state. Navigate to Site admin >> General >> AI >> Manage settings for AI placements VERIFY there is a TinyMCE Editor Placement plugin, and it's in a disabled state. Click the settings link VERIFY there is a Placement actions table under the save changes button VERIFY all actions in the provider actions table is in a enabled state. Disabled the Generate text action Reload the page VERIFY that the Generate text action is in a disabled state.
    • 10
    • Team Hedgehog 2024 Review 2, Team Hedgehog 2024 Sprint 3.1

      Implement the initial AI subsystem into Moodle LMS. 

      Working to the guide that the AI subsystem will: provide a consistent and user-friendly way for users to interact with AI in Moodle's user interface, as they do their teaching and learning activities. As well as providing a straightforward way to integrate with various AI providers on the backend.

      An overview of the approach is as follows:

      Overview:

      Broadly the AI subsystem will provide several "Placements". These placements will be UI elements (and associated workflows) in specific user contexts, that will allow users to interact with AI services connected to Moodle LMS. For example when a teacher creates course content, or when a student is interacting with their course content. Placements will also be LMS plugins, allowing for placements to be added overtime and developed by the community.

      The available Placements will allow users to access one or more AI "Actions". These actions are provided by the AI services connected to LMS and are the specific things a user can do. For example when creating course content a teacher could access an action to create an image. Or for students they could use an action to summarise complex text.

      The available Actions will be determined by which AI "Providers" the LMS instance is connected to. These providers are connected to LMS via "Provider Plugins". Each provider plugin will make available one or more actions to the LMS. For example a plugin that connects to the OpenAI API could provide an action that summarises text. OR a Midjourney provider plugin could provide an action to generate an image.

      To help separate out the design and development activities there are individual (linked) trackers to cover: Placements, Actions and Providers.

      TODO: 

      • Individual Provider settings:
        • Move the “save changes button from below the “Provider actions” toggles to above, so it sits under the “Provider Specific settings”
        • Hide the “Provider Specific settings” (with the save button) if the provider doesn’t have any specific settings. (This behaviour will be copied for Placements too).
        • Enable toggle functionality for the “Provider actions”. Currently clicking the toggles to individually enable/disable the actions a Provider supports doesn’t work.  They should update via Ajax when clicked, just like enabling the provider plugins themselves. Also the status of the actions should be saved as part of the provider plugin config. Currently only the Provider specific settings are saved
        • Come up with an inherited/programatic way to render the provider actions on the admin settings page. Currently this requires some code to be copied and pasted into each of the provider plugin `settings.php`. This should just be done automatically, unless a provider wants to override it.
      • Individual Placement settings:
        • The exact same todo’s exist for placements as they do for providers.
      • Action class namespace
        • Currently the action classes namespace is `core_ai\actions\responses` path is `aii/classes/actions` this needs to be updated from “actions” to “aiactions”
        • Add an entry to `lib/apis.json`, this needs to be:
          ```
          "aiactions": {          "component": "core_ai",     "allowedlevel2": true,     "allowedspread": false }
          ,
          ```
      • Privacy API
        • The core ai subsystem stores user data and data about the requests made to the AI. There needs to be correct Privacy API support for this. (DB tables already exist for the implemented actions).
      • Summarise Text Action
        • This action only has an initial (empty class) implemented. This action will need to be implemented for MDL-80890 to work.
      • Unit test coverage
        • There is unit test coverage for existing functions. But like everything it could be better. Will need to review and address any gaps.
      • Behat test coverage
        • There are currently zero behat tests. However, we should be able to add them for some of the admin settings. This might be blocked until we have some providers and placements ready to go.
      • General clean up
        • The code isn’t in a bad state in general and once the above is done it should be pretty good to go. But it would be worth checking and fixing things as we go

       

            meirza.arson@moodle.com Meirza
            matt.porritt@moodle.com Matt Porritt
            Huong Nguyen Huong Nguyen
            Votes:
            6 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 weeks, 2 hours, 4 minutes
                4w 2h 4m

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