Quiz::sort_quiz_questions()

Sort quiz question


Source

File: classes/Quiz.php

	public function sort_quiz_questions() {
		global $wpdb;
		$questions = dozent_input_array_field( 'questions' );

		if ( dozent_count( $questions ) ) {
			foreach ( $questions as $short => $question ) {
				$wpdb->update( $wpdb->dozent_quiz_questions, [ 'sort_order' => $short ],
					[ 'question_id' => $question ] );
			}
		}
	}