- Notifications
You must be signed in to change notification settings - Fork16
LTI template written in Python using the Flask framework. Quickly create a new application that can be launched through your Learning Management System using the LTI protocol. Uses standard configurable Key & Secret to launch.
License
ucfopen/lti-template-flask
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Create a virtual environment that uses Python 2:
virtualenv venv -p /usr/bin/python2.7source venv/bin/activate
Install the dependencies from the requirements file.
pip install -r requirements.txt
Create settings.py from settings.py.template
cp settings.py.template settings.py
Note: settings.py is alreay referenced in the .gitignore and multiple python files, if you want a different settings file name be sure to update the references.
At a minimum, CONSUMER_KEY, SHARED_SECRET, and secret_key need to be input by the developer. The secret_key is used by Flask, but the CONSUMER_KEY and SHARED_SECRET will be used in setting up the LTI. For security purposes, it's best to have randomized keys. You can generate random keys in the command line by using os.urandom(24) and inputing the resulting values into the settings.py file:
import osos.urandom(24)
Here's how you run the flask app from the terminal:
export FLASK_APP=views.pyflask run
Your running server will be visible athttp://127.0.0.1:5000
- Have the XML, consumer key, and secret ready.
- You can use theXML Config Builder to build XML.
- Navigate to the course that you would like the LTI to be added to. Click Settings in the course navigation bar. Then, select the Apps tab. Near the tabs on the right side, click 'View App Configurations'. It should lead to a page that lists what LTIs are inside the course. Click the button near the tabs that reads '+ App'.
- A modal should come up that allows you to customize how the app gets added. Change the configuration in the Configuration Type dropdown menu to 'By URL' or 'Paste XML' depending on how you have your LTI configured. If your LTI is publicly accessible, 'By URL' is recommended. From there, fill out the Name and Consumer Keys, and the Config URL or XML Configuration. Click Submit.
- Your LTI will appear depending on specifications in the XML. Currently, they get specified in theoptions tag within theextensions tag. Extensions can include these options:
- Editor Button (visible from within any wiki page editor in Canvas)
- Homework Submission (when a student is submitting content for an assignment)
- Course Navigation (link on the lefthand nav)
- Account Navigation (account-level navigation)
- User Navigation (user profile)
Note: If you're using Canvas, your version might be finicky about SSL certificates. Keep HTTP/HTTPS in mind when creating your XML and while developing your project. Some browsers will disable non-SSL LTI content until you enable it through clicking a shield in the browser bar or something similar.
About
LTI template written in Python using the Flask framework. Quickly create a new application that can be launched through your Learning Management System using the LTI protocol. Uses standard configurable Key & Secret to launch.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.