LMS integration (LTI 1.3)#
A self-hosted NucleI gateway can be added to Moodle, Canvas, Blackboard Learn or D2L Brightspace as an LTI 1.3 tool. This page is for the gateway administrator and the LMS administrator, and explains the instructor and student steps they will be asked about. Once it is set up:
- instructors connect an LMS course to a NucleI course and add NucleI assignments to it; each one gets a gradebook column worth the assignment's rubric total;
- students open an assignment from the LMS and see its instructions, deadline and their submission status;
- grades saved in NucleI are released to the student and sent to the LMS gradebook;
- the LMS course roster refreshes when staff launch the tool, with a manual full sync available.
Students still do the work in the NucleI app (TQT Connect → Courses). That tab, and Join course inside it, appear only when Teaching features is on (see Teaching; IT can turn it on for every PC with the teachingFeatures key of the machine policy) and the app is connected to a self-hosted gateway. Datasets, reports and submissions are encrypted in the app before they reach the gateway, and the LMS receives only scores. Whether the gateway administrator can also read them depends on the course's key mode: with the default server mode the gateway holds the course keys, and with end_to_end it does not (see Who holds group keys).
- Concepts: the terms and how a launch works.
- Gateway side: 1. Turn LTI on, 2. Give the LMS the gateway's values, 3. Register the LMS on the gateway.
- Recipes: Moodle, Canvas, Blackboard Learn, D2L Brightspace.
- In the course: connecting a course, linking the app, adding assignments, grades, roster, verification.
- Operating, Troubleshooting, Security
Required settings
- HTTPS with a trusted certificate, and the exact
tool_url. The LMS servers and every user's browser must reach the gateway atlti.tool_urlover HTTPS. A cloud LMS also fetches the gateway's key set from the internet. See HTTPS and the network. - Copy the deployment ID after installing the tool, not just the client ID. A launch from a deployment the gateway does not list fails with
unknown_deployment. - Canvas and Blackboard serve grades from another host. Add it to the registration's grade and roster hosts (
service_hosts), or grades and roster sync are silently not sent. - Students must link their NucleI app once per LMS. Until they do, their grades wait in the queue as "Waiting for the student to link".
- Saving a grade releases it. The student sees the score and the gateway queues it for the LMS gradebook immediately.
- Instructors should link their app before connecting the course, so the course belongs to their real NucleI account.
Concepts#
Terms#
Platform. The LMS, as LTI calls it. Tool. NucleI's gateway, which the LMS opens.
Issuer (platform ID). The address that identifies the LMS, for example https://moodle.example.edu or https://canvas.instructure.com.
Client ID. The number or text the LMS gives the tool when you register it. One registration on the LMS side, one on the gateway side, matched by issuer and client ID.
Deployment ID. The LMS can install one registration several times (per site, sub-account or org unit); each installation has a deployment ID. The gateway accepts launches only from the deployment IDs you list.
Key set (JWKS) URL. Each side publishes its public keys at an address; the other side fetches them to check signatures. The gateway's is https://<gateway>/lti/jwks.
Launch. When a user clicks NucleI in the LMS, the browser goes to the gateway's login URL, is sent back to the LMS to sign the user in (OpenID Connect), and returns to the gateway's launch URL with a signed statement of who they are, which course they are in and their role.
Deep Linking. A launch in which the instructor picks something (here: NucleI assignments) and the gateway sends the choice back so the LMS creates links and gradebook columns.
Assignment and Grade Services (AGS). Lets the gateway create gradebook columns and send scores. Names and Role Provisioning Services (NRPS). Lets the gateway read the course roster.
Account link. The LMS user and the NucleI app user are different accounts until the person enters a short code from the LMS page into the app.
1. Turn LTI on#
Requirements: a gateway installed behind HTTPS. Add to gateway.yaml and restart:
The gateway refuses to start if tool_url is not https://. The log then shows LTI 1.3 tool enabled at https://nmr-gateway.chem.example.edu. All lti.* keys are in the settings reference. On first start the gateway creates its signing key in data/lti/; back that folder up.
2. Give the LMS the gateway's values#
Sign in to the gateway's web pages and open LMS (/admin/lms). The card Values for the LMS administrator lists them for your tool_url:
| LMS field (names vary) | Value |
|---|---|
| LTI version | LTI 1.3 |
| Tool URL, Target link URI, Launch URL | https://nmr-gateway.chem.example.edu/lti/launch |
| Redirect URI(s), Redirect URL(s) | https://nmr-gateway.chem.example.edu/lti/launch |
| Deep linking URL, Content selection URL | https://nmr-gateway.chem.example.edu/lti/launch |
| OpenID Connect login URL, Initiate login URL, Login initiation URL | https://nmr-gateway.chem.example.edu/lti/login |
| Public keyset URL, JWKS URL, Public JWK URL | https://nmr-gateway.chem.example.edu/lti/jwks |
| Signature algorithm | RS256 |
| Services and scopes | Assignment and Grade Services: line items (https://purl.imsglobal.org/spec/lti-ags/scope/lineitem) and scores (https://purl.imsglobal.org/spec/lti-ags/scope/score). Names and Role Provisioning (https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly). |
| Shared user data, privacy | Name and email (to show people by name; the LMS user ID is always sent) |
| Custom parameters | None |
| Placements | A deep-linking placement for instructors to add assignments; optionally a plain course link |
The same values come from the API: GET /api/admin/lti/tool. Dynamic registration (pasting one registration URL into the LMS) is not supported; register by hand as in the recipes below.
3. Register the LMS on the gateway#
After the tool is registered in the LMS, the LMS shows its own values. Enter them on the gateway in one of three ways.
In the web pages. LMS → Platforms → Register LMS, fill in the form, Save:
| Form field | gateway.yaml / API key |
Where the LMS shows it |
|---|---|---|
| Name | name |
Your choice, for example Moodle |
| Issuer (platform ID) | issuer |
Platform ID, Issuer |
| Client ID | client_id |
Client ID, Application ID |
| Deployment IDs (comma-separated) | deployment_ids |
Deployment ID. List every deployment that may launch. |
| Authentication request URL | auth_login_url |
Authentication request URL, OIDC authentication endpoint, Authorization endpoint |
| Access token URL | auth_token_url |
Access token URL, Token endpoint |
| Token audience (Brightspace only) | auth_token_audience |
Brightspace's OAuth2 Audience. Empty for the others. |
| Public keyset URL | keyset_url |
Public keyset URL, JWKS URL |
| Grade and roster hosts | service_hosts |
Your Canvas or Blackboard Learn host name (see below). Comma-separated. |
The three URLs must be https://. Edit changes a registration (issuer and client ID cannot change; delete and register again). Delete is refused while courses are connected through it ("Courses are connected to this platform").
In gateway.yaml. Registrations here are applied at every start, show a gateway.yaml badge on the LMS page and cannot be edited or deleted there ("This platform is managed in gateway.yaml"). Removing one from the file turns it into a normal, editable registration rather than deleting it.
lti:
enabled: true
tool_url: "https://nmr-gateway.chem.example.edu"
platforms:
- name: "Moodle"
issuer: "https://moodle.example.edu"
client_id: "AbCdEf123"
deployment_ids: ["1"]
auth_login_url: "https://moodle.example.edu/mod/lti/auth.php"
auth_token_url: "https://moodle.example.edu/mod/lti/token.php"
keyset_url: "https://moodle.example.edu/mod/lti/certs.php"
With the API, as an administrator:
GW=https://nmr-gateway.chem.example.edu
TOKEN=$(curl -s -X POST $GW/api/auth/login -H 'Content-Type: application/json' \
-d '{"username":"admin","password":"your-admin-password"}' \
| python3 -c 'import sys, json; print(json.load(sys.stdin)["access_token"])')
curl -X POST $GW/api/admin/lti/platforms -H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' -d '{
"name": "Moodle",
"issuer": "https://moodle.example.edu",
"client_id": "AbCdEf123",
"deployment_ids": ["1"],
"auth_login_url": "https://moodle.example.edu/mod/lti/auth.php",
"auth_token_url": "https://moodle.example.edu/mod/lti/token.php",
"keyset_url": "https://moodle.example.edu/mod/lti/certs.php"
}'
GET, PATCH /api/admin/lti/platforms/<id> and DELETE /api/admin/lti/platforms/<id> list, change and remove registrations.
Grade and roster hosts. The gateway sends its access token only to grade and roster addresses that are https:// and on the host of the issuer or the access token URL, or a subdomain of one. Moodle and Brightspace need nothing more. Canvas (<school>.instructure.com or your own Canvas domain) and Blackboard Learn (your Learn domain) serve them from another host: put that host in Grade and roster hosts, for example uni.instructure.com. Addresses on any other host are ignored, so grades are not sent there.
Moodle#
Moodle 4.x. You need the Site administrator role.
A. Register NucleI in Moodle
- Site administration → Plugins → Activity modules → External tool → Manage tools.
- Click configure a tool manually.
- Fill in:
- Tool name:
NucleI - Tool URL:
https://nmr-gateway.chem.example.edu/lti/launch - LTI version: LTI 1.3
- Public key type: Keyset URL
- Public keyset:
https://nmr-gateway.chem.example.edu/lti/jwks - Initiate login URL:
https://nmr-gateway.chem.example.edu/lti/login - Redirection URI(s):
https://nmr-gateway.chem.example.edu/lti/launch - Custom parameters: leave empty
- Tool configuration usage: Show in activity chooser and as a preconfigured tool
- Default launch container: New window is the safest with browsers that block third-party cookies; Embed also works with most browsers.
- Supports Deep Linking (Content-Item Message): ticked; Content Selection URL:
https://nmr-gateway.chem.example.edu/lti/launch
- Tool name:
- 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: Do not use this service
- Privacy: Share launcher's name with tool and Share launcher's email with tool: Always; Accept grades from the tool: Always (or Delegate to teacher).
- Save changes.
B. Copy Moodle's values to the gateway. On the tool's card in Manage tools, click the list icon (View configuration details). Copy Platform ID (issuer), Client ID, Deployment ID, Public keyset URL, Access token URL and Authentication request URL into LMS → Register LMS on the gateway. They look like https://moodle.example.edu/mod/lti/certs.php, …/mod/lti/token.php and …/mod/lti/auth.php. Leave Grade and roster hosts empty.
C. In a course. The tool is available in every course. In Moodle 4.3 and later, a course's More → LTI External tools page can hide site tools from the activity chooser; make sure NucleI is shown there.
D. Add an assignment. The instructor turns editing on, Add an activity or resource → NucleI (or External tool, choose NucleI as the preconfigured tool, then Select content). The gateway's picker opens; see Adding assignments. Back in Moodle the activity name and grade are filled in; Save and return to course.
E. Grades appear in the course gradebook under the activity's name.
Canvas#
You need the Canvas Account admin role (root account, or the sub-account where NucleI should be available).
A. Create the LTI key
- Admin → (your account) → Developer Keys → + Developer Key → + LTI Key.
- Key Name:
NucleI. Owner Email: your address. Redirect URIs:https://nmr-gateway.chem.example.edu/lti/launch. -
Choose a configuration method.
Method Manual Entry:
- Title:
NucleI; Description:NMR courses - Target Link URI:
https://nmr-gateway.chem.example.edu/lti/launch - OpenID Connect Initiation Url:
https://nmr-gateway.chem.example.edu/lti/login - JWK Method: Public JWK URL,
https://nmr-gateway.chem.example.edu/lti/jwks - LTI Advantage Services: turn on Can create and view assignment data in the gradebook associated with the tool, Can create and update submission results for assignments associated with the tool and Can retrieve user data associated with the context the tool is installed in.
- Additional Settings → Privacy Level: Public
- Placements: Assignment Selection and Link Selection, each with message type LtiDeepLinkingRequest; optionally Course Navigation with LtiResourceLinkRequest.
Method Paste JSON: paste this, with your host name:
{ "title": "NucleI", "description": "NMR courses on the NucleI gateway", "oidc_initiation_url": "https://nmr-gateway.chem.example.edu/lti/login", "target_link_uri": "https://nmr-gateway.chem.example.edu/lti/launch", "public_jwk_url": "https://nmr-gateway.chem.example.edu/lti/jwks", "scopes": [ "https://purl.imsglobal.org/spec/lti-ags/scope/lineitem", "https://purl.imsglobal.org/spec/lti-ags/scope/score", "https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly" ], "extensions": [ { "platform": "canvas.instructure.com", "privacy_level": "public", "settings": { "placements": [ { "placement": "assignment_selection", "message_type": "LtiDeepLinkingRequest", "target_link_uri": "https://nmr-gateway.chem.example.edu/lti/launch" }, { "placement": "link_selection", "message_type": "LtiDeepLinkingRequest", "target_link_uri": "https://nmr-gateway.chem.example.edu/lti/launch" }, { "placement": "course_navigation", "message_type": "LtiResourceLinkRequest", "target_link_uri": "https://nmr-gateway.chem.example.edu/lti/launch", "text": "NucleI" } ] } } ], "custom_fields": {} } - Title:
-
Save. In the key list, switch its State to ON and copy the number in the Details column: that is the Client ID.
B. Install it (this creates the deployment)
- Admin → (account) → Settings → Apps → View App Configurations → + App.
- Configuration Type: By Client ID, paste the client ID, Submit, then Install.
- Click the app's gear icon → Deployment Id and copy it.
Installing in several sub-accounts gives several deployment IDs; list them all on the gateway.
C. Register Canvas on the gateway. LMS → Register LMS:
| Field | Instructure-hosted Canvas | Self-hosted Canvas |
|---|---|---|
| Issuer | https://canvas.instructure.com (beta: https://canvas.beta.instructure.com, test: https://canvas.test.instructure.com) |
The lti_iss of your installation |
| Client ID | From step A.4 | |
| Deployment IDs | From step B.3 | |
| Authentication request URL | https://sso.canvaslms.com/api/lti/authorize_redirect |
https://<your canvas>/api/lti/authorize_redirect |
| Access token URL | https://sso.canvaslms.com/login/oauth2/token |
https://<your canvas>/login/oauth2/token |
| Public keyset URL | https://sso.canvaslms.com/api/lti/security/jwks |
https://<your canvas>/api/lti/security/jwks |
| Grade and roster hosts | Your Canvas host, for example uni.instructure.com (and your vanity domain if users reach Canvas by one) |
Not needed if the issuer is your Canvas host |
D. Add an assignment. The instructor creates an assignment: Assignments → + Assignment, Submission Type External Tool → Find → NucleI. The gateway's picker opens in a dialog; after choosing, Select, then Save the assignment. Or add a link to a module: Modules → + → External Tool → NucleI. The gateway keeps the assignment's points and name in step with the NucleI assignment's rubric total and title.
E. Grades appear in the Canvas gradebook in the assignment's column.
Canvas opens tools in a frame. Launches work even when the browser blocks the gateway's cookie in that frame.
Blackboard Learn#
Blackboard registrations are made once in the Anthology Developer Portal, then enabled in your Learn site.
A. Register the tool in the Developer Portal
- Sign in at
developer.anthology.com(formerlydeveloper.blackboard.com), My Apps → Register LTI 1.3 Tool. - Application Name:
NucleI; Domain(s):nmr-gateway.chem.example.edu; Login Initiation URL:https://nmr-gateway.chem.example.edu/lti/login; Tool Redirect URL(s):https://nmr-gateway.chem.example.edu/lti/launch; Tool JWKS URL:https://nmr-gateway.chem.example.edu/lti/jwks; Signing Algorithm: RS256. - Register application and generate API Key. Copy the Application ID (the client ID). The portal lists the issuer and URLs in the next step.
B. Enable it in Learn
- Administrator Panel → Integrations → LTI Tool Providers → Register LTI 1.3/Advantage Tool.
- Client ID: the Application ID. Submit.
- On the tool's settings: Tool Status Approved; User Fields to Send: Role in Course, Name, Email Address; Allow grade service access Yes; Allow Membership Service Access Yes. Submit.
- Open the tool's menu → Edit and copy the Deployment ID.
- The tool's menu → Manage Placements → Create Placement: Label
NucleI, Handlenuclei, Availability Yes, Type Deep Linking content tool, Tool Provider URLhttps://nmr-gateway.chem.example.edu/lti/launch. Submit.
C. Register Blackboard on the gateway:
| Field | Value |
|---|---|
| Issuer | https://blackboard.com |
| Client ID | The Application ID |
| Deployment IDs | From B.4 |
| Authentication request URL | https://developer.blackboard.com/api/v1/gateway/oidcauth |
| Access token URL | https://developer.blackboard.com/api/v1/gateway/oauth2/jwttoken |
| Public keyset URL | https://developer.blackboard.com/api/v1/management/applications/<application id>/jwks.json |
| Grade and roster hosts | Your Learn host, for example learn.uni.edu |
D. Add an assignment. Ultra courses: Course Content → + → Content Market → NucleI. Original courses: Build Content → NucleI. The gateway's picker opens.
E. Grades appear in the Gradebook in a column with the assignment's name.
D2L Brightspace#
You need a role with Manage Extensibility.
A. Register the tool
- Admin Tools (gear) → Manage Extensibility → LTI Advantage → Register Tool, Standard.
- Name:
NucleI; Domain:https://nmr-gateway.chem.example.edu; Redirect URLs:https://nmr-gateway.chem.example.edu/lti/launch; OpenID Connect Login URL:https://nmr-gateway.chem.example.edu/lti/login; Target Link URI:https://nmr-gateway.chem.example.edu/lti/launch; Keyset URL:https://nmr-gateway.chem.example.edu/lti/jwks. - Extensions: tick Assignment and Grade Services, Deep Linking and Names and Role Provisioning Services. Register.
- The confirmation page shows the Brightspace values for the gateway (step C). Copy them now.
B. Deploy it
- On the registration, View Deployments → New Deployment. Tool: NucleI; Name:
NucleI. - Extensions: the same three as above.
- Security Settings: tick Org Unit Information, User Information (Name, Email), Link Information and Classlist including users not known to this deployment (needed for roster sync).
- Add Org Units: choose where it is available (the whole organisation, or some departments). Create Deployment, and copy the Deployment Id.
- View Links → New Link: Name
NucleI, URLhttps://nmr-gateway.chem.example.edu/lti/launch, Type Deep Linking Quicklink. Save and Close.
C. Register Brightspace on the gateway:
| Field | Value |
|---|---|
| Issuer | https://<your site>.brightspace.com (as shown) |
| Client ID | Client Id |
| Deployment IDs | From B.4 |
| Authentication request URL | OpenID Connect Authentication Endpoint, https://<your site>.brightspace.com/d2l/lti/authenticate |
| Access token URL | Brightspace OAuth2 Access Token URL, https://auth.brightspace.com/core/connect/token |
| Token audience (Brightspace only) | Brightspace OAuth2 Audience, https://api.brightspace.com/auth/token |
| Public keyset URL | Brightspace Keyset URL, https://<your site>.brightspace.com/d2l/.well-known/jwks |
| Grade and roster hosts | Empty |
D. Add an assignment. In a course, Content → (module) → Existing Activities → NucleI. The gateway's picker opens.
E. Grades appear under Grades as a grade item with the assignment's name.
In the course#
These steps are the same in every LMS.
Connecting a course#
- The instructor links their NucleI app first (next section). The code is on the same page. The courses the instructor made in the app move to the LMS account with the link.
- They open NucleI from the LMS course (any NucleI link or the course navigation entry). The gateway shows Connect course title to NucleI with two choices: Create a new NucleI course, or Use a course they already made in the app (listed only once their app is linked).
- Connect. Every student, TA and instructor who launches from this LMS course is added to the NucleI course with their LMS role.
Until then, students who open NucleI see Not set up yet: "course is not connected to a NucleI course yet. Your instructor connects it on their first launch." With teaching.open_course_creation: false, only a gateway administrator can choose Create a new NucleI course; an instructor can still connect a course they already own.
Roles. LMS Instructors and course Administrators become instructors, Teaching Assistants become TAs, Learners become students. Other roles (Mentor, Observer, Content Developer) get no place: "Your LMS role in this course has no NucleI course role". A role change in the LMS applies on the next launch or roster sync. People added in NucleI (by invite, enrolment code, or as the creator) keep the role they were given there.
Linking the app to the LMS account#
The gateway creates an account for each LMS user at their first launch. To tie it to the person's NucleI app:
- In the LMS, open NucleI. The page shows Connect your NucleI app, an Open in NucleI button and an eight-character code such as
K7QM 2XPA, valid for 15 minutes. - Choose Open in NucleI. The app opens the Link this LMS account? step with the code already filled in; go to step 3. On a computer without the app, or if the button does nothing, use the code instead: in the NucleI app choose TQT Connect → Courses → Join course and enter the code. The dialog tells an LMS link code from a course enrolment code by trying the enrolment code first; spaces and dashes don't matter. Confirm the Link this LMS account? step, then press Link. The app then names the courses that became available.
- The app shows Link this LMS account? with the LMS name, email and LMS. Press Continue only if that is you.
Linking signs the app in as the LMS account: its course places, submissions and grades belong to one gateway user no matter which computer the app runs on. What the app's profile@computer identity already had (course places, submissions, shares) moves to the LMS account, keeping the higher course role where both had one. If the NucleI profile has a password, that profile on that computer signs in as the LMS account from then on: at each sign-in it proves it holds the signing key certified when it linked, and the key opens only with the profile's password. Other profiles on the same computer, and other computers, keep their own accounts; on another computer the person links once more with a fresh code. The profile gets a new, empty account at its next sign-in after the link is removed, the computer's enrolment is revoked, the person leaves every course of that LMS by roster, or the LMS registration is deleted. The profile's name stays with the LMS account: an app on that computer that does not prove the key, for example because the profile no longer has a password, is refused with "Open this profile with its password to sign in" (proof_required), and no other account takes the name. Sharing to that name reaches the LMS account. Unlinking, Release app on Users, revoking the computer and deleting the LMS registration free the name. Each of these, and a roster sync that drops the person from every course of that LMS, also ends the sessions of the LMS account.
A profile whose key is kept on the computer for scheduled jobs counts as a profile without a password, for as long as one of its jobs is enabled: the app says so when a job is armed on a profile with a password. A profile without a password is linked for its current session only. The app says so when it links: "This profile has no password, so the LMS link lasts until you sign out. Add a password to keep it." At its next sign-in the profile has its own empty account again, and the person links again with a fresh code from the LMS to reach their course work.
On a shared lab computer, give each student their own NucleI profile, with a password. A student's account is reached only from that profile, on the computer it was linked from. Each computer links with its own code. After linking, the launch page shows the connected account and offers another code under Connect another app profile or computer.
Unlinking. In NucleI, TQT Connect → Courses → Unlink in the linked-account line removes the link between the signed-in NucleI account and the LMS account, after a confirmation. The gateway ends that account's sessions and the bindings of every profile that signs in as it; the app then signs in again as the profile's own account. Course work stays with the LMS account; linking again with a fresh code reaches it again. The Courses page shows Unlink in its linked-account line while the signed-in account has an LMS link. Over the API: GET /api/lti/link answers linked with the account's user_id and username; DELETE /api/lti/link unlinks, with the account's session (lms_not_linked when there is no link).
Deleting an LMS registration (LMS → Platforms → Delete, refused while courses are connected) also removes its account links, their codes and certificate receipts, and the profile bindings that depended on them.
Open in NucleI only fills in the code. Nothing is linked until the person presses Link after reading whose LMS account it is; if they did not just choose the button in the LMS, they should cancel. Until a student has linked, they are listed as waiting in the course, and the course's datasets reach them automatically once they have.
A code is used once; a second attempt with the same code is refused with link_code_invalid. A code for an LMS account already linked to another established account (an identity-provider or password account) is refused with lms_identity_linked_elsewhere. After ten wrong codes in 15 minutes, from one account or one address, linking is paused. Grades can only reach the LMS for students who have linked; grades given earlier are sent as soon as they link.
Signing as a verified LMS user#
Linking also certifies the app's signing key for the LMS account, in the same step: the gateway links and certifies only when the app presents the link code and the matching key. The person's review signatures then show as verified LMS signatures to everyone whose app enrolled with the same gateway. Only an app on an enrolled computer gets a certificate, and only when the launch that showed the code was from a course whose roster includes the person. A link from any other launch still works, but the app says its signatures stay unverified until the person links again or chooses Verify identity. If the link fails, the code stays unused and the person can try again with it.
A certificate lasts 7 days. The app asks for a new one at sign-in, from a profile with a password, while the LMS account is linked to its own gateway account and the person is still in a course of that LMS by roster. After the link is removed, the computer's enrolment is revoked, or a roster sync shows the person has left every course of that LMS, no new certificate is issued, and their new signatures become local once the current one runs out. Signatures made while it was valid stay verified.
Adding assignments (Deep Linking)#
- The instructor creates the assignments in the app first (TQT Connect → Courses → (course) → New assignment), with a rubric if it should be graded. See TQT Connect, Courses.
- In the LMS, they add NucleI through the deep-linking placement (see the recipe for each LMS).
- The gateway shows Add NucleI assignments to course, listing each assignment with its points, or "no rubric points" when it has none, and "draft: students see it once published" for unpublished ones. Tick one or several (when the LMS accepts several) and press Add to the LMS course.
- The LMS creates one link per assignment. Each assignment with rubric points gets a gradebook column worth the rubric total; an assignment without rubric points gets a link but no gradebook column.
A NucleI link added by hand (not through the picker) opens the course page. When an instructor opens it the first time, the page offers Link this LMS item with Tie to assignment, so students who open it are sent straight to that assignment.
Grades#
- The instructor reviews and scores the submission in the app. Saving the grade releases it to the student and queues it for LMS pass-back.
- The gateway sends the rubric total, out of the rubric maximum, to the assignment's column. It creates the column if the LMS has none for it, and keeps its maximum and name in step with the assignment. Regrading a released submission sends the new score.
- When the LMS is unavailable, the gateway tries up to 8 times in all, waiting 30 seconds, then 1, 2, 4… minutes, up to an hour, between tries (
lti.score_retry_*settings). - The instructor's launch page shows "Grades are sent to the LMS gradebook." When the LMS did not grant grade access, it says "This LMS did not grant grade pass-back; export grades from NucleI instead." and Export grades (CSV) in the app is the alternative.
Roster#
Connecting the course refreshes its roster immediately. Later instructor and TA launches refresh new LMS members and role changes. For a full reconciliation, use Sync roster from LMS on the course's Members section in the app, or Sync roster from the LMS on the launch page. Administrators can call POST /api/admin/lti/courses/<course id>/roster-sync. Full sync also removes people the LMS added who are no longer active there; it never removes people added in NucleI, or the last instructor. Synced students still need to link their app before grades can reach the LMS.
Verification#
Use a test course with one instructor and one student account.
- As the instructor, link the app and connect the course. The launch page shows the course title and connected app account.
- Create a published assignment with a rubric in the app, and add it through the LMS's deep-linking placement. The LMS shows a NucleI link and a gradebook column.
- As the student, open the link from the LMS, link the app with the code, and submit from the app.
- As the instructor, save the grade. This releases it to the student and queues LMS pass-back.
- Within a minute, the score is in the LMS gradebook. On the gateway, LMS → Grade pass-back, filter Sent, shows the job; if it shows Failed, read Last error and see Grade pass-back.
- Sync roster from LMS in the app reports how many people were added.
Operating#
Grade pass-back queue#
LMS → Grade pass-back lists the queue (newest first, up to 500), filterable by state:
| State | Meaning |
|---|---|
| Pending | Waiting for its first or next try; the previous error is in Last error. |
| Sending | Being delivered by a gateway process. A process that died mid-delivery releases it after 10 minutes. |
| Sent | Delivered. |
| Waiting for the student to link | The student has not linked their app to this LMS. Sent automatically once they do. |
| Failed | Gave up after the retries, or an error that retrying cannot fix. Retry queues it again. |
Only failed or waiting jobs can be retried; the API equivalents are GET /api/admin/lti/score-jobs?status=failed and POST /api/admin/lti/score-jobs/<id>/retry. The instructor's launch page also warns "n grade(s) could not be sent; a gateway admin can retry them."
Signing keys#
LMS → Signing keys lists the gateway's keys. Rotate creates a new signing key; the old one stays published at /lti/jwks, so the LMS keeps accepting messages signed before its key cache refreshes. After a day, Retire the old one. The key in use cannot be retired. API: GET /api/admin/lti/keys, POST /api/admin/lti/keys/rotate, DELETE /api/admin/lti/keys/<kid>.
Troubleshooting#
Launch errors#
The gateway's error page is titled NucleI could not open and shows the message and an error code. The gateway log has LTI request refused: <code>.
| Code | Message | What to check |
|---|---|---|
unknown_platform |
This LMS is not registered with the gateway | The issuer (and client ID) on the gateway must match the LMS exactly, including https:// and no trailing slash. |
ambiguous_platform |
Several registrations share this issuer; the LMS must send client_id | Two registrations share the issuer and the LMS's login request carried no client ID. Keep one registration per issuer for that LMS. |
unknown_deployment |
This LMS deployment is not registered with the gateway | Add the deployment ID to Deployment IDs. Canvas shows it under the app's gear; a new sub-account installation has a new one. |
bad_target |
The launch target is not this gateway | The LMS's target link URI is not under lti.tool_url. Fix the LMS registration or tool_url. |
bad_login |
The LMS sent no login_hint | LMS registration incomplete. |
no_state_cookie |
The browser blocked the sign-in cookie. Ask your LMS administrator to open NucleI in a new window. | Third-party cookies blocked and the LMS offers no frame storage. Set the tool to open in a new window (Moodle: Default launch container). |
no_state_cookie |
The sign-in check could not be verified; launch again | The frame storage check failed. Launch again. |
unknown_state |
This launch has expired or was already used; launch again from the LMS | More than 10 minutes between the click and the return, the back button, or a reload. |
nonce_replayed, nonce_mismatch |
This launch was already used / The launch does not belong to this login | Reloaded or replayed launch. Launch again. |
keyset_unavailable |
Could not read the platform key set: … | The gateway cannot fetch the LMS's keyset URL: wrong URL, outgoing firewall, proxy (HTTPS_PROXY), or an internal CA (SSL_CERT_FILE). Test from the gateway host: curl <keyset url>. |
unknown_key |
The token is signed with a key the platform does not publish | Wrong keyset URL for this LMS (for example Canvas beta vs production). |
bad_signature |
The launch token signature is invalid | Wrong keyset URL. |
bad_algorithm |
The launch token must be signed with RS256 | LMS set to another algorithm. |
wrong_audience |
The launch token is not addressed to this tool (or: The token's authorised party is another tool) | Client ID on the gateway does not match the LMS. |
wrong_issuer |
The launch token comes from a different issuer | Issuer on the gateway does not match the LMS. |
expired, invalid_token |
The launch token has expired / The launch token claims to be issued in the future | Clock difference over one minute. Run NTP on the gateway (timedatectl should say System clock synchronized: yes). |
malformed_token, bad_launch |
The launch token is not a JWT / The LMS did not send a launch token | Something between the LMS and the gateway altered the request, or the redirect URI points elsewhere. |
bad_version, bad_message_type, missing_claim |
Only LTI 1.3.0 launches are supported / Unsupported LTI message type … / The launch carries no … | The LMS sent an LTI 1.1 or an unsupported launch type. Register as LTI 1.3 with the placements in the recipe. |
no_context |
Open NucleI from inside an LMS course | Launched from outside a course (for example an admin page). |
course_not_set_up |
course is not connected to a NucleI course yet. … | The instructor has not connected it yet. |
no_role |
Your LMS role in this course has no NucleI course role | Mentor, observer or another role without a NucleI equivalent. |
course_creation_closed |
Only gateway admins can create courses here; ask yours | teaching.open_course_creation is off. |
bad_course |
That course cannot be connected | The chosen course is already connected to an LMS course, or the user is not its instructor. |
staff_only |
Only an instructor can connect this course (and similar) | The user is not staff in this course. |
unsupported_placement |
This LMS placement does not accept links to assignments | A deep-linking placement that does not accept LTI resource links. Use the placements from the recipe. |
one_only |
This LMS placement accepts one assignment at a time | Tick one. |
no_assignments |
Create an assignment in NucleI (Connect → Courses) first. | The course has no assignments yet. |
page_expired |
This page has expired; open NucleI from the LMS again | Launch pages are valid for two hours. |
rate_limited |
Too many sign-in attempts; wait a minute and launch again | Too many launches from one address. Behind a proxy, set FORWARDED_ALLOW_IPS (Forwarded headers). |
| (no code) | LTI is not enabled on this gateway | lti.enabled is off. |
Errors shown by the LMS#
| Symptom | Cause |
|---|---|
The LMS reports an invalid or unregistered redirect_uri |
The gateway's redirect URI (…/lti/launch) is missing from the LMS registration, or differs (http vs https, another host, trailing slash). |
| The LMS reports an unknown or inactive client | Canvas key not switched ON, Blackboard tool not Approved, or the client ID typed into the gateway belongs to another registration. |
| The deep-linking dialog closes with an error after Add to the LMS course | The LMS could not verify the gateway's signature: it cannot fetch https://<gateway>/lti/jwks (firewall, internal certificate), or the key was retired too early. |
| The frame stays blank or the browser shows a certificate warning | The certificate is not trusted, or the gateway is not reachable from the user's network. |
| NucleI opens but the user is asked to sign in to the LMS again in a loop | Third-party cookies blocked for the LMS itself; open the tool in a new window. |
| The instructor's launch page says "This LMS did not grant grade pass-back", and no jobs appear in Grade pass-back | The LMS registration lacks the line item and score services, or (Canvas, Blackboard) the grade host is missing from Grade and roster hosts, so the gateway ignored the address. Fix it, then open NucleI once from the course: every launch refreshes the course's grade and roster addresses. Grades released before the fix are not queued; release them again. |
Grade pass-back errors#
The Last error column shows one of these:
| Last error | Fix |
|---|---|
| student has no identity on this LMS yet | The student must link their app. Sent automatically afterwards. |
| course is no longer connected to an LMS gradebook | The course lost its grade service (registration deleted, or the LMS stopped granting it). |
| assignment has no rubric points, so the LMS cannot grade it | Give the assignment a rubric, then regrade and release. |
| token endpoint answered HTTP 400 / 401 | Access token URL, client ID or (Brightspace) token audience wrong, or the LMS no longer trusts the gateway's key. Not retried. Fix the registration, then Retry. |
| token endpoint unreachable: … | Outgoing network, proxy or certificate. Retried. |
| service URL is not https on the platform's host | The LMS announced its grade service on another host: add it to Grade and roster hosts. |
| POST service endpoint answered HTTP 403 / 404 | The LMS refused the grade: scopes not granted (Canvas services, Moodle Accept grades), or the column was deleted in the LMS. |
| GET/POST service endpoint answered HTTP 5xx, … unreachable | The LMS was down. Retried with growing waits. |
A Pending job is waiting for its next try (the API's next_attempt_at gives the time); one in Sending for more than 10 minutes is picked up again automatically. If nothing moves at all, check that the gateway is running and that its log has no LTI score worker pass failed.
Roster sync failures show in the app as "The LMS roster could not be read: …" (same causes as grade errors) or "This course has no LMS roster service; launch it from the LMS first" (the LMS did not grant NRPS, or nobody has launched from the course since it was connected).
Security#
- Every launch is verified against the LMS's registration, and a launch cannot be replayed.
- Launch pages create no browser session, and their buttons cannot be triggered from another site. Back up the
lti.key_dirfolder together with the signing keys. - A deep-linked assignment reaches a launch only within the LMS course it was connected to; editing custom parameters in the LMS cannot open another course's assignment.
- The gateway asks the LMS for grade and roster access without a shared secret, and sends the access token only to the LMS's own hosts and the listed grade and roster hosts. Tokens are never written to the log.
- The gateway receives each user's LMS ID, name, email and course role. It sends the LMS only scores (and creates gradebook columns).
- Sign-in attempts, link codes and course enrolment codes are rate-limited per address, so repeated wrong guesses are refused.
- LMS accounts are never reachable through the app's automatic sign-in; only a link code issued in an LMS launch leads to them. See App enrolment and Security notes.