LLMS_View_Manager::modify_course_open( boolean $status, $course )
Modify the status of a course access period based on the current view.
Description Description
Students and Visitors will see the actual access period.
If viewing as self and self can bypass restrictions will appear as if course is open.
Parameters Parameters
- $status
-
(boolean) (Required) The default status.
Return Return
(boolean)
Source Source
File: includes/class.llms.view.manager.php
public function modify_course_open( $status, $course ) { if ( 'self' === $this->get_view() && llms_can_user_bypass_restrictions( get_current_user_id(), $course->get( 'id' ) ) ) { return true; } return $status; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.9.0 | Pass the course ID to llms_can_user_bypass_restrictions() . |
3.7.0 | Introduced. |