CodeCheck® as an LTI App

Learning Tools Interoperability (LTI) is a standard way of plugging an external tool (in this case, CodeCheck), into a learning management system (LTI). The most common LMS are Canvas, Moodle, and Blackboard, but there are many others, and most of them support LTI.

With most LMS, you first need to configure the tool.

You can then make assignments in the LMS that invoke the tool.

If you assign many CodeCheck problems, you probably don't want a separate entry for each problem in your gradebook. For that reason, CodeCheck also provides an assignment feature that allows you to define an LTI assignment consisting of multiple CodeCheck problems.

Each LTI assignment is identified by a specific “launch URL”. For CodeCheck, those are the URLs that you obtain from authoring a problem or from composing an assignment.

Note: You do not have to configure CodeCheck for an LMS. CodeCheck works perfectly well without one. However, if you use CodeCheck inside your LMS, then the scores show up automatically in your gradebook.

Configuring CodeCheck as an LTI Tool

In order to use CodeCheck inside your LMS, you need a “consumer key” and “shared secret”. Contact me (cay@horstmann.com) to get one. For testing, you can use consumer key test2023 and shared secret tr6i!flCride until you receive a permanent one.

Depending on how your LMS is administered, you may or may not have the right to install an LTI app. If you don't have that right, you still may have the right to invoke an LTI app by providing the launch URL, consumer key, and shared secret with each assignment. Or you may not, in which case you need to ask your administrators to install the app for you.

Some institutions only allow LTI apps from an approved list. If you cannot install CodeCheck as an LTI tool in your LMS, you have two options: Use an openly available LMS such as the free Canvas instance at https://canvas.instructure.com. Alternatively, use CodeCheck without an LMS. It works just fine, except that the scores don't show up in your gradebook.

Adding CodeCheck to Canvas

  1. Select Settings, then Apps, then “View App Configurations”, then “+App”.
  2. Select “By URL” for the configuration type. (Do not attempt “Manual Entry” unless you know what you are doing.) Provide CodeCheck as the name. Enter the consumer key and shared secret. For the Config URL, provide
    https://codecheck.io/lti/config
  3. Confirm the dialog, and CodeCheck is added as an app.

Adding CodeCheck to Moodle

Adding CodeCheck to Blackboard Ultra

  1. Click on Admin in the left panel
  2. Select LTI Tool Providers in the Integrations tab
  3. Click on Register LTI 1.1 Provider
  4. Provider Domain: codecheck.io
  5. Provider Domain Status: Approved
  6. Default Configuration: Set Globally
  7. Provide consumer key and shared secret below
  8. Send user data: Only over SSL
  9. User fields to be sent: Role in Course
  10. Important: Make sure that in Admin | LTI Tool Providers | Manage Global Properties the option “Allow configured tool providers to post marks” is set to Yes.

Adding CodeCheck to Open edX

In Studio:

Creating a CodeCheck Assignment

Canvas

  1. In the assignment group to which you want to add the assignment, click on “+Assignment”
  2. Give the assignment a name
  3. Set the Submission type to “External Tool”
  4. Paste the student URL for the problem or assignment after “Enter or find an External Tool URL”. If you haven't yet made the assignment, you can also pick the CodeCheck tool and set up the assignment when prompted. (In this case, you can only edit the assignment from inside your LMS.)
  5. Important: Double-check that the link starts with https:// and not with http://
  6. Important: Check “Load This Tool In A New Tab”. Otherwise, the app will fail when a browser is configured to reject third party cookies.
  7. Set assignment properties (points, due date, and so on)
  8. Save the assignment

Moodle

  1. Outside Canvas, set up a CodeCheck problem or assignment as described previously. Note the student URL such as https://codecheck.io/assignment/2010140721rjdzuhv4nv9d4bjiourush0p
  2. Turn editing on
  3. Add an activity or resource
  4. Select “External Tool” and click “Add”
  5. Give the assignment a name
  6. Under “Launch/cartridge URL”, click on “Show more...”
  7. For the “Secure tool URL”, provide the student URL that you received in the first step.
  8. Important: Double-check that the URL starts with https:// and not with http://
  9. Important: Set the “Launch container” to New window
  10. If the app hasn't been installed globally, provide the consumer key and shared secret.
  11. Set assignment properties (points, due date, and so on)
  12. Save the assignment

Blackboard Ultra

  1. Outside Canvas, set up a CodeCheck problem or assignment as described previously. Note the student URL such as https://codecheck.io/assignment/2010140721rjdzuhv4nv9d4bjiourush0p
  2. In your course, select + to add content, then Create, Teaching Tools with LTI connection.
  3. Give the assignment a name
  4. Configuration URL: The student URL that you received in the first step
  5. Important: Double-check that the URL starts with https:// and not with http://
  6. Important: Check “Open in new window”
  7. If the app hasn't been installed globally, provide the consumer key and shared secret.
  8. Check “Create gradebook entry for this item”
  9. Set assignment properties (points, due date, and so on)
  10. Save the assignment

Open edX

To add an assignment in Studio:

  1. Edit the unit in which you want to add the assignment.
  2. In the Add New Component box, select Advanced > LTI Consumer.
  3. Select Edit in the new component and configure the fields:
  4. Select Save.
  5. Test the new component using the Preview feature or view the live version in the LMS. If you get “Failed OAuth validation” errors, try using the test credentials on your LTI passport. If the test credentials work but yours don't, please request another set of credentials. (Due to a bug in Open edX, some special characters don't seem to work in the shared secret.)

Frequently Asked Questions

How can I reuse assignments over multiple semesters?
Simply reuse the same launch URL. Whenever you view the submissions, you only see the ones from the current course.
What happens if I use http URLs instead of https?
1. The CodeCheck page may fail to load if the browser refuses to embed “insecure” (http) contents into a “secure” (https) page. 2. The LMS may refuse the grade submission when CodeCheck rewrites the http link to https, and the LMS doesn't believe that the sites are the same.
Why should the CodeCheck assignment be displayed in a separate window or tab?
If the learning management system shows the CodeCheck page inside its own pages, the browser considers the assignment “third-party content”. Because so many advertisers abused the public trust, browsers are often configured to block cookies of third party content. This interferes with the legitimate use of cookies for maintaining application state. If the CodeCheck page is shown separate from the learning management system, this browser restriction does not apply.
When I view the student assignments inside the LMS, I don't get to see their names or student IDs but seemingly random identifiers.
That is by design. If your LMS is properly configured, it won't show the names or student IDs to CodeCheck. (And even if that information leaks out, CodeCheck won't use it.) CodeCheck only uses the “opaque ID” that the LMS assigns to each student for use by external tools. If you want to know which student did what, ask them for their IDs. They are displayed on their CodeCheck assignments.
Why don't you just use logins with email addresses and passwords like everyone else?
If I did, your university might not allow you to use the service. They might (somewhat reasonably) argue that one individual can't possibly put together a hack-proof regulation-compliant site that adequately protects private information.

Acknoledgments

Thanks to Carly Born of Carleton College for the Moodle documentation and to João Rodrigues of Universidade de Aveiro for the Open edX documentation.