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

Small fix to capability support on the new LTI External Tools page

XMLWordPrintable

    • MOODLE_403_STABLE
    • MOODLE_403_STABLE
    • MDL-78753-master
    • Hide

      This just tests the page cap check. The automated testing covers the testing of the element in the secondary navigation already.

      1. Go to a course as the admin
      2. Enrol a teacher
      3. Go to "Participants > Permissions" and override the "Editing teacher" role via the "Advanced role overrides" select
      4. Filter by 'mod/lti' and set the following:
        • "mod/lti:addpreconfiguredtool" to "Prohibit"
        • "mod/lti:addcoursetool" to "Allow"
      5. Save
      6. Log out
      7. Log in as the teacher and go to the course
      8. Note the course id in the URL
      9. Change the URL to: SITE/mod/lti/coursetools.php?id= {courseid}, swapping {courseid}

        with your courseid

      10. Verify you see the following error:

        Sorry, but you do not currently have permissions to do that (View course external tools).
        

      Show
      This just tests the page cap check. The automated testing covers the testing of the element in the secondary navigation already. Go to a course as the admin Enrol a teacher Go to "Participants > Permissions" and override the "Editing teacher" role via the "Advanced role overrides" select Filter by 'mod/lti' and set the following: "mod/lti:addpreconfiguredtool" to "Prohibit" "mod/lti:addcoursetool" to "Allow" Save Log out Log in as the teacher and go to the course Note the course id in the URL Change the URL to: SITE/mod/lti/coursetools.php?id= {courseid}, swapping {courseid} with your courseid Verify you see the following error: Sorry, but you do not currently have permissions to do that (View course external tools).
    • 1
    • Team Alpha - Planning I3-2023

      This page lists site and course tools, but doesn't factor in the capabilities:

      'mod/lti:addmanualinstance' and 'mod/lti:addpreconfiguredinstance' which control the use of the course and site-level tools respectively. If the user doesn't have one or the other of these caps, they shouldn't see either course or site-level tools (as per the existing behaviour in the "Preconfigured tool" select in the External tool add/edit form (see lti_get_lti_types_by_course() method for details).

      This issue should just slightly augment the report SQL to address this, based on the current user caps.

      And update automated tests.

      See my comment below - the above is not the correct behavior and is not what we want to implement in the report page.

        1. MDL-78753.png
          356 kB
          Ron Carl Alfon Yu

            jaked Jake Dallimore
            jaked Jake Dallimore
            Mathew May Mathew May
            Mihail Geshoski Mihail Geshoski
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            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 - 3 hours, 57 minutes
                3h 57m

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