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

Add rate limit validation when configuring AI provider

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 5.0
    • 5.0
    • AI
    • MOODLE_500_STABLE
    • MOODLE_500_STABLE
    • Hide
      1. Log in as admin
      2. Navigate to AI > AI providers in site administration
      3. Press Create a new provider instance
      4. Fill in required fields
      5. Tick Limit the number of requests that the AI provider can receive across the entire site every hour. and Limit the number of requests each user can make to the AI provider every hour.
      6. Press Create instance
      7. Confirm you see the following errors in both the Maximum number of site-wide requests and Maximum number of requests per user fields:

        You must enter a whole number that is greater than 0. 
        

      8. Enter a positive number in each of the aforementioned fields
      9. Press Create instance
      10. Confirm instance is created
      Show
      Log in as admin Navigate to AI > AI providers in site administration Press Create a new provider instance Fill in required fields Tick Limit the number of requests that the AI provider can receive across the entire site every hour. and Limit the number of requests each user can make to the AI provider every hour. Press Create instance Confirm you see the following errors in both the Maximum number of site-wide requests and Maximum number of requests per user fields: You must enter a whole number that is greater than 0. Enter a positive number in each of the aforementioned fields Press Create instance Confirm instance is created
    • Hide

      Code verified against automated checks.

      Checked MDL-84457 using repository: https://github.com/paulholden/moodle.git

      More information about this report

      Built on: Wed Feb 19 01:46:13 PM UTC 2025

      Show
      Code verified against automated checks. Checked MDL-84457 using repository: https://github.com/paulholden/moodle.git main (0 errors / 0 warnings) [branch: MDL-84457 | CI Job ] More information about this report Built on: Wed Feb 19 01:46:13 PM UTC 2025
    • Show
      Launching automatic jobs for branch MDL-84457 https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18304/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62590/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62591/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62592/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62593/ App tests (stable app version) Built on: Wed Feb 19 02:25:27 PM UTC 2025

      See the following:

      Add form validation to ensure that if either global/user rate limit is enabled, that a positive value is entered in the corresponding input field (because entering a zero or negative number wouldn't make sense, and likely cause confusion as it effectively disables the provider actions, which may otherwise be configured as "Enabled")

      I found these fields a bit confusing when clicking around. For your consideration

            pholden Paul Holden
            pholden Paul Holden
            Matt Porritt Matt Porritt
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 25 minutes
                25m

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