public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/admin/functions.php
/**
 * Does this quiz contain any random questions.
 *
 * @since 1.0.0
 *
 * @param object $quizDetails The quiz details to check.
 *
 * @return boolean True if there are random questions, false otherwise.
 */
Does this quiz contain any random questions.

@param object $quizDetails The quiz details to check.

@return boolean True if there are random questions, false otherwise.
Does this quiz contain any random questions . @param object $quizDetails The quiz details to check . @return boolean True if there are random questions false otherwise .
function WPCW_quizzes_doesQuizContainRandomQuestions( $quizDetails ) {
	if ( empty( $quizDetails->questions ) ) {
		return false;
	}
	foreach ( $quizDetails->questions as $singleQuestion ) {
		if ( 'random_selection' == $singleQuestion->question_type ) {
			return true;
		}
	}
	return false;
}
function WPCW_quizzes_doesQuizContainRandomQuestions ( $ quizDetails ) { if ( empty ( $ quizDetails -> questions ) ) { return false ; } foreach ( $ quizDetails -> questions as $ singleQuestion ) { if ( 'random_selection' == $ singleQuestion -> question_type ) { return true ; } } return false ; }
Does this quiz contain any random questions.
Does this quiz contain any random questions .
// Just need the first question to confirm if this is the case.