block_accessreview/module

Manager for the accessreview block.

Source:
Author:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Members

(static, constant) init

Source:

Setting up the access review module.

(inner, constant) numColours :number

Source:

The number of colours used to represent the heatmap. (Indexed on 0.)

Type:
  • number

(inner) toggleState :boolean

Source:

The toggle state of the heatmap.

Type:
  • boolean

Methods

(inner) fetchReviewData(courseid, updatePreference) → {Array.<Promise>}

Source:

Fetch the review data.

Parameters:
Name Type Default Description
courseid Number
updatePreference Boolean false
Returns:
Type
Array.<Promise>

(inner) getErrorTotals(sectionData, moduleData) → {Object}

Source:

Parses information on the errors, generating the min, max and totals.

Parameters:
Name Type Description
sectionData Array.<Object>

The error data for course sections.

moduleData Array.<Object>

The error data for course modules.

Returns:

An object representing the extra error information.

Type
Object

(inner) getTogglePreferenceParams(toggleState) → {Promise}

Source:

Set the user preference for the toggle value.

Parameters:
Name Type Description
toggleState Boolean
Returns:
Type
Promise

(inner) hideAccessMap(updatePreference)

Source:

Hides or removes the templates from the HTML of the current page.

Parameters:
Name Type Default Description
updatePreference Boolean false

(inner) renderTemplate(element, errorCount, checkCount, displayFormat, minViews, viewDelta) → {Promise}

Source:

Renders the HTML template onto a particular HTML element.

Parameters:
Name Type Description
element HTMLElement

The element to attach the HTML to.

errorCount number

The number of errors on this module/section.

checkCount number

The number of checks triggered on this module/section.

displayFormat String
minViews Number
viewDelta Number
Returns:
Type
Promise

(inner) showAccessMap(courseId, displayFormat, updatePreference) → {Promise}

Source:

Applies the template to all sections and modules on the course page.

Parameters:
Name Type Default Description
courseId Number
displayFormat String
updatePreference Boolean false
Returns:
Type
Promise

(inner) toggleAccessMap(courseId, displayFormat)

Source:

Toggles the heatmap on/off.

Parameters:
Name Type Description
courseId Number
displayFormat String