Ejemplo n.º 1
0
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$request = array('activity_id' => 'itemsassessdemo', 'name' => '', 'rendering_type' => 'assess', 'state' => 'initial', 'type' => 'submit_practice', 'course_id' => $courseid, 'session_id' => Uuid::generate(), 'user_id' => $studentid, 'assess_inline' => true, 'sections' => array(array('items' => array('Demo3', 'Demo4', 'Demo5'), 'config' => array('subtitle' => 'Vocabulary section')), array('items' => array('Demo6', 'Demo7', 'Demo8'), 'config' => array('subtitle' => 'Grammar section')), array('items' => array('Demo9', 'Demo10'), 'config' => array('subtitle' => 'Spelling section'))), 'assess_inline' => true, 'config' => array('title' => 'Demo activity - showcasing sections', 'subtitle' => 'Will be overridden', 'administration' => array('pwd' => '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8', 'options' => array('show_save' => true, 'show_exit' => true, 'show_extend' => true)), 'navigation' => array('scroll_to_top' => false, 'scroll_to_test' => false, 'show_intro' => true, 'show_outro' => true, 'show_next' => true, 'show_prev' => true, 'show_accessibility' => array('show_colourscheme' => true, 'show_fontsize' => true, 'show_zoom' => true), 'show_fullscreencontrol' => true, 'show_progress' => true, 'show_submit' => true, 'show_title' => true, 'show_save' => false, 'show_calculator' => false, 'show_itemcount' => true, 'skip_submit_confirmation' => false, 'toc' => true, 'transition' => 'fade', 'transition_speed' => 400, 'warning_on_change' => false, 'scrolling_indicator' => false, 'show_answermasking' => true, 'show_acknowledgements' => true, 'auto_save' => array('ui' => false, 'saveIntervalDuration' => 500)), 'time' => array('max_time' => 1500, 'limit_type' => 'soft', 'show_pause' => true, 'warning_time' => 120, 'show_time' => true), 'labelBundle' => array('item' => 'Question'), 'ui_style' => 'main', 'ignore_validation' => false, 'questionsApiVersion' => 'v2', 'assessApiVersion' => 'v2', 'configuration' => array('fontsize' => 'normal', 'stylesheet' => '', 'onsubmit_redirect_url' => 'itemsapi_sections.php', 'onsave_redirect_url' => 'itemsapi_sections.php', 'ondiscard_redirect_url' => 'itemsapi_sections.php', 'idle_timeout' => array('interval' => 300, 'countdown_time' => 60))));
include_once 'utils/settings-override.php';
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="jumbotron section">
    <div class="toolbar">
        <ul class="list-inline">
            <li data-toggle="tooltip" data-original-title="Customise API Settings"><a href="#" class="text-muted" data-toggle="modal" data-target="#settings"><span class="glyphicon glyphicon-list-alt"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Preview API Initialisation Object"><a href="#"  data-toggle="modal" data-target="#initialisation-preview"><span class="glyphicon glyphicon-search"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Visit the documentation"><a href="http://docs.learnosity.com/itemsapi/" title="Documentation"><span class="glyphicon glyphicon-book"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Toggle product overview box"><a href="#"><span class="glyphicon glyphicon-chevron-up jumbotron-toggle"></span></a></li>
        </ul>
    </div>
    <div class="overview">
        <h1>Items API – Sections</h1>
        <p>Sections are a way to split up a single activity into discreet buckets of items, with
        the ability to have different activity configuration per section.</p>
        <p>Once students progress to a new <em>section</em>, they cannot navigate back.</p>
    </div>
</div>

