Skip to content

Sequencing Custom Activities

Martin van Velsen edited this page Feb 21, 2020 · 1 revision

Table of Contents

  1. What is Adaptive Problem Sequencing?
  2. Authoring Adaptive Activities
    1. Recipe
    2. Authoring for EdX-Adapt
    3. Authoring for Tutorgen
  3. Authoring Problem Files
  4. Deploying Your Activities
    1. Deploying in OLI
    2. Deploying in EdX
  5. Configuring and Deploying Your Own EdX-Adapt Server
  6. How Does it Work?
  7. API

What is Adaptive Problem Sequencing?

Most of the time when students are working with online learning content they will be presented with digital pages of course materials. In OLI we call these workbook pages. They resemble traditional print page but they can be much more. One exciting type of content we can build into workbook pages is the capability to display content customized to a student's current level of understanding. The basic idea is that a smart problem retrieval system chooses problems from a pool of labeled problems. Depending on how students perform different problems are chosen and presented. Within OLI this can look something like this:

Adaptive Problem Sequencing

Any time the student clicks the 'Check' button the system evaluates if the problem was answered correct the system chooses a new problem and if the problem was answered incorrectly appropriate feedback is provided. Students can continue working on problems until the system has determined that mastery learning has obtained for the skills associated with the problems.

Authoring Adaptive Activities

You may want to use the XML problem specification in combination with the EdX-Adapt or Tutorgen server to build your own adaptive content. Most of the work involved is to write the problem XML, the activity itself is a generalized framework that uses the XML files to render the problems.

We will provide a basic recipe below to create an adaptive problem set. Once you are familiar with the steps and the content that produces adaptive problem set packages you can modify and adapt your package for either EdX-Adapt or Tutorgen. For now we will follow the recipe to build an EdX-Adapt adaptive activity.

Recipe

  1. Create a new folder in which you can place all of your activity files. You can have subfolders and you can place any file in there you want. Just make sure that you only work in one directory because we will be moving the entire folder around.

  2. Create an index.html file in your activity folder. Cut and paste the content of the example index file below into your file. This does two things, it creates a named container (id="problemcontent") used by the javascript we will be creating that determines where the problem content goes. Also we added a feedback container (id="feedback") so that the code can show any feedback to the student generated by the code. Right now we are using default styles provided by the environment (either OLI or the OLIXBlock) but you can style these components any way you like.

<div id="problemcontent" name="problemcontent" style="padding: 4px; border: 1px solid grey; height: auto;">
</div>
<br>
<div class="asx" style="height: 100px;">
    <div class="feedback clearfix correct">
        <span class="icon"></span>
        <div id="feedback" class="response">

        </div>
        <span class="xBtn">x</span>
    </div>
</div>
  1. Determine the list of problems and skills you would like to make available for sequencing. You might want to base this on the results of a learning objective analysis or other such inquiry. Paste your problem/skill data into a file called problems.csv It should look like our included example file below. This table consists of two columns, the first column is the problem name and the second column is the skill it maps to. Keep in mind that if you want a problem to map to more than one skill you will have to include a separate row for that problem/skill combination.
