public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/functions.php
/**
 * Get all of the custom feedback messages for a specific quiz.
 *
 * @since 1.0.0
 *
 * @param integer $quizID The ID of the quiz that's being shown.
 * @param array   $tagIDList A list of tag IDs to filter the messages for.
 *
 * @return array The list of feedback messages for this quiz.
 */
Get all of the custom feedback messages for a specific quiz.

@param integer $quizID The ID of the quiz that's being shown.
@param array   $tagIDList A list of tag IDs to filter the messages for.

@return array The list of feedback messages for this quiz.
Get all of the custom feedback messages for a specific quiz . @param integer $quizID The ID of the quiz that ' s being shown . @param array $tagIDList A list of tag IDs to filter the messages for . @return array The list of feedback messages for this quiz .
function WPCW_quizzes_feedback_getFeedbackMessagesForQuiz( $quizID, $tagIDList = null ) {
	if ( ! is_null( $tagIDList ) && empty( $tagIDList ) ) {
		return false;
	}
	global $wpdb, $wpcwdb;
	$wpdb->show_errors();
	$extraSQL = false;
	if ( ! empty( $tagIDList ) ) {
		$extraSQL = 'AND qfeedback_tag_id IN (' . implode( ",", $tagIDList ) . ')';
	}
	$SQL = $wpdb->prepare( "
    	SELECT *
    	FROM $wpcwdb->quiz_feedback
    	WHERE qfeedback_quiz_id = %d
    	$extraSQL
    	ORDER BY qfeedback_tag_id ASC
   	", $quizID );
	return $wpdb->get_results( $SQL );
}
function WPCW_quizzes_feedback_getFeedbackMessagesForQuiz ( $ quizID , $ tagIDList = null ) { if ( ! is_null ( $ tagIDList ) && empty ( $ tagIDList ) ) { return false ; } global $ wpdb , $ wpcwdb ; $ wpdb -> show_errors ( ) ; $ extraSQL = false ; if ( ! empty ( $ tagIDList ) ) { $ extraSQL = 'AND qfeedback_tag_id IN (' . implode ( " , " , $ tagIDList ) . ')' ; } $ SQL = $ wpdb -> prepare ( " 
    	SELECT *
    	FROM  $ wpcwdb -> quiz_feedback 
    	WHERE qfeedback_quiz_id = %d
    	 $ extraSQL 
    	ORDER BY qfeedback_tag_id ASC
   	 " , $ quizID ) ; return $ wpdb -> get_results ( $ SQL ) ; }
Get all of the custom feedback messages for a specific quiz.
Get all of the custom feedback messages for a specific quiz .
// If we have a list of tag IDs, then add to SQL.