public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/functions.php
/**
 * Get a list of the modules for a training course, in the order required for training.
 *
 * @since 1.0.0
 *
 * @param integer $courseID The ID of the course to get the modules for.
 */
Get a list of the modules for a training course, in the order required for training.

@param integer $courseID The ID of the course to get the modules for.
Get a list of the modules for a training course in the order required for training . @param integer $courseID The ID of the course to get the modules for .
function WPCW_courses_getModuleDetailsList( $courseID ) {
	$list = array();
	global $wpcwdb, $wpdb;
	$wpdb->show_errors();
	$SQL = $wpdb->prepare( "SELECT *
			FROM $wpcwdb->modules
			WHERE parent_course_id = %d
			ORDER BY module_order, module_title ASC
			", $courseID );
	$items = $wpdb->get_results( $SQL );
	if ( count( $items ) < 1 ) {
		return false;
	}
	foreach ( $items as $item ) {
		$list[ $item->module_id ] = $item;
	}
	return $list;
}
function WPCW_courses_getModuleDetailsList ( $ courseID ) { $ list = array ( ) ; global $ wpcwdb , $ wpdb ; $ wpdb -> show_errors ( ) ; $ SQL = $ wpdb -> prepare ( " SELECT *
			FROM  $ wpcwdb -> modules 
			WHERE parent_course_id = %d
			ORDER BY module_order, module_title ASC
			 " , $ courseID ) ; $ items = $ wpdb -> get_results ( $ SQL ) ; if ( count ( $ items ) < 1 ) { return false ; } foreach ( $ items as $ item ) { $ list [ $ item -> module_id ] = $ item ; } return $ list ; }
Get a list of the modules for a training course, in the order required for training.
Get a list of the modules for a training course in the order required for training .
// List modules in array using module ID