Skip to content

Commit

Permalink
Major release that includes:
Browse files Browse the repository at this point in the history
- Separation of Assessment (for Items API) and Authoring (for Author API)
- Extension for Authoring (languageTextDirection)
  • Loading branch information
michaelsharman committed Feb 6, 2024
1 parent f5a96b0 commit 711f51d
Show file tree
Hide file tree
Showing 184 changed files with 11,504 additions and 48,353 deletions.
37 changes: 33 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This is a utility library of helper modules useful if you're developing with Learnosity APIs.

Modules are separated between Assessment (when using Items API) and Authoring (when using Author API).

See [documentation here](https://michaelsharman.github.io/LT/).

## Important
Expand All @@ -26,16 +28,18 @@ npm install @caspingus/lt
Everything is written using ES6 modules. By default we use `LT` as a variable for
the toolkit. If you want to change this, use named imports.

`LT` expects to be given the Items API application instance in the `readyListener`.
From there you can call any method you want off the `LT` object.
`LT` expects to be given the application instance in the `readyListener`, either Items API
or Author API. From there you can call any method you want off the `LT` object.

## Items API

```
// Declare and set your variable with the Items API LearnosityItems.init() method
const itemsApp = LearnosityItems.init(signedConfigObject);
// Pass that app instance to the Toolkit constructor
import { LT } from '@caspingus/lt/src/js/index';
import { LT } from '@caspingus/lt/src/assessment/index';
LT.init(itemsApp);
Expand All @@ -50,7 +54,7 @@ window.LT = LT;
## Usage examples

```
import { LT } from '@caspingus/lt/src/js/index';
import { LT } from '@caspingus/lt/src/assessment/index';
// See if the item was _fully_ attempted
LT.isItemFullyAttempted();
Expand All @@ -61,3 +65,28 @@ LT.isLastItemInSection();
// See the question response object
LT.questionResponse();
```

## Author API

```
// Declare and set your variable with the Author API LearnosityItems.init() method
const authorApp = LearnosityAuthor.init(signedConfigObject);
// Pass that app instance to the Toolkit constructor
import { LT } from '@caspingus/lt/src/authoring/index';
LT.init(authorApp);
// Optionally add to the global scope (for development)
window.LT = LT;
```

## Usage examples

```
import { LT } from '@caspingus/lt/src/authoring/index';
// Injects a route hash to the URI so SPAs can load to a deep view from a full page refresh.
LT.routingHash();
```
203 changes: 0 additions & 203 deletions docs/AssessmentQuestions.html

This file was deleted.

Loading

0 comments on commit 711f51d

Please sign in to comment.