Quiz::__construct()


Source

File: classes/Quiz.php

	public function __construct() {

		add_action( 'wp_ajax_load_quiz_editor', [ $this, 'load_quiz_editor' ] );
		add_action( 'wp_ajax_dozent_save_quiz', [ $this, 'dozent_save_quiz' ] );
		add_action( 'wp_ajax_sort_quiz_questions', [ $this, 'sort_quiz_questions' ] );

		add_action( 'wp_ajax_quiz_load_edit', [ $this, 'quiz_load_edit' ] );
		add_action( 'wp_ajax_dozent_quiz_add_question', [ $this, 'dozent_quiz_add_question' ] );
		add_action( 'wp_ajax_load_edit_question_modal', [ $this, 'load_edit_question_modal' ] );
		add_action( 'wp_ajax_dozent_quiz_update_question', [ $this, 'dozent_quiz_update_question' ] );
		add_action( 'wp_ajax_quiz_question_delete', [ $this, 'quiz_question_delete' ] );
		add_action( 'wp_ajax_question_option_delete', [ $this, 'question_option_delete' ] );

		//Frontend Stuff
		add_dozent_action( 'start_quiz', [ $this, 'start_quiz' ] );
		add_filter( 'dozent_curriculum_template', [ $this, 'quiz_attempting' ] );
		add_filter( 'wp_ajax_dozent_quiz_submit_question', [ $this, 'submit_question' ] );

		//Attempts Table Filter

		add_filter( 'dozent_html_table_quiz_attempts_column', [ $this, 'table_quiz_attempts_column' ], 10, 3 );
		//View Attempt by Student page
		add_filter( 'dozent_curriculum_content_template', [ $this, 'attempt_view' ], 10, 2 );

		/**
		 * Table Column
		 * Dashboard Attemtps Review
		 */

		add_filter( 'dozent_html_table_quiz_attempts_courses_column', [ $this, 'table_quiz_attempts_courses_column' ],
			10, 3 );
		add_filter( 'dozent_html_table_dozent_course_has_quizzes_column',
			[ $this, 'table_dozent_course_has_quizzes_column' ], 10, 3 );
		add_filter( 'dozent_html_table_attempts_for_review_column', [ $this, 'table_attempts_for_review_column' ], 10,
			3 );

		/**
		 * Review Quiz Attempt
		 */

		add_dozent_action( 'dozent_review_attempt', [ $this, 'review_attempt' ] );

	}