Example 4: Deploy a SCORM content

In this case, the CID server is an e-learning platform which accepts SCORM packages. The deployment of SCORM packages needs the intervention of a user in order to fill some platform-specific information and to then deploy the package in a pedagogical activity.

Server manifest

1
<?xml version="1.0" encoding="UTF-8"?>
2
<cid:manifest xmlns:cid="http://www.cid-protocol/schema/v1/core" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cid-protocol/schema/v1/core ../manifest/cid-core.xsd ">
3
    <!-- 
4
        This manifest declares two transports : the first without cookies, the 
5
        second with. Two processes are also defined. They are respectively binded 
6
        to the two different webtransports.
7
    -->
8
9
    <!-- 
10
        This process is binded to standard Transport. It uses a session property to
11
        enable statefull servers.
12
    -->
13
    <cid:process transports="standardTransport" is="http://schema.org/SendAction">
14
        <cid:label xml:lang="en">SCORM deployment</cid:label>
15
16
        <!-- 
17
            A restriction is similar to a meta with the difference that the 
18
            restriction is implicit in the process. The value is unique and set only
19
            once in the manifest and never sent by the client.
20
        -->
21
        <cid:restriction name="Zip-file-names-encoding" value="UTF-8">
22
            <cid:label xml:lang="en">Encoding of the files-name</cid:label>
23
        </cid:restriction>
24
25
        <!-- Definition of custom mimeType -->
26
        <cid:meta name="Content-type" is="http://purl.org/dc/elements/1.1/type">
27
            <cid:value>application/xx-scorm;v1.2</cid:value>
28
            <cid:value>application/xx-scorm;v2004</cid:value>
29
        </cid:meta>
30
31
        <cid:upload url="http://example.com/upload?response=noCookies" needMetas="Content-type" required="true"/>
32
        <cid:interact url="http://example.com/interact?response=noCookies" required="true"/>
33
    </cid:process>
34
35
    <!-- 
36
            This process is binded to the second transport. It needs a client which 
37
            supports cookies 
38
        -->
39
    <cid:process transports="transportWithCookies" is="http://schema.org/SendAction">
40
        <cid:restriction name="Zip-file-names-encoding" value="UTF-8"/>
41
42
        <!-- Definition of custom mimeType -->
43
        <cid:meta name="Content-type" is="http://purl.org/dc/elements/1.1/type">
44
            <cid:value>application/xx-scorm;v1.2</cid:value>
45
            <cid:value>application/xx-scorm;v2004</cid:value>
46
        </cid:meta>
47
48
        <cid:upload url="http://example.com/upload?response=withCookies" needMetas="Content-type" required="true"/>
49
        <cid:interact url="http://example.com/interact?response=withCookies" required="true"/>
50
    </cid:process>
51
52
    <cid:transports>
53
        <cid:webTransport id="standardTransport">
54
            <cid:authentications>
55
                <cid:basicHttp/>
56
            </cid:authentications>
57
            <cid:webInteract>
58
                <cid:request method="GET" properties="header queryString"/>
59
                <cid:request method="POST;application/x-www-form-urlencoded" properties="queryString header post"/>
60
                <cid:request method="POST;multipart/form-data" properties="header queryString post"/>
61
            </cid:webInteract>
62
63
            <cid:webUpload>
64
                <cid:request method="GET" properties="header queryString"/>
65
                <cid:request method="POST" properties="queryString header"/>
66
                <cid:request method="POST;multipart/form-data" properties="header queryString post"/>
67
            </cid:webUpload>
68
        </cid:webTransport>
69
70
        <cid:webTransport id="transportWithCookies" needCookies="true">
71
            <cid:authentications>
72
                <cid:basicHttp/>
73
            </cid:authentications>
74
            <cid:webInteract>
75
                <cid:request method="GET" properties="header queryString"/>
76
                <cid:request method="POST;application/x-www-form-urlencoded" properties="queryString header post"/>
77
                <cid:request method="POST;multipart/form-data" properties="header queryString post"/>
78
            </cid:webInteract>
79
80
            <cid:webUpload>
81
                <cid:request method="GET" properties="header queryString"/>
82
                <cid:request method="PUT" properties="header queryString"/>
83
                <cid:request method="POST" properties="queryString header"/>
84
                <cid:request method="POST;multipart/form-data" properties="header queryString post"/>
85
            </cid:webUpload>
86
        </cid:webTransport>
87
    </cid:transports>
88
</cid:manifest>

The process step by step

Procedure

  1. Manifest exposition

    The server must expose the XML manifest to an accessible URL. For example, at http://example.com/manifest.xml.

  2. Download the manifest

    In order to understand the process, a client must download the server manifest and analyze it.

    Download the manifest
  3. SCORM upload

    A client must send packages which are conform to the suggested values of the content-type metadata and to the imposed value of Zip-file-names-encoding (which is UTF-8). In this example, a client could send a form in a POST request which contains the metadata and the SCORM package in a field named cidContent.

    Content upload
  4. SCORM deployment

    The second step of the process is required. It allows the user to interact directly with the remote server. The latter furnishes a form to fill more metadata or an interface to deploy the SCORM package.

    This interaction must begin by one of the documented webInteraction method. For example, it could begin by an HTTP POST with the session property in a form data.

    Direct interaction