public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/classes/userprogress.php
/**
		 * Load the full list of units for this course.
		 */
Load the full list of units for this course.
Load the full list of units for this course .
private function loadFullUnitList() {
			if ( $this->unitList ) {
				return;
			}
			global $wpcwdb, $wpdb;
			$wpdb->show_errors();
			$SQL = $wpdb->prepare( "
				SELECT *
				FROM $wpcwdb->units_meta
				WHERE parent_course_id = %d
				ORDER BY unit_order ASC
			", $this->courseID );
			$this->unitList = array();
			$items = $wpdb->get_results( $SQL );
			if ( $items ) {
				foreach ( $items as $item ) {
					$this->unitList[ $item->unit_id ] = $item;
				}
			}
		}
private function loadFullUnitList ( ) { if ( $ this -> unitList ) { return ; } global $ wpcwdb , $ wpdb ; $ wpdb -> show_errors ( ) ; $ SQL = $ wpdb -> prepare ( " 
				SELECT *
				FROM  $ wpcwdb -> units_meta 
				WHERE parent_course_id = %d
				ORDER BY unit_order ASC
			 " , $ this -> courseID ) ; $ this -> unitList = array ( ) ; $ items = $ wpdb -> get_results ( $ SQL ) ; if ( $ items ) { foreach ( $ items as $ item ) { $ this -> unitList [ $ item -> unit_id ] = $ item ; } } }
Load the full list of units for this course.
Load the full list of units for this course .
// Get a list of all units for this course in absolute order // Always create an array - so we know if we've tried this or not. // If unitList is false, we've not tried to fill it yet. // Convert into an ID => object list