tool_lp/competencyactions

Handle selection changes and actions on the competency tree.

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

Members

(inner) moveSource :Node

Source:

The start of a drag operation

Type:
  • Node

(inner) moveTarget :Node

Source:

The end of a drag operation

Type:
  • Node

(inner) pageContextId :Number

Source:

The page context ID.

Type:
  • Number

(inner) Picker :Object

Source:

instance.

Type:
  • Object

(inner) Rule :Object

Source:

config instance.

Type:
  • Object

(inner) Taxonomy :Object

Source:

constants indexed per level.

Type:
  • Object

(inner) The :Object

Source:

competency we're picking a relation to.

Type:
  • Object

(inner) The :Array

Source:

rules modules. Values are object containing type, namd and amd.

Type:
  • Array

(inner) the :Number

Source:

selected competency ID.

Type:
  • Number

(inner) treeModel :Object

Source:

This is an object representing the nodes in the tree.

Type:
  • Object

Methods

(inner) addCompetencyChildren(parent, competencies)

Source:

Turn a flat list of competencies into a tree structure (recursive).

Parameters:
Name Type Description
parent Object

The current parent node in the tree

competencies Array.<Object>

The flat list of competencies

(inner) addHandler()

Source:

Respond to choosing the "Add" menu item for the selected node in the tree.

(inner) allowDrop(e)

Source:

HTML5 implementation of drag/drop (there is an accesible alternative in the menus).

Parameters:
Name Type Description
e Event

(inner) confirmMove()

Source:

Confirms a competency move.

(inner) deleteCompetencyHandler()

Source:

Show a confirm dialogue before deleting a competency.

(inner) deleteRelatedHandler(e)

Source:

Deletes a related competency without confirmation.

Parameters:
Name Type Description
e Event

The event that triggered the action.

(inner) doDelete()

Source:

Delete a competency.

(inner) doMove()

Source:

A source and destination has been chosen - so time to complete a move.

(inner) dragEnter(e)

Source:

HTML5 implementation of drag/drop (there is an accesible alternative in the menus).

Parameters:
Name Type Description
e Event

(inner) dragLeave(e)

Source:

HTML5 implementation of drag/drop (there is an accesible alternative in the menus).

Parameters:
Name Type Description
e Event

(inner) dragStart(e)

Source:

HTML5 implementation of drag/drop (there is an accesible alternative in the menus).

Parameters:
Name Type Description
e Event

(inner) dropOver(e)

Source:

HTML5 implementation of drag/drop (there is an accesible alternative in the menus).

Parameters:
Name Type Description
e Event

(inner) editHandler()

Source:

Edit the selected competency.

(inner) getTaxonomyAtLevel(level) → {String}

Source:

Return the taxonomy constant for a level.

Parameters:
Name Type Description
level Number

The level.

Returns:
Type
String

(inner) init(model, pagectxid, taxonomies, rulesMods)

Source:

Initialise this page (attach event handlers etc).

Parameters:
Name Type Description
model Object

The tree model provides some useful functions for loading and searching competencies.

pagectxid Number

The page context ID.

taxonomies Object

Constants indexed by level.

rulesMods Object

The modules of the rules.

(inner) initMovePopup(popup)

Source:

A move competency popup was opened - initialise the aria tree in it.

Parameters:
Name Type Description
popup dialogue

The tool_lp/dialogue that was created.

(inner) moveDownHandler()

Source:

Move a competency "down". This only affects the sort order within the same branch of the tree.

(inner) moveHandler(e)

Source:

A node was chosen and "Move" was selected from the menu. Open a popup to select the target.

Parameters:
Name Type Description
e Event

(inner) moveUpHandler()

Source:

Move a competency "up". This only affects the sort order within the same branch of the tree.

(inner) parseTaxonomies(taxonomiesstr) → {Array}

Source:

Return the string "Selected ".

Parameters:
Name Type Description
taxonomiesstr String

Comma separated list of taxonomies.

Returns:

of level => taxonomystr

Type
Array

(inner) relateCompetenciesHandler()

Source:

Open a competencies popup to relate competencies.

(inner) reloadPage(context)

Source:

Re-render the page with the latest data.

Parameters:
Name Type Description
context Object

(inner) seeCoursesHandler()

Source:

Open a dialogue to show all the courses using the selected competency.

(inner) selectionChanged(evt, params) → {Boolean}

Source:

Handler when a node in the aria tree is selected.

Parameters:
Name Type Description
evt Event

The event that triggered the selection change.

params Object

The parameters for the event. Contains a list of selected nodes.

Returns:
Type
Boolean

(inner) strAddTaxonomy(level) → {String}

Source:

Return the string "Add ".

Parameters:
Name Type Description
level Number

The level.

Returns:
Type
String

(inner) strSelectedTaxonomy(level) → {String}

Source:

Return the string "Selected ".

Parameters:
Name Type Description
level Number

The level.

Returns:
Type
String

(inner) triggerCompetencyViewedEvent(competency)

Source:

Log the competency viewed event.

Parameters:
Name Type Description
competency Object

The competency.

(inner) updatedRelatedCompetencies()

Source:

Updates the competencies list (with relations) and add listeners.

(inner) updateSearchHandler(e)

Source:

Perform a search and render the page with the new search results.

Parameters:
Name Type Description
e Event