[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.144.91.176: ~ $
<?php
/**
 * This class provides the easy way to operate an exam.
 *
 * @since 4.6.0
 *
 * @package LearnDash\Core
 */

/** NOTICE: This code is currently under development and may not be stable.
 *  Its functionality, behavior, and interfaces may change at any time without notice.
 *  Please refrain from using it in production or other critical systems.
 *  By using this code, you assume all risks and liabilities associated with its use.
 *  Thank you for your understanding and cooperation.
 **/

namespace LearnDash\Core\Models;

use LDLMS_Post_Types;
use LearnDash\Core\Models\Traits\Has_Course;

/**
 * Exam model class.
 *
 * @since 4.6.0
 */
class Exam extends Post {
	use Has_Course {
		get_course as get_course_from_trait;
	}

	/**
	 * Returns allowed post types.
	 *
	 * @since 4.6.0
	 *
	 * @return string[]
	 */
	public static function get_allowed_post_types(): array {
		return array(
			LDLMS_Post_Types::get_post_type_slug( LDLMS_Post_Types::EXAM ),
		);
	}

	/**
	 * Returns a course of the exam or null.
	 *
	 * @since 4.6.0
	 *
	 * @return Course|null
	 */
	public function get_course(): ?Course {
		/**
		 * Filters an exam course.
		 *
		 * @since 4.6.0
		 *
		 * @param Course|null $course Course model.
		 * @param Exam        $exam   Exam model.
		 *
		 * @return Course|null Lesson course model.
		 *
		 * @ignore
		 */
		return apply_filters( 'learndash_model_exam_course', $this->get_course_from_trait(), $this );
	}
}

Filemanager

Name Type Size Permission Actions
Interfaces Folder 0755
Traits Folder 0755
Course.php File 9.81 KB 0644
Exam.php File 1.42 KB 0644
Group.php File 5.18 KB 0644
Instructor.php File 631 B 0644
Invoice.php File 5.64 KB 0644
Lesson.php File 7.79 KB 0644
Model.php File 1.5 KB 0644
Post.php File 11.04 KB 0644
Product.php File 37.16 KB 0644
Quiz.php File 4.63 KB 0644
Topic.php File 5.02 KB 0644
Transaction.php File 27.71 KB 0644
User.php File 1.67 KB 0644
Virtual_Instructor.php File 9.89 KB 0644