CourseThemeModule

coursetheme. CourseThemeModule

Module which handles course theming

Constructor

new CourseThemeModule()

Source:

Extends

  • AbstractApiModule

Members

content :ContentModule

Source:
Cached module instance for easy access
Type:
  • ContentModule

Methods

applyHandler() → {function}

Source:
Handles applying theme settings
Returns:
Handler function
Type
function

getVariablesString(data, variablesStr) → {string}

Source:
Generates a LESS variables string
Parameters:
Name Type Description
data object The data to process
variablesStr string String memo to allow recursion
Returns:
The processed LESS varaibles string
Type
string

(async) init()

Source:

(async) processFileVariables(data)

Source:
Copies uploaded font files into the build
Parameters:
Name Type Description
data object The data to process

removeHandler() → {function}

Source:
Handles removing theme settings
Returns:
Handler function
Type
function

(async) setValues()

Source:

(async) writeCustomLess(fwBuild)

Source:
Writes the customStyle and themeVariables attributes to LESS files. themeVariables are reduced into a string of variables, in the format `@key: value;`
Parameters:
Name Type Description
fwBuild AdaptFrameworkBuild Reference to the current build

(async) writeFile(fwBuild, filename, fileContents) → {Promise}

Source:
Writes a file to the theme folder
Parameters:
Name Type Description
fwBuild Object Build data
filename String Name of output file
fileContents String Contents to be written
Returns:
Type
Promise