- Download and install VS Code: https://code.visualstudio.com/
- Install ESlint package: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
- Install ESlint rules: npx install-peerdeps --global eslint-config-wesbos
-
Startup your local Moodle on Docker
-
Go to Site administration > Plugins > Activity modules > External tool > Manage tools
-
Click on configure a tool manually
-
Enter in the following:
Tool name: Tool URL: http://localhost:8080 LTI version: LTI 1.3 Public key type: RSA key Initiate login URL: http://localhost:8080/login Redirection URI(s): http://localhost:8080
Services:
IMS LTI Assignment and Grade Services: Use this service for grade sync and column management IMS LTI Names and Role Provisioning: Use this service to retrieve members' information as per privacy settings Tool Settings: Use this service
Privacy:
Share launcher's name with tool: Always Share launcher's email with tool: Always Accept grades from the tool: Always
-
Click "Save changes"
-
Then under "Tools" find LTI app you just created and click on the "View configurations" icon (first icon, next to gear)
-
Copy Client ID value into PLATFORM_CLIENTID value in .env file (created below in "Startup app" Step 1).
- Install MongoDB: https://docs.mongodb.com/manual/administration/install-community/
- Helpful to install MongoDB Compass to ensure your database is running correctly: https://www.mongodb.com/try/download/compass
-
Copy .env-dist to .env
-
Set LTI_KEY to any random string, and DB_DATABASE to whatever you'd like
-
Comment out DEBUG if you do not want to see the LTI provider debugging messages
-
Start app:
yarn yarn dev
-
On initial load the app will display the public key
-
Copy the key, and remember to remove the '[0] ' characters from the start of each row of the key, and include the BEGIN/END PUBLIC KEY lines
- Go back to Manage Tools section on local CCLE (Site administration > Plugins > Activity modules > External tool > Manage tools)
- Under Tools, find your LTI tool and click the gear icon
- Paste your key into the Public key field
- Click "Save changes"
- Go to a course site
- Turn editing on and click "Add activity or resource", choose External tool, enter any name, choose your LTI tool from Preconfigured tool, and then click "Save changes"
- You should see your tool embedded in the site and the app should load up