This element was developed by Nico Ritschel. Please carefully test the element and understand its features and limitations before deploying it in a course. It is provided as-is and not officially maintained by PrairieLearn, so we can only provide limited support for any issues you encounter!
If you like this element, you can use it in your own PrairieLearn course by copying the contents of the elements folder into your own course repository. After syncing, the element can be used as illustrated by the example question that is also contained in this repository.
This element embeds external smart learning content into a PrairieLearn question using the SPLICE Smart Learning Content Protocol. The embedded content is entirely responsible for implementing the desired grading logic and providing the computed score via the protocol. PrairieLearn saves this score once a student submits their answer.
The example below is a code completion exercise taken from the SPLICE Content Catalog. Clicking the "CodeCheck" button runs and grades the student's code outside PrairieLearn. The reported score can then be submitted by clicking "Save & Grade".
<pl-splice
answers-name="demo"
content-url="https://codecheck.io/files/wiley/ch-bj4cc-c06_exp_6_105">
</pl-splice>| Attribute | Type | Description |
|---|---|---|
answers-name |
string (required) | Unique name for the element. |
content-url |
string (required) | URL of the smart learning content to be embedded into the question. |
disable-submit |
boolean (default: true) |
Whether the "Save & Grade" and "Save" buttons should be disabled until a score has been reported. This prevents accidental blank submissions if students forget to trigger the external grading before trying to submit their score. |
weight |
integer (default: 1) |
Weight to use when computing a weighted average score over elements. |
In the context of the SPLICE Smart Learning Content Protocol, PrairieLearn acts as a learning system and relies on the embedded content to implement the appropriate methods to report score and state information. If supported by the embedded content, the PrairieLearn element saves the learning content's reported state and attempts to restore it after reloading the page. Note that the protocol does not currently support PrairieLearn's submission and answer panels, so any content to display in these panels needs to be custom set (e.g., via the <pl-submission-panel> and <pl-answer-panel> elements).
One fundamental limitation of this element is that the SPLICE protocol is entirely implemented in the browser, and that it is trivial for a student with technical expertise to interfere with the grading and score reporting process. For example, a student could reverse engineer the grading criteria or manually set their reported score to 100%, and PrairieLearn has no way to detect or prevent this manipulation. This element should therefore be used only for practice or low-stakes assessments where cheating is less of a concern. Since content is loaded from an external source, most CBTF set-ups will also not be able to support questions using this element unless exceptions are added to how network traffic is restricted by the facility.
