AdaptFrameworkModule

adaptframework. AdaptFrameworkModule

Module to handle the interface with the Adapt framework

Constructor

new AdaptFrameworkModule()

Source:

Extends

  • AbstractModule

Members

apiRouter :Router

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

path :String

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

postBuildHook :Hook

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

preBuildHook :Hook

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

rootRouter :Router

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

version :String

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

Methods

(async) buildCourse(options) → {AdaptFrameworkBuild}

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

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

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

(async) getInstalledPlugins() → {Promise}

Source:
Retrieves the locally installed plugins
Returns:
Type
Promise

(async) getLatestVersion() → {Promise}

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

(async) getManifestPlugins() → {Promise}

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

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

Source:
Imports a single Adapt framework course
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}

Source:
Initialises the module routing
Returns:
Type
Promise

(async) installFramework() → {Promise}

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

(async) loadSchemas() → {Promise}

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

(async) logStatus()

Source:
Logs relevant framework status messages

(async) updateFramework(version) → {Promise}

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