/** * */ public function __construct($row = null) { if ($row) { $row = \PSU::cleanKeys('sortest_', '', $row); } parent::__construct($row); }
public static function load() { $data = array(); $sql = "SELECT * FROM tbbctrl"; $data = \PSU::db('banner')->GetRow($sql); $data = \PSU::cleanKeys('tbbctrl_', '', $data); return $data; }
/** * constructor * * @param $row array Array of row elements */ public function __construct($row = null) { if ($row) { // get rid of table name from field names $row = \PSU::cleanKeys('tbrdepo_', '', $row); } //end if parent::__construct($row); }
/** * constructor * * @param $row array Array of row elements */ public function __construct($row = null) { if ($row) { // get rid of table name from field names $row = \PSU::cleanKeys('tbraccd_', '', $row); } //end if parent::__construct($row); $this->type_ind = $this->type_ind(); $this->detail_desc = $this->detail_desc(); }
public static function load($term_code = null) { $data = array(); if (!$term_code) { $term_code = \PSU\Student::currentTermCode(); } //end if $sql = "SELECT * FROM tbbterm WHERE tbbterm_term_code = :term_code"; $data = \PSU::db('banner')->GetRow($sql, array('term_code' => $term_code)); $data = \PSU::cleanKeys('tbbterm_', '', $data); return $data; }
/** * constructor * * @param $row array Array of row elements */ public function __construct($row = null) { if ($row) { // get rid of table name from field names $row = \PSU::cleanKeys('gxrdird_', '', $row); } //end if parent::__construct($row); if (!isset($this->activity_date)) { $this->activity_date = date('Y-m-d H:i:s'); } //end if }
public function load() { if ($this->aid_years) { return; } //end if if ($rows = $this->get_aid_years()) { foreach ($rows as $row) { $row = PSU::cleanKeys('robinst_', '', $row); $aid_year = new PSU_Student_Finaid_AidYear($row); $this->aid_years[$aid_year->aidy_code] = $aid_year; } //end foreach } //end if }
/** * BannerExitLoans * * srSaluteParent gets the student's Parent loan information. * * @since version 1.0.0 * @return array */ public static function srSaluteParent($id) { $data = array(); $query = "SELECT aid_year_key, \n\t\t\t\t\t\t\t\t\t\tstudent_id, \n\t\t\t\t\t\t\t\t\t\tsum(nvl(award_accept_amount,0)) amount_borrowed, \n\t\t\t\t\t\t\t\t\t\tsum(nvl(award_paid_amount,0)) amount_paid, \n\t\t\t\t\t\t\t\t\t\tpidm_key,\n\t\t\t\t\t\t\t\t\t\t'Ten Years' as term\n\t\t\t\t\t\t\tFROM\tbaninst1.ar_award_detail_by_year\n\t\t\t\t\t\t WHERE\tfederal_fund_id = 'PLUS'\n\t\t\t\t\t\t\t AND\tstudent_id=:id\n\t\t\t\t\tGROUP BY\taid_year_key, \n\t\t\t\t\t\t\t\t\t\tstudent_id, \n\t\t\t\t\t\t\t\t\t\tpidm_key\n\t\t\t\t\t\tHAVING\t(sum(award_paid_amount) > 0)\n\t\t\t\t\tORDER BY\taid_year_key desc"; $results = PSU::db('banner')->Execute($query, compact('id')); if ($results) { while ($row = $results->FetchRow()) { $data[] = PSU::cleanKeys('', '', $row); } // end while } // end if return $data; }
/** * lazy loads holds */ function _load_holds() { $this->holds = array(); $args = array('pidm' => $this->pidm); $sql = "BEGIN :cursorvar := gb_hold.f_query_all(p_pidm => :pidm); END;"; if ($results = \PSU::db('banner')->ExecuteCursor($sql, 'cursorvar', $args)) { while ($row = $results->FetchRow()) { $row = \PSU::cleanKeys('sprhold_', '', $row); unset($row['rowid'], $row['pidm']); $row['from_date'] = strtotime($row['from_date']); $row['to_date'] = strtotime($row['to_date']); $this->data['holds'][] = $row; } //end while } //end if }
/** * loads section data based on the selection criteria specified in the PSUCourse instantiation */ public function _load_courses() { $this->data['courses'] = array(); $sql = "SELECT ssbsect.* \n\t\t\t\t\t\t\tFROM ssbsect,\n stvterm \n\t\t\t\t\t\t WHERE ssbsect_subj_code = :subj_code \n\t\t\t\t\t\t\t AND ssbsect_crse_numb = :crse_numb\n AND ssbsect_term_code = stvterm_code\n\t\t\t\t\t\t\t AND stvterm_start_date >= :start_date\n ORDER BY stvterm_code"; $args = array('subj_code' => $this->subj_code, 'crse_numb' => $this->crse_numb, 'start_date' => $this->since ? date('Y-m-d', $this->since) : date('Y-m-d', strtotime('-3 years'))); if ($this->crn) { $sql .= " AND ssbsect_crn IN (" . implode(',', (array) $this->crn) . ")"; } //end if if ($this->term) { $sql .= " AND ssbsect_term_code IN ('" . implode("','", (array) $this->term) . "')"; } //end if if ($this->term_low) { $sql .= " AND ssbsect_term_code >= :term_low"; $args['term_low'] = $this->term_low; } //end if if ($this->term_high) { $sql .= " AND ssbsect_term_code <= :term_high"; $args['term_high'] = $this->term_high; } //end if if ($this->until) { $sql .= " AND stvterm_end_date <= :until"; $args['until'] = date('Y-m-d', $this->until); } //end if if ($results = \PSU::db('banner')->Execute($sql, $args)) { foreach ($results as $row) { $row = \PSU::cleanKeys('ssbsect_', '', $row); $this->data['courses'][$row['term_code']][$row['crn']] = new Course\Section($row['crn'], $row['term_code'], $row); } //end foreach } //end if }
public function __construct($data = null) { $data = \PSU::cleanKeys('sprtele_', '', $data); parent::__construct($data); }
/** * load all courses the instructor has been enrolled it */ protected function _load_courses_instructor() { $this->person->courses_instructor = array(); $sql = "SELECT ssbsect.*\n\t\t FROM sirasgn,ssbsect,stvterm\n\t\t WHERE sirasgn_pidm = :pidm\n\t\t AND sirasgn_term_code = ssbsect_term_code\n\t\t AND sirasgn_crn = ssbsect_crn\n\t\t AND ssbsect_term_code = stvterm_code\n\t\t AND stvterm_start_date >= :start_date\n\t\t ORDER BY ssbsect_term_code"; $args = array('pidm' => $this->person->pidm, 'start_date' => $this->person->data['ranges']['since'] ? date('Y-m-d', $this->person->data['ranges']['since']) : date('Y-m-d', strtotime('-1 years'))); if ($results = PSU::db('banner')->Execute($sql, $args)) { foreach ($results as $row) { $row = PSU::cleanKeys('ssbsect_', '', $row); $this->person->data['courses_instructor'][$row['term_code']][$row['crn']] = new \PSU\Course\Section($row['crn'], $row['term_code'], $row); } //end foreach } //end if }
/** * lazy loads student notes and comments */ protected function _load_notes() { $this->notes = array(); $query = "SELECT *\n\t FROM sgrscmt\n\t WHERE sgrscmt_pidm=:pidm\n\t ORDER BY sgrscmt_activity_date DESC"; if ($results = \PSU::db('banner')->Execute($query, array('pidm' => $this->pidm))) { foreach ($results as $row) { $row = \PSU::cleanKeys('sgrscmt_', '', $row); $this->data['notes'][] = $row; } //end while } //end if }
/** * load the meeting time information for the course */ public function _load_schedule() { $this->data['schedule'] = array(); $sql = "SELECT ssrmeet_begin_time,\n\t\t\t\t\t\t\t\t\t ssrmeet_end_time,\n\t\t\t\t\t\t\t\t\t ssrmeet_bldg_code building_code,\n\t\t\t\t\t\t\t\t\t stvbldg_desc building,\n\t\t\t\t\t\t\t\t\t ssrmeet_room_code room_number,\n\t\t\t\t\t\t\t\t\t ssrmeet_start_date,\n\t\t\t\t\t\t\t\t\t ssrmeet_end_date,\n\t\t\t\t\t\t\t\t\t ssrmeet_catagory ssrmeet_category,\n\t\t\t\t\t\t\t\t\t ssrmeet_sun_day sunday,\n\t\t\t\t\t\t\t\t\t ssrmeet_mon_day monday,\n\t\t\t\t\t\t\t\t\t ssrmeet_tue_day tuesday,\n\t\t\t\t\t\t\t\t\t ssrmeet_wed_day wednesday,\n\t\t\t\t\t\t\t\t\t ssrmeet_thu_day thursday,\n\t\t\t\t\t\t\t\t\t ssrmeet_fri_day friday,\n\t\t\t\t\t\t\t\t\t ssrmeet_sat_day saturday,\n\t\t\t\t\t\t\t\t\t ssrmeet_schd_code schedule_type_code,\n\t\t\t\t\t\t\t\t\t stvschd_desc schedule_type,\n\t\t\t\t\t\t\t\t\t ssrmeet_credit_hr_sess session_credit_hours,\n\t\t\t\t\t\t\t\t\t ssrmeet_meet_no num_meeting_times,\n\t\t\t\t\t\t\t\t\t ssrmeet_hrs_week hours_per_week\n\t\t\t\t\t\t\tFROM ssrmeet,\n stvbldg,\n stvschd\n\t\t\t\t\t WHERE ssrmeet_crn = :crn \n\t\t\t\t\t\t\t AND ssrmeet_term_code = :term_code\n AND stvbldg_code = ssrmeet_bldg_code\n\t\t\t\t\t\t\t AND stvschd_code = ssrmeet_schd_code\n ORDER BY ssrmeet_start_date, ssrmeet_end_date, ssrmeet_begin_time"; $args = array('crn' => $this->crn, 'term_code' => $this->term_code); if ($results = \PSU::db('banner')->Execute($sql, $args)) { foreach ($results as $row) { $row = \PSU::cleanKeys('ssrmeet_', '', $row); $row['begin_time'] = preg_replace('/([0-9]{2})([0-9]{2})/', '\\1:\\2', $row['begin_time']); $row['end_time'] = preg_replace('/([0-9]{2})([0-9]{2})/', '\\1:\\2', $row['end_time']); $row['start_date'] = strtotime($row['start_date']); $row['end_date'] = strtotime($row['end_date']); $row['days'] = $row['sunday'] . $row['monday'] . $row['tuesday'] . $row['wednesday'] . $row['thursday'] . $row['friday'] . $row['saturday']; $this->data['schedule'][] = $row; } //end foreach } //end if $this->meeting_times = $this->meeting_locations = $this->schedule; }
/** * loads Accounts Receivable Term Controls */ public function _load_term_controls() { $this->data['term_controls'] = array(); $sql = "SELECT * FROM tbbterm WHERE tbbterm_term_code = :term_code"; $this->data['term_controls'] = \PSU::db('banner')->GetRow($sql, array('term_code' => $this->term_code)); $this->data['term_controls'] = \PSU::cleanKeys('tbbterm_', '', $this->data['term_controls']); }
protected function _load_profile_preference() { $this->data['profile_preference'] = array(); $row = \PSU::db('banner')->GetRow("SELECT * FROM aobdowp WHERE aobdowp_pidm = :pidm", array('pidm' => $this->pidm)); $this->data['profile_preference'][] = \PSU::cleanKeys('aobdowp_', '', $row); }