public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/admin/functions.php
/**
 * Calculate the actual number of questions in a quiz - supporting random questions.
 *
 * @since 1.0.0
 *
 * @param integer $quizID The ID of the quiz to get a count for.
 *
 * @return integer The actual number of questions in the quiz.
 */
Calculate the actual number of questions in a quiz - supporting random questions.

@param integer $quizID The ID of the quiz to get a count for.

@return integer The actual number of questions in the quiz.
Calculate the actual number of questions in a quiz - supporting random questions . @param integer $quizID The ID of the quiz to get a count for . @return integer The actual number of questions in the quiz .
function WPCW_quizzes_calculateActualQuestionCount( $quizID ) {
	global $wpdb, $wpcwdb;
	$wpdb->show_errors();
	return $wpdb->get_var( $wpdb->prepare( "
		SELECT SUM(q.question_expanded_count) as total_questions
		FROM $wpcwdb->quiz_qs_mapping qm
			LEFT JOIN $wpcwdb->quiz_qs q ON q.question_id = qm.question_id
		WHERE qm.parent_quiz_id = %d
	", $quizID ) );
}
function WPCW_quizzes_calculateActualQuestionCount ( $ quizID ) { global $ wpdb , $ wpcwdb ; $ wpdb -> show_errors ( ) ; return $ wpdb -> get_var ( $ wpdb -> prepare ( " 
		SELECT SUM(q.question_expanded_count) as total_questions
		FROM  $ wpcwdb -> quiz_qs_mapping  qm
			LEFT JOIN  $ wpcwdb -> quiz_qs  q ON q.question_id = qm.question_id
		WHERE qm.parent_quiz_id = %d
	 " , $ quizID ) ) ; }
Calculate the actual number of questions in a quiz - supporting random questions.
Calculate the actual number of questions in a quiz - supporting random questions .