<div class="section">
Ejemplo n.º 2
0
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain, 'user_id' => $studentid);
$uniqueResponseIdSuffix = Uuid::generate();
// Activity JSON:  http://docs.learnosity.com/questionsapi/activity.php
$request = '{
    "type": "local_practice",
    "state": "initial",
    "id": "questionsapi-demo",
    "name": "Questions API Demo",
    "course_id": "' . $courseid . '",
    "questions": [
        {
            "type": "formulaV2",
            "response_id": "demoformula1_' . $uniqueResponseIdSuffix . '",
            "description": "Enter a math formula."
        },

        {
            "type": "formulaV2",
            "response_id": "demoformula2_' . $uniqueResponseIdSuffix . '",
            "description": "Enter any expression that evaluates to x.",
            "instant_feedback" : true,
            "validation": {
                "valid_responses" : [
                    [{ "method": "equivSymbolic", "value": "x" }]
                ]
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$item_ref = Uuid::generate();
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$request = array('mode' => 'item_list', 'config' => array('item_list' => array('limit' => 10, 'item' => array('status' => false), 'toolbar' => array('add' => false)), 'item_edit' => array('item' => array('back' => true, 'columns' => false, 'save' => false, 'status' => false, 'reference' => array('edit' => false, 'show' => true), 'mode' => array('default' => 'preview', 'show' => false)), 'widget' => array('delete' => false, 'edit' => false))), 'user' => array('id' => 'demos-site', 'firstname' => 'Demos', 'lastname' => 'User', 'email' => '*****@*****.**'));
include_once 'utils/settings-override.php';
$Init = new Init('author', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="jumbotron section">
    <div class="toolbar">
        <ul class="list-inline">
            <li data-toggle="tooltip" data-original-title="Customise API Settings"><a href="#" class="text-muted" data-toggle="modal" data-target="#settings"><span class="glyphicon glyphicon-list-alt"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Preview API Initialisation Object"><a href="#"  data-toggle="modal" data-target="#initialisation-preview"><span class="glyphicon glyphicon-search"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Visit the documentation"><a href="http://docs.learnosity.com/authorapi/" title="Documentation"><span class="glyphicon glyphicon-book"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Toggle product overview box"><a href="#"><span class="glyphicon glyphicon-chevron-up jumbotron-toggle"></span></a></li>
        </ul>
    </div>
    <div class="overview">
        <h1>Author API – Read Only</h1>
        <p>Sometimes there is a requirement to simply preview content, without the ability
        to make modifications.</p>
        <p>By disabling <a href="#" class="text-muted" data-toggle="modal" data-target="#initialisation-preview">certain configuration flags</a>, you can easily setup read only access
        to your item bank.</p>
    </div>
</div>
Ejemplo n.º 4
0
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Utils\Uuid;
$studentIds = array(Uuid::generate(), Uuid::generate(), Uuid::generate());
?>

<!-- Basic styles to remove padding from the main layout -->
<link rel="stylesheet" href="<?php 
echo $env['www'];
?>
static/css/quad.css">

<div class="container quad">
    <div class="row">
        <div class="col-md-6 quad-left">
            <iframe src="./liveprogress/report.php?user_ids=<?php 
echo implode(',', $studentIds);
?>
"></iframe>
        </div>
        <div class="col-md-6 quad-right">
            <iframe src="./liveprogress/assessment_1.php?user_id=<?php 
echo $studentIds[0];
?>
"></iframe>
        </div>
    </div>
    <div class="row">
        <div class="col-md-6 quad-left">
Ejemplo n.º 5
0
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
/*
   Loads a single item in `review` mode. Note that no
   student responses are loaded, just the raw item and
   the correct response.
*/
$security = array('consumer_key' => $consumer_key, 'domain' => $domain, 'timestamp' => $timestamp);
$itemRef = 'gallery_1_1';
$request = array('user_id' => $studentid, 'state' => 'review', 'session_id' => Uuid::generate(), 'type' => 'local_practice', 'rendering_type' => 'inline', 'items' => [$itemRef]);
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="section">
    <span class="learnosity-item" data-reference="<?php 
echo $itemRef;
?>
"></span>
</div>

<!-- Container for the items api to load into -->
<script src="<?php 
echo $url_items;
?>
"></script>
<script>
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$request = array('activity_id' => 'itemsassessdemo', 'name' => 'Items API demo - assess activity', 'rendering_type' => 'assess', 'state' => 'initial', 'type' => 'submit_practice', 'session_id' => Uuid::generate(), 'user_id' => $studentid, 'items' => array('Demo3', 'Demo4', 'accessibility_demo_6', 'Demo6', 'Demo7', 'Demo8', 'Demo9', 'Demo10', 'audioplayer-demo-1'), 'assess_inline' => true, 'config' => array('ignore_question_attributes' => array(''), 'title' => 'Demo activity - showcasing question types and assess options', 'subtitle' => 'Walter White', 'administration' => array('pwd' => '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8', 'options' => array('show_save' => true, 'show_exit' => true, 'show_extend' => true)), 'navigation' => array('scroll_to_top' => false, 'scroll_to_test' => false, 'show_intro' => true, 'show_outro' => true, 'show_next' => true, 'show_prev' => true, 'show_accessibility' => array('show_colourscheme' => true, 'show_fontsize' => true, 'show_zoom' => true), 'show_configuration' => false, 'show_fullscreencontrol' => true, 'show_progress' => true, 'show_submit' => true, 'show_title' => true, 'show_save' => false, 'show_calculator' => false, 'show_itemcount' => true, 'skip_submit_confirmation' => false, 'toc' => true, 'transition' => 'fade', 'transition_speed' => 400, 'warning_on_change' => false, 'scrolling_indicator' => false, 'show_answermasking' => true, 'show_acknowledgements' => true, 'auto_save' => array('ui' => false, 'saveIntervalDuration' => 500), 'item_count' => array('question_count_option' => false)), 'time' => array('max_time' => 1500, 'limit_type' => 'soft', 'show_pause' => true, 'warning_time' => 120, 'show_time' => true), 'labelBundle' => array('item' => 'Question', 'colorScheme' => 'Colour Scheme', 'paletteInstructions' => 'Instructions...colour', 'answerMasking' => 'Answer Eliminator'), 'ui_style' => 'main', 'configuration' => array('fontsize' => 'normal', 'stylesheet' => '', 'onsubmit_redirect_url' => 'itemsapi_assess.php', 'onsave_redirect_url' => 'itemsapi_assess.php', 'ondiscard_redirect_url' => 'itemsapi_assess.php', 'idle_timeout' => array('interval' => 300, 'countdown_time' => 60), 'submit_criteria' => array('type' => 'attempted'))));
include_once 'utils/settings-override.php';
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="jumbotron section">
    <div class="toolbar">
        <ul class="list-inline">
            <li data-toggle="tooltip" data-original-title="Customise API Settings"><a href="#" class="text-muted" data-toggle="modal" data-target="#settings"><span class="glyphicon glyphicon-list-alt"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Preview API Initialisation Object"><a href="#"  data-toggle="modal" data-target="#initialisation-preview"><span class="glyphicon glyphicon-search"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Visit the documentation"><a href="http://docs.learnosity.com/itemsapi/" title="Documentation"><span class="glyphicon glyphicon-book"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Toggle product overview box"><a href="#"><span class="glyphicon glyphicon-chevron-up jumbotron-toggle"></span></a></li>
        </ul>
    </div>
    <div class="overview">
        <h1>Items API – Assess</h1>
        <p>With the flick of a switch make the items into an assessment. Truly write once - use anywhere.<p>
        <p>Type ctrl+shift+m to open the Administration Panel. The default password is <em>password</em>.</p>
    </div>
</div>

<div class="section">
    <!-- Container for the items api to load into -->
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$request = array('activity_id' => 'branchingadaptivedemo', 'name' => 'Items API demo - branching activity', 'rendering_type' => 'assess', 'state' => 'initial', 'session_id' => Uuid::generate(), 'user_id' => $studentid, 'assess_inline' => true, 'adaptive' => array('type' => 'branching', 'item_difficulty_tolerance' => 1, 'min_item_difficulty' => -4, 'max_item_difficulty' => 2, 'initial_ability' => 0, 'eap' => array('mean' => -0.25, 'standard_deviation' => 0.95, 'theta_min' => -3, 'theta_max' => 2.25, 'num_points' => 40), 'sequence' => array(array('required_tags' => array('Testlet' => array('sequence-1A'))), array('required_tags' => array('Testlet' => array('sequence-1B'))), array('required_tags' => array('Testlet' => array('decision-1A'))))), 'config' => array('title' => 'Branching Assessment', 'administration' => array('pwd' => '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8'), 'ui_style' => 'horizontal-fixed', 'navigation' => array('intro_item' => 'branching-intro', 'show_prev' => false, 'show_progress' => false, 'show_fullscreencontrol' => false, 'scroll_to_top' => true, 'scroll_to_test' => false), 'time' => array('max_time' => 1800), 'assessApiVersion' => "latest", 'configuration' => array('onsubmit_redirect_url' => 'itemsapi_branching.php', 'onsave_redirect_url' => 'itemsapi_branching.php')));
if (isset($_POST['adaptive'])) {
    foreach ($_POST['adaptive'] as $key => $value) {
        if (is_array($value)) {
            foreach ($value as $childKey => $childValue) {
                if (strlen($childValue)) {
                    $request['adaptive'][$key][$childKey] = (double) $childValue;
                } else {
                    unset($request['adaptive'][$key][$childKey]);
                }
            }
        } else {
            if (strlen($value)) {
                $request['adaptive'][$key] = (double) $value;
            } else {
                unset($request['adaptive'][$key]);
            }
        }
    }
}
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>
Ejemplo n.º 8
0
            var itemsActivity = {
                'domain': location.hostname,
                'request': {
                    'user_id': '<?php 
echo $studentid;
?>
',
                    'rendering_type': 'inline',
                    'name': 'Items API demo - feedback activity.',
                    'state': 'initial',
                    'activity_id': '<?php 
echo $activity_id;
?>
',
                    'session_id': '<?php 
echo Uuid::generate();
?>
',
                    'items': itemReferences,
                    'type': 'feedback',
                    'config': {
                        'renderSaveButton' : true
                    }
                }
            };

            $.post('endpoint.php', itemsActivity, function(data, status) {
                console.log('endpoint response', data);
                itemsApp = LearnosityItems.init(data, {
                    readyListener: function() {
                        $('.lrn_save_button').click(function() {
Ejemplo n.º 9
0
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$request = array('activity_template_id' => 'NCI_Study-2', 'activity_id' => 'my-demo-activity', 'name' => 'NCI Test', 'course_id' => $courseid, 'session_id' => Uuid::generate(), 'user_id' => $studentid, 'assess_inline' => false, 'config' => array('administration' => array('pwd' => 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855')));
include_once 'utils/settings-override.php';
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="section">
    <!-- Container for the items api to load into -->
    <div id="learnosity_assess"></div>
</div>
<script src="<?php 
echo $url_items;
?>
"></script>
<script>
    var eventOptions = {
            readyListener: function () {
                console.log('Learnosity Items API is ready');
            }
        },
        activity = <?php 
echo $signedRequest;
?>
,
Ejemplo n.º 10
0
| Main use case right now is to sign an 'items' packet from the Author
| API for previewing.
|
*/
include_once 'config.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array("consumer_key" => $consumer_key, "domain" => $domain);
$service = null;
$sign_type = isset($_POST['sign_type']) ? $_POST['sign_type'] : null;
$show_modal = false;
switch ($sign_type) {
    case 'items-inline':
        $service = 'items';
        $content = $_POST['content'];
        $show_modal = true;
        $request = array('user_id' => $studentid, 'rendering_type' => 'inline', 'name' => 'Items API demo - Inline Activity.', 'state' => 'initial', 'activity_id' => 'itemsinlinedemo', 'session_id' => Uuid::generate(), 'course_id' => $courseid, 'items' => $_POST['item_references'], 'type' => 'submit_practice', 'config' => array('renderSubmitButton' => false, 'questionsApiVersion' => 'v2'));
        break;
    default:
        // No default
        break;
}
if (!is_null($service)) {
    $Init = new Init($service, $security, $consumer_secret, $request);
    $output = $Init->generate();
    if ($show_modal) {
        include_once 'views/modals/' . $sign_type . '.php';
    } else {
        echo $output;
    }
}
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain, 'timestamp' => $timestamp);
$request = array('user_id' => $studentid, 'rendering_type' => 'inline', 'name' => 'Items API demo - Inline Activity.', 'state' => 'initial', 'activity_id' => 'itemsinlinedemo', 'session_id' => Uuid::generate(), 'course_id' => $courseid, 'items' => array('act1', 'act2', 'act3', 'act4', 'act5', 'act6'), 'type' => 'submit_practice', 'config' => array('renderSubmitButton' => true, 'questionsApiVersion' => $version_questionsapi));
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="jumbotron section">
    <div class="pull-right toolbar">
        <ul class="list-inline">
            <li data-toggle="tooltip" data-original-title="Visit the documentation"><a href="http://docs.learnosity.com/itemsapi/" title="Documentation"><span class="glyphicon glyphicon-book"></span></a></li>
        </ul>
    </div>
    <h1>Items API – Inline</h1>
    <p>Distractor rationale are hints shown to a student when they select an incorrect answer.<br>Try choosing
    an incorrect answer for the questions below to see distractor rationale in action.<br>You can specify distractor rationale
    in the author API and then write code to display them.<br> For an example of how to implement distractor rationale, refer to <a href="https://docs.learnosity.com/tutorials/tutorial_202">this tutorial.</a><p>
</div>

<div class="section">
    <p>
        <span class="learnosity-item" data-reference="act1"></span>
        <span class="learnosity-item" data-reference="act2"></span>
        <span class="learnosity-item" data-reference="act3"></span>
        <span class="learnosity-item" data-reference="act4"></span>
        <span class="learnosity-item" data-reference="act5"></span>
Ejemplo n.º 12
0
<?php

use LearnositySdk\Request\Init;
use LearnositySdk\Request\DataApi;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
/*
 * The only reason we're using the Data API here is to
 * retrieve the item references necessary to create a
 * DOM node (to load an item into).
 * This call would ideally be cached by the host page.
 */
$dataApi = new DataApi();
$response = $dataApi->request($url_data . '/latest/itembank/activities', $security, $consumer_secret, ['references' => [$activityRef]]);
if (!$response->getError()['code']) {
    $activity = json_decode($response->getBody(), true)['data'];
    $items = $activity[0]['data']['items'];
}
// Setup your request object as usual
$request = array('user_id' => $studentid, 'name' => 'Items API demo - Inline Activity.', 'state' => 'initial', 'activity_id' => 'itemsinlinedemo', 'session_id' => Uuid::generate(), 'course_id' => 'demo', 'type' => 'submit_practice', 'rendering_type' => 'inline', 'activity_template_id' => $activityRef);
$init = new Init('items', $security, $consumer_secret, $request);
$itemsRequest = $init->generate();
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$request = array('activity_template_id' => 'demo-activity-5', 'activity_id' => 'my-demo-activity', 'name' => 'Accessibility Showcase', 'course_id' => $courseid, 'session_id' => Uuid::generate(), 'user_id' => $studentid, 'config' => array('title' => 'Accessibility Showcase', 'subtitle' => 'Walter White', 'administration' => array('pwd' => '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8')));
include_once 'utils/settings-override.php';
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="section">
    <!-- Container for the items api to load into -->
    <div id="learnosity_assess"></div>
</div>
<script src="<?php 
echo $url_items;
?>
"></script>
<script>
    var eventOptions = {
            readyListener: function () {
                console.log('Learnosity Items API is ready');
            }
        },
        activity = <?php 
echo $signedRequest;
?>
,
Ejemplo n.º 14
0
<?php

include_once '../../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$session_id = Uuid::generate();
$session_state = 'initial';
$activity_id = Uuid::generate();
$request = ['user_id' => $studentid, 'rendering_type' => 'assess', 'assess_inline' => true, 'name' => 'Student Assessment demo', 'state' => $session_state, 'activity_id' => $activity_id, 'session_id' => $session_id, 'activity_template_id' => 'SCORING_DEMO_TEST', 'type' => 'submit_practice', 'config' => array('configuration' => array('onsubmit_redirect_url' => 'feedback.php?session_id=' . $session_id . '&activity_id=' . $activity_id))];
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="jumbotron section">
    <div class="toolbar">
        <ul class="list-inline">
            <li data-toggle="tooltip" data-original-title="Visit the documentation"><a href="http://docs.learnosity.com/itemsapi/" title="Documentation"><span class="glyphicon glyphicon-book"></span></a></li>
        </ul>
    </div>
    <div class="overview">
        <h1>Student Assessment – Step 1</h1>
        <p>Here is a sample student assessment, with a mix of auto and non-autoscorable question types.</p>
        <p>Take the test as a student would, you will be able to add scoring as a teacher after completing the assessment.</p>
        <div class="previewWrapper preview" style="display: none; height: 300px; overflow: scroll;"><pre><code id="xApiPreview"></code></pre></div>
    </div>
</div>

<div class="section">
    <!-- Container for the items api to load into -->
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain, 'timestamp' => $timestamp);
$request = array('user_id' => $studentid, 'rendering_type' => 'inline', 'name' => 'Items API demo - Inline Activity.', 'state' => 'initial', 'activity_id' => 'itemsinlinedemo', 'session_id' => Uuid::generate(), 'items' => array('act1', 'act2', 'act3', 'act4', 'act5', 'act6'), 'type' => 'local_practice');
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="jumbotron section">
    <div class="pull-right toolbar">
        <ul class="list-inline">
            <li data-toggle="tooltip" data-original-title="Visit the documentation"><a href="http://docs.learnosity.com/itemsapi/" title="Documentation"><span class="glyphicon glyphicon-book"></span></a></li>
        </ul>
    </div>
    <h1>Items API – Formative Distractor Rationale</h1>
    <p>Distractor rationale are hints shown to a student when they select an incorrect answer.<br>Try choosing
    an incorrect answer for the questions below to see distractor rationale in action.<br>You can specify distractor rationale
    in the author API and then write code to display them.<br> For an example of how to implement distractor rationale, refer to <a href="https://docs.learnosity.com/tutorials/tutorial_202">this tutorial.</a><p>
</div>

<div class="section">
    <p>
        <span class="learnosity-item" data-reference="act1"></span>
        <span class="learnosity-item" data-reference="act2"></span>
        <span class="learnosity-item" data-reference="act3"></span>
        <span class="learnosity-item" data-reference="act4"></span>
        <span class="learnosity-item" data-reference="act5"></span>
Ejemplo n.º 16
0
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$request = array('activity_id' => 'itemadaptivedemo', 'name' => 'Items API demo - adaptive activity', 'rendering_type' => 'assess', 'state' => 'initial', 'course_id' => $courseid, 'session_id' => Uuid::generate(), 'user_id' => $studentid, 'assess_inline' => true, 'adaptive' => array('type' => 'itemadaptive', 'initial_ability' => 0, 'item_difficulty_tolerance' => 0.1, 'item_difficulty_offset' => 0, 'eap' => array('mean' => 0, 'standard_deviation' => 1, 'theta_min' => -4, 'theta_max' => 4, 'num_points' => 50), 'termination_criteria' => array('min_items' => 5, 'max_items' => 50, 'error_below' => 0.7), 'required_tags' => array(array('type' => 'adaptive-lifecycle', 'name' => 'operational'))), 'config' => array('title' => 'Adaptive Assessment', 'administration' => array('pwd' => '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8'), 'navigation' => array('intro_item' => 'adaptive-intro', 'show_prev' => false, 'show_progress' => false, 'show_fullscreencontrol' => false, 'show_acknowledgements' => true), 'time' => array('max_time' => 1800), 'questionsApiVersion' => $version_questionsapi, 'assessApiVersion' => $version_assesssapi, 'configuration' => array('onsubmit_redirect_url' => 'itemsapi_adaptive.php', 'onsave_redirect_url' => 'itemsapi_adaptive.php')));
if (isset($_POST['adaptive'])) {
    foreach ($_POST['adaptive'] as $key => $value) {
        if (is_array($value)) {
            foreach ($value as $childKey => $childValue) {
                if (strlen($childValue)) {
                    $request['adaptive'][$key][$childKey] = (double) $childValue;
                } else {
                    unset($request['adaptive'][$key][$childKey]);
                }
            }
        } else {
            if (strlen($value)) {
                $request['adaptive'][$key] = (double) $value;
            } else {
                unset($request['adaptive'][$key]);
            }
        }
    }
}
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$request = array('activity_template_id' => 'demo-activity-1', 'activity_id' => 'my-demo-activity', 'name' => 'Demo Activity', 'session_id' => Uuid::generate(), 'user_id' => $studentid, 'assess_inline' => true, 'config' => array('configuration' => array('submit_failed_options' => array('mailto' => true, 'download' => true))));
include_once 'utils/settings-override.php';
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="jumbotron section">
    <div class="toolbar">
        <ul class="list-inline">
            <li data-toggle="tooltip" data-original-title="Customise API Settings"><a href="#" class="text-muted" data-toggle="modal" data-target="#settings"><span class="glyphicon glyphicon-list-alt"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Preview API Initialisation Object"><a href="#"  data-toggle="modal" data-target="#initialisation-preview"><span class="glyphicon glyphicon-search"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Visit the documentation"><a href="http://docs.learnosity.com/itemsapi/" title="Documentation"><span class="glyphicon glyphicon-book"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Toggle product overview box"><a href="#"><span class="glyphicon glyphicon-chevron-up jumbotron-toggle"></span></a></li>
        </ul>
    </div>
    <div class="overview">
        <h1>Items API – Failed Submission</h1>
        <p>Simulates submitting an activity where the network connection isn't available.</p>
        <p>Students get 3 attempts to submit a test before being presented with options to manually
        retrieve their encoded assessment data.</p>
        <p>They also have the chance to keep submitting their activity.</p>
    </div>
</div>
Ejemplo n.º 18
0
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$session_id = 'd132b6be-cbf4-4a0e-94b3-2ce64be68ba3';
$request = array('activity_id' => 'itemsassessdemo', 'name' => 'Items API demo - assess activity', 'rendering_type' => 'assess', 'state' => 'initial', 'type' => 'submit_practice', 'session_id' => Uuid::generate(), 'user_id' => $studentid, 'items' => array('image-annotate-demo'), 'assess_inline' => true, 'config' => array('title' => 'Demo activity - showcasing student tools', 'subtitle' => 'Bart Simpson', 'ui_style' => 'horizontal', 'navigation' => array('show_intro' => false, 'show_outro' => false, 'show_calculator' => true), 'regions' => array('right' => array(array('type' => 'fullscreen_button'), array('type' => 'pause_button'), array('type' => 'separator_element'), array('type' => 'flagitem_button'), array('type' => 'masking_button'), array('type' => 'reviewscreen_button'), array('type' => 'separator_element'), array('type' => 'calculator_button')), 'bottom-right' => array(array('type' => 'previous_button', 'position' => 'left'), array('type' => 'next_button', 'position' => 'right'))), 'time' => array('max_time' => 1500, 'limit_type' => 'soft', 'show_pause' => true, 'warning_time' => 120, 'show_time' => true), 'configuration' => array('onsubmit_redirect_url' => false, 'onsave_redirect_url' => 'student_tools.php', 'ondiscard_redirect_url' => 'student_tools.php')));
include_once 'utils/settings-override.php';
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="jumbotron section">
    <div class="toolbar">
        <ul class="list-inline">
            <li data-toggle="tooltip" data-original-title="Customise API Settings"><a href="#" class="text-muted" data-toggle="modal" data-target="#settings"><span class="glyphicon glyphicon-list-alt"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Preview API Initialisation Object"><a href="#"  data-toggle="modal" data-target="#initialisation-preview"><span class="glyphicon glyphicon-search"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Visit the documentation"><a href="http://docs.learnosity.com/itemsapi/" title="Documentation"><span class="glyphicon glyphicon-book"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Toggle product overview box"><a href="#"><span class="glyphicon glyphicon-chevron-up jumbotron-toggle"></span></a></li>
        </ul>
    </div>
    <div class="overview">
        <h1>Items API – Assess Regions</h1>
        <p>Learnosity regions are a part of the Assess API, and allow you to create a personalized, fluid and extensible assessment UI.</p>
        <p>All visual elements such as buttons, timer, pager, etc. are modularized in such a way that they can be placed
        in different <em>regions</em> of the assessment container.</p>
        <p>Read more about regions on the <a href="http://docs.learnosity.com/assessapi/knowledgebase/regions.php">docs site</a>,
        or select one of the <a href="#" class="text-muted" data-toggle="modal" data-target="#settings">default or custom regions</a>
        to see the sorts of things you can do.</p>
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$request = array('activity_template_id' => 'demo-activity-4', 'activity_id' => 'my-demo-activity', 'name' => 'Accessibility Demo', 'course_id' => $courseid, 'session_id' => Uuid::generate(), 'user_id' => $studentid, 'assess_inline' => true, 'config' => array('title' => 'Accessibility Demo', 'subtitle' => 'Walter White', 'navigation' => array('show_accessibility' => array('show_colourscheme' => true, 'show_fontsize' => true, 'show_zoom' => true)), 'administration' => array('pwd' => '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8')));
include_once 'utils/settings-override.php';
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="jumbotron section">
    <div class="toolbar">
        <ul class="list-inline">
            <li data-toggle="tooltip" data-original-title="Customise API Settings"><a href="#" class="text-muted" data-toggle="modal" data-target="#settings"><span class="glyphicon glyphicon-list-alt"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Preview API Initialisation Object"><a href="#"  data-toggle="modal" data-target="#initialisation-preview"><span class="glyphicon glyphicon-search"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Visit the documentation"><a href="http://docs.learnosity.com/itemsapi/" title="Documentation"><span class="glyphicon glyphicon-book"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Toggle product overview box"><a href="#"><span class="glyphicon glyphicon-chevron-up jumbotron-toggle"></span></a></li>
        </ul>
    </div>
    <div class="overview">
        <h1>Items API – Accessibility</h1>
        <p>The Assess API has a built in accessibility options panel that allows students to adjust settings during their assessment. Options include
        changing the colour scheme, font size and instructions on how to zoom.</p>
    </div>
</div>

<div class="section">
    <!-- Container for the items api to load into -->
Ejemplo n.º 20
0
<?php

include_once '../../../config.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$student = array('id' => htmlspecialchars($_GET['user_id'], ENT_QUOTES), 'name' => 'Hank Schrader');
$request = array('activity_id' => 'itemsassessdemo', 'name' => 'Demo showcasing remote control events', 'rendering_type' => 'assess', 'state' => 'initial', 'type' => 'submit_practice', 'course_id' => $courseid, 'session_id' => Uuid::generate(), 'user_id' => $student['id'], 'items' => array('Demo4', 'Demo3', 'Demo6', 'Demo7', 'Demo8', 'Demo9'), 'config' => array('title' => 'Demo showcasing remote control events', 'subtitle' => $student['name'], 'administration' => array('pwd' => '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8'), 'navigation' => array('intro_item' => 'demo-intro-live-progress', 'item_count' => array('question_count_option' => true)), 'regions' => array('top-right' => array(array('type' => 'timer_element'), array('type' => 'pause_button')), 'right' => array(array('type' => 'previous_button'), array('type' => 'next_button'), array('type' => 'separator_element'), array('type' => 'flagitem_button'), array('type' => 'masking_button'))), 'time' => array('max_time' => 1500, 'limit_type' => 'soft', 'warning_time' => 120, 'show_pause' => true, 'show_time' => true), 'questionsApiVersion' => 'v2', 'assessApiVersion' => $version_assessapi, 'configuration' => array('ondiscard_redirect_url' => './assessment_3.php?user_id=' . htmlspecialchars($_GET['user_id'], ENT_QUOTES), 'onsubmit_redirect_url' => './assessment_3.php?user_id=' . htmlspecialchars($_GET['user_id'], ENT_QUOTES), 'onsave_redirect_url' => './assessment_3.php?user_id=' . htmlspecialchars($_GET['user_id'], ENT_QUOTES), 'events' => true)));
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>
<!doctype html>
<html>
<head>
</head>
<body>
<!-- Container for the items api to load into -->
<div id="learnosity_assess"></div>
<script src="<?php 
echo $url_items;
?>
"></script>
<script>
    var itemsApp = LearnosityItems.init(<?php 
echo $signedRequest;
?>
);
</script>
</body>
</html>
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$request = array('activity_template_id' => 'demo-activity-1', 'activity_id' => 'my-demo-activity', 'name' => 'Demo Activity', 'session_id' => Uuid::generate(), 'user_id' => $studentid, 'assess_inline' => true, 'config' => array('administration' => array('pwd' => '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8')));
include_once 'utils/settings-override.php';
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="jumbotron section">
    <div class="toolbar">
        <ul class="list-inline">
            <li data-toggle="tooltip" data-original-title="Customise API Settings"><a href="#" class="text-muted" data-toggle="modal" data-target="#settings"><span class="glyphicon glyphicon-list-alt"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Preview API Initialisation Object"><a href="#"  data-toggle="modal" data-target="#initialisation-preview"><span class="glyphicon glyphicon-search"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Visit the documentation"><a href="http://docs.learnosity.com/itemsapi/" title="Documentation"><span class="glyphicon glyphicon-book"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Toggle product overview box"><a href="#"><span class="glyphicon glyphicon-chevron-up jumbotron-toggle"></span></a></li>
        </ul>
    </div>
    <div class="overview">
        <h1>Items API – Activities</h1>
        <p>Activities are a wrapper for multiple items authored in the Learnosity Author site. They can also
        include configuration used by the <a href="<?php 
echo $env['www'];
?>
assessment/assess/index.php">Assess API</a> to control the assessment user interface.</p>
        <p>Preview the <a href="#" data-toggle="modal" data-target="#initialisation-preview">API Initialisation Object</a> to see how simple it can be using the Items API to load activities
        authored in the Learnosity item bank.<p>
Ejemplo n.º 22
0
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
$request = array('activity_id' => 'itemsassessdemo', 'name' => 'Items API demo - assess activity', 'rendering_type' => 'assess', 'state' => 'initial', 'type' => 'submit_practice', 'course_id' => $courseid, 'session_id' => Uuid::generate(), 'user_id' => $studentid, 'items' => array('Demo3', 'Demo4', 'Demo12', 'accessibility_demo_6', 'Demo6', 'Demo7', 'Demo8', 'Demo9', 'Demo10'), 'assess_inline' => true, 'config' => array('regions' => 'main', 'title' => 'Demo activity - showcasing question types and assess options', 'subtitle' => 'Walter White', 'time' => array('max_time' => 1500, 'limit_type' => 'soft', 'show_pause' => true, 'warning_time' => 120, 'show_time' => true), 'administration' => array('pwd' => '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8', 'options' => array('show_save' => true, 'show_exit' => true, 'show_extend' => true)), 'configuration' => array('onsubmit_redirect_url' => 'regions.php', 'onsave_redirect_url' => 'regions.php', 'ondiscard_redirect_url' => 'regions.php')));
include_once 'utils/settings-override.php';
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="jumbotron section">
    <div class="toolbar">
        <ul class="list-inline">
            <li data-toggle="tooltip" data-original-title="Customise API Settings"><a href="#" class="text-muted" data-toggle="modal" data-target="#settings"><span class="glyphicon glyphicon-list-alt"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Preview API Initialisation Object"><a href="#"  data-toggle="modal" data-target="#initialisation-preview"><span class="glyphicon glyphicon-search"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Visit the documentation"><a href="http://docs.learnosity.com/itemsapi/" title="Documentation"><span class="glyphicon glyphicon-book"></span></a></li>
            <li data-toggle="tooltip" data-original-title="Toggle product overview box"><a href="#"><span class="glyphicon glyphicon-chevron-up jumbotron-toggle"></span></a></li>
        </ul>
    </div>
    <div class="overview">
        <h1>Items API – Assess Regions</h1>
        <p>Learnosity regions are a part of the Assess API, and allow you to create a personalized, fluid and extensible assessment UI.</p>
        <p>All visual elements such as buttons, timer, pager, etc. are modularized in such a way that they can be placed
        in different <em>regions</em> of the assessment container.</p>
        <p>Read more about regions on the <a href="http://docs.learnosity.com/assessapi/knowledgebase/regions.php">docs site</a>,
        or select one of the <a href="#" class="text-muted" data-toggle="modal" data-target="#settings">default or custom regions</a>
        to see the sorts of things you can do.</p>
    </div>
Ejemplo n.º 23
0
<?php

include_once '../../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain, 'timestamp' => $timestamp);
$itemRef = $_GET['ref'];
$request = array('user_id' => $studentid, 'name' => 'Items API demo - Inline Activity.', 'state' => 'initial', 'activity_id' => 'itemsinlinedemo', 'session_id' => Uuid::generate(), 'course_id' => $courseid, 'type' => 'local_practice', 'rendering_type' => 'inline', 'items' => [$itemRef]);
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>

<div class="section">
    <span class="learnosity-item" data-reference="<?php 
echo $itemRef;
?>
"></span>
    <button type="button" class="btn btn-primary" onclick="location.href='./'">Back &laquo;</button>
</div>

<!-- Container for the items api to load into -->
<script src="<?php 
echo $url_items;
?>
"></script>
<script>
    var eventOptions = {
            readyListener: function () {
                init();
            }
Ejemplo n.º 24
0
<?php

include_once '../../config.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'domain' => $domain);
// Decide which items your want to print
$items = array('printing-mcq', 'printing-mcq-multi', 'printing-token', 'printing-fillintheblank');
$sessionid = Uuid::generate();
// Load the assessment in `local_practice` (you won't want to submit actual responses)
// and using the `inline` rendering type
$request = array('user_id' => $studentid, 'session_id' => $sessionid, 'state' => 'preview', 'rendering_type' => 'inline', 'type' => 'local_practice', 'items' => $items, 'config' => array('fontsize' => 'xlarge', 'renderSubmitButton' => false, 'questionsApiVersion' => 'v2'));
$Init = new Init('items', $security, $consumer_secret, $request);
$signedRequest = $Init->generate();
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
</head>
<body>

<div class="print-container">
    <div>
        <h2>MCQ</h2>
        <span class="learnosity-item" data-reference="printing-mcq"></span>
    </div>
    <div class="page-break">
        <h2>MCQ Multi</h2>
        <span class="learnosity-item" data-reference="printing-mcq-multi"></span>
    </div>
Ejemplo n.º 25
0
<?php

include_once '../../config.php';
include_once 'includes/header.php';
use LearnositySdk\Request\Init;
use LearnositySdk\Utils\Uuid;
$security = array('consumer_key' => $consumer_key, 'user_id' => $studentid, 'domain' => $domain);
$uniqueResponseIdSuffix = substr(Uuid::generate(), 0, 23);
$request = array('name' => 'Demo Activity (8 questions)', 'state' => 'initial', 'title' => 'Demo activity - showcasing question types and assess options', 'subtitle' => 'Walter White', 'administration' => array('pwd' => '5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8', 'options' => array('show_save' => true, 'show_exit' => true, 'show_extend' => true)), 'navigation' => array('scroll_to_top' => false, 'scroll_to_test' => false, 'show_intro' => true, 'show_outro' => true, 'show_next' => true, 'show_prev' => true, 'show_accessibility' => array('show_colourscheme' => true, 'show_fontsize' => true, 'show_zoom' => true), 'show_fullscreencontrol' => true, 'show_progress' => true, 'show_submit' => true, 'show_title' => true, 'show_save' => true, 'show_calculator' => false, 'show_itemcount' => true, 'skip_submit_confirmation' => false, 'toc' => true, 'transition' => 'fade', 'transition_speed' => 400, 'warning_on_change' => false, 'scrolling_indicator' => false, 'show_answermasking' => true, 'exit_securebrowser' => true, 'auto_save' => false), 'time' => array('max_time' => 600, 'limit_type' => 'hard', 'show_pause' => true, 'warning_time' => 60, 'show_time' => true), 'labelBundle' => array('appName' => 'Assess Demo', 'sheet' => 'Question'), 'ui_style' => 'main', 'configuration' => array('questionsApiVersion' => 'v2', 'fontsize' => 'normal', 'dynamic' => false, 'swipe' => false, 'events' => false, 'stylesheet' => '', 'onsave_redirect_url' => $env['protocol'] . $env['page'], 'onsubmit_redirect_url' => $env['protocol'] . $env['page'], 'ondiscard_redirect_url' => $env['protocol'] . $env['page'], 'idle_timeout' => array('interval' => 300, 'countdown_time' => 60)), 'items' => array(array('reference' => 'Demo3', 'content' => '<span class="learnosity-response question-' . $uniqueResponseIdSuffix . '_demo3"></span>', 'workflow' => array(), 'response_ids' => array($uniqueResponseIdSuffix . '_demo3'), 'feature_ids' => array()), array('reference' => 'Demo4', 'content' => '<span class="learnosity-response question-' . $uniqueResponseIdSuffix . '_Demo4"></span>', 'workflow' => array(), 'response_ids' => array($uniqueResponseIdSuffix . '_Demo4'), 'feature_ids' => array()), array('reference' => 'Demo5', 'content' => '<span class="learnosity-response question-' . $uniqueResponseIdSuffix . '_Demo5"></span><span class="learnosity-feature" data-type="calculator"></span>', 'workflow' => array(), 'response_ids' => array($uniqueResponseIdSuffix . '_Demo5'), 'feature_ids' => array()), array('reference' => 'Demo6', 'content' => '<span class="learnosity-response question-' . $uniqueResponseIdSuffix . '_Demo6"></span>', 'workflow' => array(), 'response_ids' => array($uniqueResponseIdSuffix . '_Demo6'), 'feature_ids' => array()), array('reference' => 'Demo7', 'content' => '<span class="learnosity-response question-' . $uniqueResponseIdSuffix . '_Demo7"></span>', 'workflow' => array(), 'response_ids' => array($uniqueResponseIdSuffix . '_Demo7'), 'feature_ids' => array()), array('reference' => 'Demo8', 'content' => '<span class="learnosity-response question-' . $uniqueResponseIdSuffix . '_Demo8"></span>', 'workflow' => array(), 'response_ids' => array($uniqueResponseIdSuffix . '_Demo8'), 'feature_ids' => array()), array('reference' => 'Demo9', 'content' => '<span class="learnosity-response question-' . $uniqueResponseIdSuffix . '_Demo9"></span>', 'workflow' => array(), 'response_ids' => array($uniqueResponseIdSuffix . '_Demo9'), 'feature_ids' => array()), array('reference' => 'Demo10', 'content' => '<span class="learnosity-response question-' . $uniqueResponseIdSuffix . '_Demo10"></span>', 'workflow' => array(), 'response_ids' => array($uniqueResponseIdSuffix . '_Demo10'), 'feature_ids' => array())), 'questionsApiActivity' => json_decode('{
            "type": "submit_practice",
            "state": "initial",
            "id": "assessdemo_' . $uniqueResponseIdSuffix . '",
            "name": "Assess API - Demo",
            "course_id": "' . $courseid . '",
            "session_id": "' . Uuid::generate() . '",
            "questions": [
             {
                "type": "orderlist",
                "list": [
                  "cat",
                  "horse",
                  "pig",
                  "elephant",
                  "mouse"
                ],
                "stimulus": "<p>Arrange these animals from smallest to largest</p>",
                "ui_style": "button",
                "validation": {
                  "show_partial_ui": true,
                  "partial_scoring": true,
                  "valid_score": 1,