q1_describe_samp_pop,describesample
q2_describe_samp_pop,describesample
q3_describe_samp_pop,describesample
q4_describe_samp_pop,describesample
q1_id_samp_techniq_critiq_validity,idsampling
q2_id_samp_techniq_critiq_validity,idsampling
q1_id_samp_techniq,idsampling
q2_id_samp_techniq,idsampling
q3_id_samp_techniq,idsampling
q4_id_samp_techniq,idsampling
q1_critiq_study_valid,identifybiassample
q2_critiq_study_valid,identifybiassample
q1_survey_design_critiq_validity,identifybiassample
q2_survey_design_critiq_validity,identifybiassample
q1_experi_vs_obstudy_critiq_valid,experimvsobs
q2_experi_vs_obstudy_critiq_valid,experimvsobs
q1_experi_vs_obstudy,experimvsobs
q2_experi_vs_obstudy,experimvsobs
q3_experi_vs_obstudy,experimvsobs
q4_experi_vs_obstudy,experimvsobs
q1_critiq_study_valid_m2_2,surveydesign
q2_critiq_study_valid_m2_2,surveydesign
q1_survey_design,surveydesign
q2_survey_design,surveydesign
q1_critiq_study_valid_m2,lurkingvar
q2_critiq_study_valid_m2,lurkingvar
q1_id_lurking_var,lurkingvar
q2_id_lurking_var,lurkingvar
q1_id_study_design,studydesigndefin
q4_id_study_design,studydesigndefin
q5_id_study_design,studydesigndefin
q1_study_design_def,studydesigndefin
q2_study_design_def,studydesigndefin
q2_id_study_design,idstudydesign
q3_id_study_design,idstudydesign
q6_id_study_design,idstudydesign
q1_id_study_design_2,idstudydesign
q2_id_study_design_2,idstudydesign
Post_assessment_q6_id_study_design,idstudydesign
Post_assessment_q1_id_study_design_2,idstudydesign
Post_assessment_q2_id_study_design_2,idstudydesign

If you are working with EdX-Adapt you will need an extra file called skills.cvs which is virtually identical to the problems file except it has an extra identifier in between the problem and the skill, like so:

q1_describe_samp_pop,1,describesample
q2_describe_samp_pop,1,describesample
q3_describe_samp_pop,1,describesample
q4_describe_samp_pop,1,describesample
q1_id_samp_techniq_critiq_validity,1,idsampling
q2_id_samp_techniq_critiq_validity,1,idsampling
q1_id_samp_techniq,1,idsampling
q2_id_samp_techniq,1,idsampling
q3_id_samp_techniq,1,idsampling
q4_id_samp_techniq,1,idsampling
q1_critiq_study_valid,1,identifybiassample
q2_critiq_study_valid,1,identifybiassample
q1_survey_design_critiq_validity,1,identifybiassample
q2_survey_design_critiq_validity,1,identifybiassample
q1_experi_vs_obstudy_critiq_valid,1,experimvsobs
q2_experi_vs_obstudy_critiq_valid,1,experimvsobs
q1_experi_vs_obstudy,1,experimvsobs
q2_experi_vs_obstudy,1,experimvsobs
q3_experi_vs_obstudy,1,experimvsobs
q4_experi_vs_obstudy,1,experimvsobs
q1_critiq_study_valid_m2_2,1,surveydesign
q2_critiq_study_valid_m2_2,1,surveydesign
q1_survey_design,1,surveydesign
q2_survey_design,1,surveydesign
q1_critiq_study_valid_m2,1,lurkingvar
q2_critiq_study_valid_m2,1,lurkingvar
q1_id_lurking_var,1,lurkingvar
q2_id_lurking_var,1,lurkingvar
q1_id_study_design,1,studydesigndefin
q4_id_study_design,1,studydesigndefin
q5_id_study_design,1,studydesigndefin
q1_study_design_def,1,studydesigndefin
q2_study_design_def,1,studydesigndefin
q2_id_study_design,1,idstudydesign
q3_id_study_design,1,idstudydesign
q6_id_study_design,1,idstudydesign
q1_id_study_design_2,1,idstudydesign
q2_id_study_design_2,1,idstudydesign
Post_assessment_q6_id_study_design,1,idstudydesign
Post_assessment_q1_id_study_design_2,1,idstudydesign
Post_assessment_q2_id_study_design_2,1,idstudydesign
  1. Add our main adaptive driver to your folder. You can download a version here:
  1. Add a copy of the main OLI embedded activity driver to your folder. You can download a version here:
  1. Add a copy of the main OLI embedded activity css file to your folder. You can download a version here:
  1. Add your problem definitions files. These are the XML files that contain all the actual problem content. You can have one problem per XML file or you can bundle a number of them together. Make sure all of the problem IDs match up with the IDs specified in step 3. We will show you how to author the problem files in a later section: Authoring Problem Files. For now we're trying to make sure that you have a complete package to work with.

  2. Tie it all together by creating the embedded activity xml file

