/** * LDISyncEnrollment * * @since version 1.0.0 * @param $pidm Person identifier */ function LDISyncEnrollment($pidm, &$banner_object = false) { if (!$banner_object) { require_once 'BannerStudent.class.php'; $banner_object = new BannerStudent($this->db); } //end if if (!is_array($this->active_terms)) { $this->active_terms = $this->getActiveTerms(); } if (count($this->active_terms) <= 0) { return false; } foreach ($this->active_terms as $term) { $schedule = $banner_object->getSchedule($pidm, $term); foreach ($schedule[$term] as $course) { $sql = "\n\t\t\t\t\tBEGIN\n\t\t\t\t\t\ticsfkldi.p_save_enrollment(term_code_in => '" . $term . "', crn_in => '" . $course['r_crn'] . "', pidm_in => " . $pidm . ", action_in => 'ENROLL');\n\t\t\t\t\t\ticsfkldi.p_send_enrollment();\n\t\t\t\t\t\tgb_common.p_commit();\n\t\t\t\t\tEND;"; $stmt = $this->db->PrepareSP($sql); if (!$this->db->Execute($stmt)) { return false; } //end if } //end foreach } //end foreach return true; }