static function getTrainingCourses($instructors = false)
 {
     //echo "===Training Courses===\n";
     //echo date("m-d-Y H:i:s.u");
     $qm = array();
     $atc = array();
     if (!$instructors) {
         //get all instructors
         $instructors_array = get_posts(array('post_type' => 'instructor', 'posts_per_page' => -1));
     } else {
         if (empty($instructors)) {
             //return nothing?
             return array("qm" => $qm, "atc" => $atc);
         }
         $instructors_array = $instructors;
     }
     $qm = array();
     $atc = array();
     foreach ($instructors_array as $instructor) {
         //print_r($instructor->ID);
         $atcarray = QMModel::get_instructor_courses($instructor->ID, 'atccourses');
         $qmarray = QMModel::get_instructor_courses($instructor->ID, 'qmtrainingcourse');
         foreach ($qmarray as $q) {
             $date = "";
             if (isset($q["completion_date"])) {
                 $date = $q["completion_date"];
             }
             $title = get_the_title($q['qm_courses_select']);
             $qmtraining = new TrainingCourse($instructor, $title, 'QM', $date);
             $qm[] = $qmtraining;
         }
         foreach ($atcarray as $q) {
             $date = "";
             if (isset($q["completion_date"])) {
                 $date = $q["completion_date"];
             }
             $title = get_the_title($q['qm_courses_select']);
             $atctraining = new TrainingCourse($instructor, $title, 'ATC', $date);
             $atc[] = $atctraining;
         }
     }
     $qm = QMModel::courseGrouper($qm);
     $atc = QMModel::courseGrouper($atc);
     return array("qm" => $qm, "atc" => $atc);
 }