AdaptFrameworkModule

adaptframework. AdaptFrameworkModule

Module to handle the interface with the Adapt framework

Constructor

new AdaptFrameworkModule()

Source:

Extends

  • AbstractModule

Members

apiRouter :Router

Description:
  • Router for handling all API calls
Source:
Router for handling all API calls
Type:
  • Router

path :String

Description:
  • Location of the local Adapt framework files
Source:
Location of the local Adapt framework files
Type:
  • String

postBuildHook :Hook

Description:
  • Invoked after a course has been built. The AdaptFrameworkBuild instance is passed to any observers.
Source:
Invoked after a course has been built. The AdaptFrameworkBuild instance is passed to any observers.
Type:
  • Hook

postInstallHook :Hook

Description:
  • Invoked after a framework install
Source:
Invoked after a framework install
Type:
  • Hook

postUpdateHook :Hook

Description:
  • Invoked after a framework update
Source:
Invoked after a framework update
Type:
  • Hook

preBuildHook :Hook

Description:
  • Invoked prior to a course being built. The AdaptFrameworkBuild instance is passed to any observers.
Source:
Invoked prior to a course being built. The AdaptFrameworkBuild instance is passed to any observers.
Type:
  • Hook

rootRouter :Router

Description:
  • Router for handling all non-API calls
Source:
Router for handling all non-API calls
Type:
  • Router

version :String

Description:
  • Semver formatted version number of the local framework copy
Source:
Semver formatted version number of the local framework copy
Type:
  • String

Methods

(async) buildCourse(options) → {AdaptFrameworkBuild}

Description:
  • Builds a single Adapt framework course
Source:
Parameters:
Name Type Description
options AdaptFrameworkBuildOptions
Returns:
Type
AdaptFrameworkBuild

(async) checkContentAccess(req, data) → {Promise}

Description:
  • Checks whether the request user should be given access to the content they're requesting
Source:
Parameters:
Name Type Description
req external:ExpressRequest
data Object
Returns:
Resolves with boolean
Type
Promise

(async) getInstalledPlugins() → {Promise}

Description:
  • Retrieves the locally installed plugins
Source:
Returns:
Type
Promise

(async) getLatestVersion() → {Promise}

Description:
  • Updates the local copy of the Adapt framework
Source:
Returns:
Type
Promise

(async) getManifestPlugins() → {Promise}

Description:
  • Retrieves the plugins listed in the framework manifest, but not necessarily installed
Source:
Returns:
Type
Promise

(async) importCourse(importPath, userId) → {AdaptFrameworkImportSummary}

Description:
  • Imports a single Adapt framework course
Source:
Parameters:
Name Type Description
importPath String Path to the course import
userId String _id of the new owner of the imported course
Returns:
Type
AdaptFrameworkImportSummary

(async) init()

Source:

(async) initRoutes() → {Promise}

Description:
  • Initialises the module routing
Source:
Returns:
Type
Promise

(async) installFramework() → {Promise}

Description:
  • Installs a local copy of the Adapt framework
Source:
Returns:
Type
Promise

(async) loadSchemas() → {Promise}

Description:
  • Loads schemas from the local copy of the Adapt framework and registers them with the app
Source:
Returns:
Type
Promise

(async) logStatus()

Description:
  • Logs relevant framework status messages
Source:

(async) updateFramework(version) → {Promise}

Description:
  • Updates the local copy of the Adapt framework
Source:
Parameters:
Name Type Description
version string The version to update to
Returns:
Type
Promise