D2L Brightspace Integration
Connect the Gradescope Submitter to D2L Brightspace using LTI 1.3.
Prerequisites
- D2L Administrator access (or work with your admin)
- Your server running with HTTPS
- Server domain name
Step 1: Register LTI Tool in D2L
INFO
This requires D2L Administrator access. Contact your institution's D2L admin if needed.
- In D2L, go to Admin Tools → Manage Extensibility
- Click LTI Advantage → Register Tool
- Enter the following configuration:
| Field | Value |
|---|---|
| Name | Gradescope Code Submitter |
| Domain | your-server-domain.com |
| Redirect URLs | https://your-server-domain.com/lti/launch |
| Target Link URI | https://your-server-domain.com/codemirror-demo.html |
| OpenID Connect Login URL | https://your-server-domain.com/lti/login |
| Keyset URL | https://your-server-domain.com/.well-known/jwks.json |
- After registration, copy:
- Client ID → Put in
.envasLTI_CLIENT_ID - Deployment ID → Put in
.envasLTI_DEPLOYMENT_ID
- Client ID → Put in
Step 2: Create LTI Link in Course
- In your D2L course, go to Content
- Create a new External Learning Tool link
- Select your registered LTI tool
- Add custom parameters for the assignment:
asg_id=YOUR_GRADESCOPE_ASSIGNMENT_ID
file_name=program.pyStep 3: Add to Quiz
Option A: Iframe Embed
- Create or edit a Quiz in D2L
- Add a Written Response question
- In the question text, switch to HTML mode and add:
html
<iframe
src="https://your-server-domain.com/codemirror-demo.html?asg_id=ASSIGNMENT_ID&file_name=program.py"
width="100%"
height="600px"
frameborder="0"
allow="clipboard-read; clipboard-write">
</iframe>Replace:
your-server-domain.comwith your actual server URLASSIGNMENT_IDwith the Gradescope assignment ID
Option B: LTI Link
- In the quiz, add an External Tool question type
- Select your registered LTI tool
- Configure custom parameters
LTI Data Flow
D2L Quiz → LTI Launch Request → /lti/launch endpoint
↓
Validate LTI payload (signature, claims)
↓
Extract student info (email, name, ID)
↓
Check for existing Gradescope session
↓
Redirect to code editor with contextCustom Parameters
Pass assignment-specific data via LTI custom parameters:
| Parameter | Description |
|---|---|
asg_id | Gradescope assignment ID |
file_name | Submission filename (default: program.py) |
starter | Starter code template file |
Troubleshooting
"Invalid LTI launch"
- Verify
LTI_CLIENT_IDandLTI_DEPLOYMENT_IDmatch D2L registration - Check server logs for specific validation errors
- Ensure HTTPS is properly configured
Iframe not loading
- D2L requires HTTPS for iframe embedding
- Check X-Frame-Options headers on your server
- Verify D2L whitelist includes your domain
Student not recognized
- LTI passes student email from D2L
- Ensure student is enrolled in Gradescope course
- Check that emails match between systems
Security Considerations
- LTI signatures — All launches are cryptographically signed
- State tokens — Prevent CSRF attacks in auth flow
- Session isolation — Each student has separate credentials
- HTTPS required — All communication is encrypted
Next Steps
- Creating Assignments — Set up individual assignments
- HTTPS Configuration — Enable HTTPS for production