core_course/activitychooser

Description:
  • A type of dialogue used as for choosing modules in a course.

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

A type of dialogue used as for choosing modules in a course.

Methods

(inner) getCoursePositionFromTarget(target) → {Object}

Description:
  • Return the course position of a target add activity element.

Source:
Properties:
Name Type Description
sectionNum Number

The section number.

sectionReturnNum Number | null

The section return number.

beforeMod Number | null

The ID of the cm to add the modules before.

Parameters:
Name Type Description
target HTMLElement

The target element.

Returns:

The course position of the target.

Type
Object

(inner) init(courseId, chooserConfig)

Description:
  • Set up the activity chooser.

Source:
Parameters:
Name Type Description
courseId Number

Course ID to use later on in fetchModules()

chooserConfig Object

Any PHP config settings that we may need to reference

(inner) registerListenerEvents(courseId)

Description:
  • Once a selection has been made make the modal & module information and pass it along

Source:
Parameters:
Name Type Description
courseId Number