LLMS_Processor_Course_Data::init()

Initializer


Description Description


Return Return

(void)


Top ↑

Source Source

File: includes/processors/class.llms.processor.course.data.php

	protected function init() {

		// for the cron
		add_action( $this->schedule_hook, array( $this, 'dispatch_calc' ), 10, 1 );

		// for LifterLMS actions which trigger recalculation
		$this->actions = array(
			'llms_course_calculate_data' => array(
				'arguments' => 1,
				'callback' => 'schedule_calculation',
				'priority' => 10,
			),
			'llms_user_enrolled_in_course' => array(
				'arguments' => 2,
				'callback' => 'schedule_from_course',
				'priority' => 10,
			),
			'llms_user_removed_from_course' => array(
				'arguments' => 2,
				'callback' => 'schedule_from_course',
				'priority' => 10,
			),
			'lifterlms_lesson_completed' => array(
				'arguments' => 2,
				'callback' => 'schedule_from_lesson',
				'priority' => 10,
			),
			'lifterlms_quiz_completed' => array(
				'arguments' => 3,
				'callback' => 'schedule_from_quiz',
				'priority' => 10,
			),
		);

		// setup throttle vars
		$this->throttle_max_students = apply_filters( 'llms_data_processor_' . $this->id . '_throttle_count', 2500, $this );
		$this->throttle_frequency = apply_filters( 'llms_data_processor_' . $this->id . '_throttle_frequency', HOUR_IN_SECONDS * 4, $this );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.15.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.