core_grades/edittree_index

Enhance the gradebook tree setup with various facilities.

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

Methods

(inner) collapseGradeCategories(courseId, userId)

Source:

Method that collapses all relevant grade categories based on the locally stored state of collapsed grade categories for a given user.

Parameters:
Name Type Description
courseId int

The ID of course.

userId int

The ID of the current logged user.

(inner) init(courseId, userId)

Source:

Initialize module.

Parameters:
Name Type Description
courseId int

The ID of course.

userId int

The ID of the current logged user.

(inner) registerListenerEvents(courseId, userId)

Source:

Register related event listeners.

Parameters:
Name Type Description
courseId int

The ID of course.

userId int

The ID of the current logged user.

(inner) toggleCategory(toggleElement, courseId, userId, storeCollapsedState)

Source:

Method that handles the grade category toggle action.

Parameters:
Name Type Description
toggleElement object

The category toggle node that was clicked.

courseId int

The ID of course.

userId int

The ID of the current logged user.

storeCollapsedState boolean

Whether to store (local storage) the state of collapsed grade categories.

(inner) toggleWeightInput(weightOverrideCheckbox)

Source:

Toggle the weight input field based on its checkbox.

Parameters:
Name Type Description
weightOverrideCheckbox object

The weight override checkbox element.

(inner) toggleWeightInput(bulkMoveSelect)

Source:

Submit the bulk move form.

Parameters:
Name Type Description
bulkMoveSelect object

The bulk move select element.

(inner) updateCollapsedCategoriesStoredState(category, courseId, userId, isCollapsing)

Source:

Method that updates the locally stored state of collapsed grade categories based on a performed toggle action on a given grade category.

Parameters:
Name Type Description
category string

The category to be added or removed from the collapsed grade categories local storage.

courseId int

The ID of course.

userId int

The ID of the current logged user.

isCollapsing boolean

Whether the category is being collapsed or not.

(inner) updateParentCategoryRowspans(toggleElement, num)

Source:

Method that updates the rowspan value of all 'parent' category rows of a given category node.

Parameters:
Name Type Description
toggleElement object

The category toggle node that was clicked.

num int

The number we want to add or subtract from the rowspan value of the 'parent' category row elements.