public/wordpress/wp-content/plugins/wp-courseware/includes/controllers/courses.php
/**
	 * Register Course Api Endpoints.
	 *
	 * @since 4.1.0
	 *
	 * @param array $endpoints The endpoints to filter.
	 * @param Api The api object.
	 *
	 * @return array $endpoints The modified array of endpoints.
	 */
Register Course Api Endpoints.

@param array $endpoints The endpoints to filter.
@param Api The api object.

@return array $endpoints The modified array of endpoints.
Register Course Api Endpoints . @param array $endpoints The endpoints to filter . @param Api The api object . @return array $endpoints The modified array of endpoints .
public function register_api_endpoints( $endpoints, Api $api ) {
		$endpoints[] = array( 'endpoint' => 'courses', 'method' => 'GET', 'callback' => array( $this, 'api_get_courses' ) );
		$endpoints[] = array( 'endpoint' => 'courses-filtered', 'method' => 'GET', 'callback' => array( $this, 'api_get_courses_filtered' ) );
		$endpoints[] = array( 'endpoint' => 'courses-access', 'method' => 'POST', 'callback' => array( $this, 'api_courses_access' ) );
		$endpoints[] = array( 'endpoint' => 'courses-reset-progress', 'method' => 'POST', 'callback' => array( $this, 'api_courses_reset_progress' ) );
		$endpoints[] = array( 'endpoint' => 'course-instructors', 'method' => 'GET', 'callback' => array( $this, 'api_get_course_instructors' ) );
		$endpoints[] = array( 'endpoint' => 'course-instructor', 'method' => 'POST', 'callback' => array( $this, 'api_course_instructor' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder', 'method' => 'GET', 'callback' => array( $this, 'api_get_course_builder' ) );
		$endpoints[] = array( 'endpoint' => 'course-refresh-builder', 'method' => 'GET', 'callback' => array( $this, 'api_refresh_course_builder' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-modules', 'method' => 'GET', 'callback' => array( $this, 'api_get_course_builder_modules' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-add-module', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_add_module' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-update-module', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_update_module' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-update-module-order', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_update_module_order' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-delete-module', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_delete_module' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-units', 'method' => 'GET', 'callback' => array( $this, 'api_get_course_builder_units' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-add-unit', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_add_unit' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-add-units', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_add_units' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-update-unit', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_update_unit' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-update-unit-order', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_update_unit_order' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-delete-unit', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_delete_unit' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-quizzes', 'method' => 'GET', 'callback' => array( $this, 'api_get_course_builder_quizzes' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-add-quiz', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_add_quiz' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-add-quizzes', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_add_quizzes' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-update-quiz', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_update_quiz' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-update-quiz-order', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_update_quiz_order' ) );
		$endpoints[] = array( 'endpoint' => 'course-builder-delete-quiz', 'method' => 'POST', 'callback' => array( $this, 'api_course_builder_delete_quiz' ) );
		return $endpoints;
	}
public function register_api_endpoints ( $ endpoints , Api $ api ) { $ endpoints [ ] = array ( 'endpoint' => 'courses' , 'method' => 'GET' , 'callback' => array ( $ this , 'api_get_courses' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'courses-filtered' , 'method' => 'GET' , 'callback' => array ( $ this , 'api_get_courses_filtered' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'courses-access' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_courses_access' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'courses-reset-progress' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_courses_reset_progress' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-instructors' , 'method' => 'GET' , 'callback' => array ( $ this , 'api_get_course_instructors' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-instructor' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_instructor' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder' , 'method' => 'GET' , 'callback' => array ( $ this , 'api_get_course_builder' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-refresh-builder' , 'method' => 'GET' , 'callback' => array ( $ this , 'api_refresh_course_builder' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-modules' , 'method' => 'GET' , 'callback' => array ( $ this , 'api_get_course_builder_modules' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-add-module' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_add_module' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-update-module' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_update_module' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-update-module-order' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_update_module_order' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-delete-module' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_delete_module' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-units' , 'method' => 'GET' , 'callback' => array ( $ this , 'api_get_course_builder_units' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-add-unit' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_add_unit' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-add-units' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_add_units' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-update-unit' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_update_unit' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-update-unit-order' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_update_unit_order' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-delete-unit' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_delete_unit' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-quizzes' , 'method' => 'GET' , 'callback' => array ( $ this , 'api_get_course_builder_quizzes' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-add-quiz' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_add_quiz' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-add-quizzes' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_add_quizzes' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-update-quiz' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_update_quiz' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-update-quiz-order' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_update_quiz_order' ) ) ; $ endpoints [ ] = array ( 'endpoint' => 'course-builder-delete-quiz' , 'method' => 'POST' , 'callback' => array ( $ this , 'api_course_builder_delete_quiz' ) ) ; return $ endpoints ; }
Register Course Api Endpoints.
Register Course Api Endpoints .
// Builder // Modules // Units // Quizzes