Importing Content to Learnosity
A high level technical walkthrough of how a client can import questions, items and activites from legacy assessment solutions.
A company, Dunder Mifflin, has an online assessment platform. The platform has already been built, and they have their own assessment tool which they've created themselves. Teachers can log on to create new content, and students can then take the created assessments. But Dunder Mifflin also has content created by their own in-house assessment experts.
Dunder Mifflin's Needs
Dunder Mifflin is looking to use the Learnosity APIs, to give their teachers and professional authors more options when it comes to question types, and so they do not have to store all of the assessment information themselves. While they have confirmed the Learnosity APIs will meet their needs, their biggest concern is the conversion of their old content to their Learnosity item bank. In total they have half a million items, and don’t want to force their professional authors to re-author the content using Learnosity, nor do they want their teachers to be forced to stay on their old assessment tool, which they no longer want to support.
The Learnosity solution in this case is fairly simple- Dunder Mifflin can use Learnosity’s Data API to write data right to their item bank. This allows them to create questions, items and assessments programmatically, rather than having to do it manually.
While almost all of Learnosity’s APIs are used for rendering an environment on the frontend, the Data API is Learnosity’s only API used as a backend service. This allows Dunder Mifflin the ability not only to get all the information that Learnosity stores for them in its raw format, it allows a great deal of it to be written as well.
The process of converting questions into Learnosity essentially comes in two steps: first, the content has to be converted into Learnosity format. Second, we can use the Data API to write all the items to the Learnosity item bank. Though this may be done in multiple steps, overall, here is the workflow:
For the sake of explanation, we’ll take each step of conversion individually.
At the moment, all of our Items exist in Dunder Mifflin's database. There are essentially three different “levels” of content that Dunder Mifflin would like to convert. The first is the actual question- taking that base level question in its current form and converting it to Learnosity JSON.
While Learnosity provides a QTI conversion engine, the questions are built in Dunder Mifflin’s own unique format, and so they’ve decided to write their own conversion script.
Examples and details of exactly how each question is built in learnosity is available within the Question API documentation. Dunder Mifflin will start with their most common question type: the multiple choice question.
They write a conversion script in whatever language they’d like- this pulls all the relevant question data from their databases, removes all irrelevant information, and changes it to JSON in the format defined within the Questions API docs.
Now that it’s completed, we can write these formatted Questions to the Learnosity Database. We find the appropriate endpoint- in this case, the one for Setting Questions. Dunder Mifflin, knowing that Learnosity SDKs allow for easy recursive calls to the Data API, find an SDK from the Learnosity GitHub to use. In this process, Dunder Mifflin will set a reference for each of these items. They’ll save these references for later.
Once this set is complete, all of the multiple choice questions we’ve imported exist on Learnoisty’s item bank exactly as if they were authored by someone using our tools. Dunder Mifflin now repeats this process, expanding their conversion script to work with all the different question types and features that they used on their old assessment system. But they cannot be rendered yet, because they only exists as questions on Learnosity’s side- and all of Learnosity’s high level APIs render items, rather than individual questions.
Items are containers that can contain multiple questions or features- for some of Dunder Mifflin’s multipart questions, they may have more than one question to an item. There also may be some items with features, like video players and passages, that can go into Items as well. So items could look like any of these:
Once the questions have finished being imported, it’s time to put them inside of items so they can be rendered and tested. This time, they use the Set Items endpoint. They’ll look up the item definition documentation to make sure they’re placing it into each correctly. While most of Dunder Mifflin’s questions will be put into their own items, some of their questions are multipart questions, so they can combine them into one item within this step. They’ll use the references set in the questions import process that they saved.
With this process completed, each item can be rendered exactly as if it were authored within Learnosity’s Author API. Dunder Mifflin’s content experts can check on some items, making sure that the questions are rendering as expected and are displayed correctly within their items. It may be at this point that Dunder Mifflin needs to update their conversion script with changes, should any information be missing or misaligned.
But from this point on, the items can be referenced like any other item:
This may be the end of the import process for some companies who simply want to recreate their items into Learnosity’s item bank. But Dunder Mifflin has one more step, as they also want to combine their items into activity templates. Activity templates are sets of items that can be rendered as one individual test, allowing them to be referenced by one activity template ID, rather than an array of item references.
So, they have one more call to make- using the references of the items set in the previous process, they use the Set Activities endpoint:
With this final process completed, they can check their work- using either the Author API in activity builder mode, or by signing on to learnosity’s prebuilt Author Site.