User::can_publish_course()

Instructor can publish their course directly or not.


Source

File: classes/User.php

	function can_publish_course() {
		$can_publish_course = (bool) dozent_get_option( 'instructor_can_publish_course' );
		$instructor         = get_role( DOZENT_INSTRUCTOR_ROLE );

		if ( $can_publish_course ) {
			$instructor->add_cap( 'publish_dozent_course' );
		} else {
			$instructor->remove_cap( 'publish_dozent_course' );
		}
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.