instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.52k stars 2.45k forks source link

Mastery Path API not showing in Scope selector UI #2080

Open japomani opened 2 years ago

japomani commented 2 years ago

Summary:

The documented Mastery Path API only includes the ability to select a mastery path:

https://canvas.instructure.com/doc/api/modules.html#method.context_module_items_api.select_mastery_p...

By itself, this API is not very useful. What is not documented is the part of the APIs that make Mastery paths work, the ability to:

Identify what paths are available Identify what path a student is currently in

However, these APIs are visible in browser network traffic:

/api/v1/courses/:course_id/mastery_paths/stats/student_details /api/v1/courses/:course_id/mastery_paths/rules

We have been able to use these APIs to add Mastery Paths to our gamified modules LTI. BUT..., these APIs do not work with scoped developer keys, making them unusable to our clients.

These APIs are scoped, but they are not included in the Developer Key Scopes UI in the Canvas Admin UI. As a result, their endpoints cannot be added to a Developer Key scope.

This seems like a simple fix to me: add the endpoints to the Scope UI please.

Steps to reproduce:

  1. Open Developer Key UI in Admin
  2. Open key scopes
  3. These scopes are missing: /api/v1/courses/:course_id/mastery_paths/stats/student_details /api/v1/courses/:course_id/mastery_paths/rules

Expected behavior:

See these scopes and be able to add them to a key /api/v1/courses/:course_id/mastery_paths/stats/student_details /api/v1/courses/:course_id/mastery_paths/rules

Actual behavior:

The scopes are missing

Additional notes:

We are trying to satisfy a client request to show mastery paths in our Gamified Canvas Modules LTI, please help as soon as you can, thank you!