A+ material protocol version 1

Terminology

Requesting a chapter

Chapters are retrieved one by one from the server storing the documents (aka., the content server). The browser or the LMS makes an HTTP GET request to the configured URL.

The request must have the following headers:

Additionally, the following query parameters may be part of the request:

The response document

The response should be an HTML document representing the chapter including: markers for exercises and interactive elements, links to required CSS files, and script elements with valid source addresses.

If there exists an element with class="chapter" or id="chapter", then contents of that element are shown to the user. Otherwise, the contents of the body are shown.

The response may have the following headers:

Exercise types

The following special attributes can be used to mark exercises.

Special data attributes

The LMS should handle the following special data attributes.

Following attributes are reserved for the client, thus do not use them in the document:

An example of the document

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="utf-8" />
  <title>My first chapter</title>

  <!-- head elements with `data-aplus` will be copied to the browser view -->
  <link data-aplus
    rel="stylesheet"
    type="text/css"
    href="https://content.example.com/mycourse/styles.css">
  <script data-aplus
    type="text/javascript"
    src="https://content.example.com/mycourse/interactive.js"
    async></script>

</head>

<body>
  <!--
    contents of the body will be used as there are no elements with
    id="chapter" or class="chapter"
  -->
  <h1>My first chapter</h1>
  <p>
    We talked about setup in
    <a data-aplus-chapter href="previous.html">the previous chapter</a>
  </p>

  <h2>The exercises</h2>

  <p>First, here is a normal exercise</p>
  <div data-aplus-exercise="ref-for-normal-exercise">
    The client is responsible for replacing this element with the actual exercise.
    If this content is visible, then the JavaScript or the LMS has a faulty code-
  </div>

  <p>Second, here is an questionnaire</p>
  <div data-aplus-exercise="ref-for-quiz" data-aplus-quiz>
    The client is responsible for replacing this element with the actual exercise.
    If this content is visible, then the JavaScript or the LMS has a faulty code.
  </div>

</body>

</html>