get_acad_program

Description

Returns an etsis_Acad_Program object with the information connected to the unique course section’s ID.

Usage

<?php $prog = get_acad_program($program, $object); ?>

Parameters

$program (string) (required) Unique academic program ID or academic program array of data pulled for requested academic program.

$object (bool) (optional) It set true, the data will return as an object or an array if false.

Return Values

(mixed) etsis_Acad_Program object or array on success or false if failed.

Example

Example of return data as an object.

$prog = get_acad_program(5);
echo "Academic program code: " . $prog->acadProgCode;

Example of returning data as an array.

$prog = get_acad_program(5, false);
echo "Academic program code: " . $prog['acadProgCode'];

var_dump of $prog = get_acad_program(5); as an object

stdClass::__set_state(array(
   'acadProgID' => '5',
   'acadProgCode' => 'UG.NON.DEGREE',
   'acadProgTitle' => 'Non Degree',
   'programDesc' => 'Undergraduate Non Degree Program',
   'currStatus' => 'A',
   'statusDate' => '2014-03-01',
   'deptCode' => 'NONDEG',
   'schoolCode' => 'MSOE',
   'acadYearCode' => '2011',
   'startDate' => '2011-09-01',
   'endDate' => '0000-00-00',
   'degreeCode' => 'B.S.',
   'ccdCode' => 'MHC',
   'majorCode' => 'ARTS',
   'minorCode' => 'MATH',
   'specCode' => 'NP',
   'acadLevelCode' => 'UG',
   'cipCode' => '42.2801',
   'locationCode' => 'H',
   'approvedDate' => '2014-03-01',
   'approvedBy' => '1',
   'LastUpdate' => '2015-07-08 20:19:14',
))

var_dump of $prog = get_acad_program(5, false); as an array

array (
  'acadProgID' => '5',
  'acadProgCode' => 'UG.NON.DEGREE',
  'acadProgTitle' => 'Non Degree',
  'programDesc' => 'Undergraduate Non Degree Program',
  'currStatus' => 'A',
  'statusDate' => '2014-03-01',
  'deptCode' => 'NONDEG',
  'schoolCode' => 'MSOE',
  'acadYearCode' => '2011',
  'startDate' => '2011-09-01',
  'endDate' => '0000-00-00',
  'degreeCode' => 'B.S.',
  'ccdCode' => 'MHC',
  'majorCode' => 'ARTS',
  'minorCode' => 'MATH',
  'specCode' => 'NP',
  'acadLevelCode' => 'UG',
  'cipCode' => '42.2801',
  'locationCode' => 'H',
  'approvedDate' => '2014-03-01',
  'approvedBy' => '1',
  'LastUpdate' => '2015-07-08 20:19:14',
)

Change Log

Since 6.2.0

Source File

get_acad_program() is located in app/functions/program-function.php.