-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mechanism for discovering tools in Canvas account, creating stub LtiTool records (#9) #287
base: main
Are you sure you want to change the base?
Conversation
TinyMCE Default Config Modification (tl-its-umich-edu#203) (tl-its-umich-edu#266)
API_URL = options['api_url'] | ||
canvas = Canvas(API_URL, API_KEY) | ||
|
||
primary_acount = canvas.get_account(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably make this account configurable. It want to be run on subaccounts.
# avoid duplicates: get_or_create | ||
if not LtiTool.objects.filter(canvas_id=ex_tool.id).exists(): | ||
tool = LtiTool.objects.create( | ||
name=ex_tool.name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll want to append something to the name like "(PLACEHOLDER)".
We're also using the fact that the ID not being set means the tool is "disabled" now, we probably will need to add a new column to indicate this if we're having a new process to run this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roujiawang added an is_public
field now, so I think we're good on the second front. It might be useful to include placeholder text, not completely sold though.
course_nav_placement = CanvasPlacement.objects.get(name='Course Navigation') | ||
for ex_tool in ex_tool_list: | ||
# for now, only care about tools with placement "course_navigation" | ||
if ex_tool.__dict__["course_navigation"] is not None \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll probably also want to make this configurable but this is fine hardcoding for now.
Good start on this feature idea! I'm sure we'll have a few more things to talk about with this and to get through the other ToDo items. |
…-explorer into issue-9-pull-list-of-canvas-available-tools
…/github.com/roujiawang/canvas-app-explorer into issue-9-pull-list-of-canvas-available-tools
#9
To Do
models
, addpublic
BooleanField
field for LTI Tool instances, and set this field toFalse
by default.admin
, display this field, and allow quick actions to change the value of this field for multiple instances.views
, add a filter so that user view only lists tools whosepublic
field is set totrue
.True
or set toFalse
, and the tool will display/hide accordingly in user viewCanvas id
to display; that is, some tool with an invalidCanvas id
will not display to users even if this field is set as 'True'canvasapi
code intoCanvasLtiManager
or another adapter class