In OLI, as well as in the XBlock version the learning environment knows how to run and display your activity by loading and processing a descriptive xml file. A good example of such a file for the embedded activity would be:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE embed_activity PUBLIC "-//Carnegie Mellon University//DTD Embed 1.1//EN" "http://oli.cmu.edu/dtd/oli-embed-activity_1.0.dtd">
<embed_activity id="example_adaptive_activity" width="670" height="700" >
<title>Example Adaptive Activity</title>
  <source>webcontent/adaptive/oli.js</source>
  <assets>		
    <asset name="adaption">https://edx-adapt-dev.raccoongang.com/api/v1</asset>
    <asset name="style">webcontent/adaptive/oli.css</asset>		
    <asset name="problems">webcontent/adaptive/problems.csv</asset>	
    <asset name="data">webcontent/adaptive/skill-describesample.xml</asset>		
    <asset name="data">webcontent/adaptive/skill-experimvsobs-experi_vs_obstudy_critiq_valid_pool.xml</asset>
    <asset name="data">webcontent/adaptive/skill-experimvsobs-experi_vs_obstudy_pool.xml</asset>
    <asset name="data">webcontent/adaptive/skill-identifybiassample-critiq_study_valid_pool.xml</asset>
    <asset name="data">webcontent/adaptive/skill-identifybiassample-survey_design_critiq_validity_pool.xml</asset>
    <asset name="data">webcontent/adaptive/skill-idsample-id_samp_techniq_critiq_validity_pool.xml</asset>
    <asset name="data">webcontent/adaptive/skill-idsample-stat_sampling_ckpt_id_samp_techniq_pool.xml</asset>
    <asset name="data">webcontent/adaptive/skill-idstudydesign-id_study_design_1_pool.xml</asset>
    <asset name="data">webcontent/adaptive/skill-idstudydesign-id_study_design_2_pool.xml</asset>
    <asset name="data">webcontent/adaptive/skill-lurkingvar-critiq_study_valid_m2_pool.xml</asset>
    <asset name="data">webcontent/adaptive/skill-lurkingvar-id_lurking_var_pool.xml</asset>
    <asset name="data">webcontent/adaptive/skill-surveydesign-critiq_study_valid_m2_2_pool.xml</asset>
    <asset name="data">webcontent/adaptive/skill-surveydesign-survey_design_pool.xml</asset>
    <asset name="data">webcontent/adaptive/skills-studydesigndefin-id_study_design_pool.xml</asset>
    <asset name="data">webcontent/adaptive/skills-studydesigndefin-study_design_def_pool.xml</asset>	
    <asset name="javascript">webcontent/adaptive/adaptive.js</asset>
    <asset name="layout">webcontent/adaptive/adaptive.html</asset>
  </assets>
</embed_activity>

As you may have noticed all the relative paths start with 'webcontent/adaptive/'. The 'adaptive' folder is the folder we asked you to create, the one that holds all of your files. The webcontent folder is a typical folder used in OLI below 'content', which is the main entry point for all of the learning content in your package.

There are a number of keywords in this XML file you should be aware of. They determine how a resource is used. A brief list of what you might find in one of these files is below but we're working on a more exhaustive reference list:

  • source Point this to your oli.js file, it is the Javascript driver we use to interface with the learning environment. Note that you also need this file in the XBlock case. Please do not modify this file and always get the latest from this page or from the repository if you have access to that.

  • adaption A parameter used by the adaptive javascript library to determine the location of the adaptation server. Note that this url is different for the EdX-Adapt case vs the Tutorgen case. See the platforms specific sections below for more details.

  • style Here we load the global adaptive activity CSS file. This file determines for example what the feedback window looks like we showed you in an earlier section where we setup your main index.html file.

  • problems The problem definition CSV file. A comma separated table containing mappings from problem to skills. The list of problems that can be derived from this file is also used to prime the database for the tutorgen instance, besides being used by the adaptive javascript code to keep track of where a student is. In the case of EdX-Adapt this file in combination with skills.csv is used offline to prep the student database.

  • data A relative path to one XML file containing one or more problems. Keep in mind that you can have one but also more than one problem definition per XML file. It all depends on how you want to organize your files on how this is subdivided.

  • javascript A relative path to one javascript file. In this case to begin with just point it to adaptive.js or tutorgen.js. Once this works you can add as many other javascript files as your activity needs.

  • layout This is a relative path to the index.html file we created in an earlier section.

