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.


Top ↑

Parameters Parameters

$status

(boolean) (Required) The default status.


Top ↑

Return Return

(boolean)


Top ↑

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;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.9.0 Pass the course ID to llms_can_user_bypass_restrictions().
3.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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