public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/functions.php
/**
 * Get a list of all quizzes for a training course, in the order that they are used.
 *
 * @since 1.0.0
 *
 * @param integer $courseID The ID of the course to get the quizzes for.
 *
 * @return array A list of the quizzes in order.
 */
Get a list of all quizzes for a training course, in the order that they are used.

@param integer $courseID The ID of the course to get the quizzes for.

@return array A list of the quizzes in order.
Get a list of all quizzes for a training course in the order that they are used . @param integer $courseID The ID of the course to get the quizzes for . @return array A list of the quizzes in order .
function WPCW_quizzes_getAllQuizzesForCourse( $courseID ) {
	global $wpcwdb, $wpdb;
	$wpdb->show_errors();
	return $wpdb->get_results( $wpdb->prepare( "
    	SELECT *
    	FROM $wpcwdb->quiz q
    		LEFT JOIN $wpcwdb->units_meta um ON um.unit_id = q.parent_unit_id
    	WHERE q.parent_course_id = %d
    	  AND quiz_type != 'survey'
    	ORDER BY unit_order
   	", $courseID ) );
}
function WPCW_quizzes_getAllQuizzesForCourse ( $ courseID ) { global $ wpcwdb , $ wpdb ; $ wpdb -> show_errors ( ) ; return $ wpdb -> get_results ( $ wpdb -> prepare ( " 
    	SELECT *
    	FROM  $ wpcwdb -> quiz  q
    		LEFT JOIN  $ wpcwdb -> units_meta  um ON um.unit_id = q.parent_unit_id
    	WHERE q.parent_course_id = %d
    	  AND quiz_type != 'survey'
    	ORDER BY unit_order
   	 " , $ courseID ) ) ; }
Get a list of all quizzes for a training course, in the order that they are used.
Get a list of all quizzes for a training course in the order that they are used .