core_course/local/activitychooser/repository

A javascript module to handle user AJAX actions.

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

Methods

(inner) activityModules(courseid) → {object}

Source:

Fetch all the information on modules we'll need in the activity chooser.

Parameters:
Name Type Description
courseid Number

What course to fetch the modules for

Returns:

jQuery promise

Type
object

(inner) favouriteModule(modName, modID) → {object}

Source:

Given a module name, module ID & the current course we want to specify that the module is a users' favourite.

Parameters:
Name Type Description
modName String

Frankenstyle name of the component to add favourite

modID int

ID of the module. Mainly for LTI cases where they have same / similar names

Returns:

jQuery promise

Type
object

(inner) fetchFooterData(courseid, sectionid) → {object}

Source:

Fetch all the information on modules we'll need in the activity chooser.

Parameters:
Name Type Description
courseid Number

What course to fetch the data for

sectionid Number

What section to fetch the data for

Returns:

jQuery promise

Type
object

(inner) unfavouriteModule(modName, modID) → {object}

Source:

Given a module name, module ID & the current course we want to specify that the module is no longer a users' favourite.

Parameters:
Name Type Description
modName String

Frankenstyle name of the component to add favourite

modID int

ID of the module. Mainly for LTI cases where they have same / similar names

Returns:

jQuery promise

Type
object