Note! If you're using the OLI XBlock then the webcontent folder is: 'oliactivity/public/webcontent'. You should see this structure in our example adaptive XBlock:

https://github.com/Simon-Initiative/OLIActivityXBlock

  1. Checklist

At this step you should have two items, an activity folder and an xml file that contains pointers to all the resources in your activity folder. As a check, compare your folder to the one we've used below:

Adaptive Problem Sequencing

Please make sure you use this folder structure, it will allow you to use our tools to migrate your activity set between different platforms. We will heavily rely on this structure in the sections below that discuss deploying your activities to different learning environments.

Authoring Problem Files

Most of what you will be authoring are XML files like this example adaptive problem.

Authoring for EdX-Adapt

Authoring for Tutorgen

Deploying Your Activities

Deploying in OLI

Deploying in EdX

Configuring and Deploying Your Own EdX-Adapt Server

These instructions assume you have an account on one of the OLI development machines and that you can download the edx-adapt source from:

https://github.com/raccoongang/edx-adapt.git

Since a server like EdX-Adapt works alongside a course content management system like OLI or EdX, we've tried to encapsulate the service as a container to facilitate scale-ability and easy of maintenance. For those who would like to deploy the server themselves you can use the script below to instantiate a docker image and deploy EdX-Adapt inside of it.

edx-adapt-dockerize.sh

How Does it Work?

Through an API and a light-weight piece of JavaScript middle-ware, we can now allow users to include dynamic content in their workbook pages. This content is chosen by a specialized piece of software based on a student's performance. Take a look at the diagram below, as you can see the problem choice is accomplished by a Javascript client that resides in the workbook page and which has access to a server that contains the sequencing algorithm and the progress information for each specific student.

Adaptive Problem Sequencing

  1. OLI supports all modern browsers and through the browser we can provide additional services and capabilities to those who want to display their dynamic content. For example, through the OLI API we can make any adaptive activity fullscreen, or vise-versa, restrict to a certain display area for mobile deployment.

  2. Within the browser OLI displays workbook pages, representing a single page of content. Within such a page content authors can include many different kinds of materials, ranging from plain text to videos but also intelligent tutors and now adaptive content.

  3. The unit of what can be sequenced is at the level of a single problem, think multiple choice question or one single CTAT tutor. When displaying dynamic content, users do not see much difference from a normal workbpage that features a problem to be done or interactive content to be explored. However, our Javascript client embedded in the workbook page (see item 2) works together with a specially designed server that reasons about what content would be best to serve to a student.

  4. Much of the information that this Javascript client uses comes from the OLI deployment platform, or through EdX in the case where the Javascript client is embedded in our generalized XBlock.

  5. Finally, a dedicated server accepting connections from our Javascript client, processes events and status updates informing the code of how well the student is doing on one particular problem. Depending on the specific student performance, when the student has finished a problem, the adaptive server might indicate to the Javascript client that another problem should be displayed.

  6. We're trying to make the system as open as possible and as soon as we can we will make the Adaptation API available. This is the piece of Javascript that can connect to various problem sequencing servers such as Tutorgen or EdX-Adapt.

Since our Javacript exposes a unified API to the code that runs in the workbook page, we can swap out the type ofserver that determines the best content for a student to work on at any point in time. For example, a common case is to use the EdX-Adapt server, like so:

Adaptive Problem Sequencing

But the same system can work with a Tutorgen back-end instead, like this:

Adaptive Problem Sequencing

API

Adaptive Problem Sequencing