LLMS_Course::has_prerequisite( string $type = 'any' )
Determine if prerequisites are enabled and there are prereqs configured
Parameters Parameters
- $type
-
(string) (Optional) Determine if a specific type of prereq exists [any|course|track].
Default value: 'any'
Return Return
(boolean) Returns true if prereq is enabled and there is a prerequisite course or track.
Source Source
File: includes/models/model.llms.course.php
// Capacity disabled, so there is capacity. if ( 'yes' !== $this->get( 'enable_capacity' ) ) { return true; } $capacity = $this->get( 'capacity' ); // No capacity restriction set, so it has capacity. if ( ! $capacity ) { return true; } // Compare results. return ( $this->get_student_count() < $capacity ); } /** * Determine if prerequisites are enabled and there are prereqs configured * * @since 3.0.0 * @since 3.7.5 Unknown.
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.7.5 | Unknown. |
3.0.0 | Introduced. |