get_course_sec

Description

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

Usage

<?php $sect = get_course_sec($section, $object); ?>

Parameters

$section (string) (required) Unique course section ID or course section array of data pulled for requested course section.

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

Return Values

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

Example

Example of return data as an object.

$sect = get_course_sec(5);
echo "Course section: " . $sect->courseSection;

Example of returning data as an array.

$sect = get_course_sec(5, false);
echo "Course section: " . $sect['courseSection'];

var_dump of $sect = get_course_sec(5); as an object

stdClass::__set_state(array(
   'courseSecID' => '5',
   'sectionNumber' => '03',
   'courseSecCode' => 'EPSYC-1002-03',
   'courseSection' => '13/SP-EPSYC-1002-03',
   'buildingCode' => 'UHALL',
   'roomCode' => 'UNIV-312',
   'locationCode' => 'H',
   'courseLevelCode' => '100',
   'acadLevelCode' => 'UG',
   'deptCode' => 'CIVIL',
   'facID' => '19',
   'termCode' => '13/SP',
   'courseID' => '2',
   'courseCode' => 'EPSYC-1002',
   'preReqs' => '',
   'secShortTitle' => 'Marriage and Family',
   'startDate' => '2013-01-01',
   'endDate' => '2013-05-20',
   'startTime' => '1:00 PM',
   'endTime' => '2:00 PM',
   'dotw' => 'MW',
   'minCredit' => '3.0',
   'maxCredit' => '0.0',
   'increCredit' => '0.0',
   'ceu' => '0.0',
   'instructorMethod' => 'LEC',
   'instructorLoad' => '1.0',
   'contactHours' => '1.0',
   'webReg' => '1',
   'courseFee' => '330.00',
   'labFee' => '0.00',
   'materialFee' => '0.00',
   'secType' => 'ONC',
   'currStatus' => 'A',
   'statusDate' => '2013-09-26',
   'comment' => '',
   'approvedDate' => '2013-09-26',
   'approvedBy' => '1',
   'LastUpdate' => '2014-03-03 00:49:56',
))

var_dump of $sect = get_course_sec(5, false); as an array

array (
  'courseSecID' => '5',
  'sectionNumber' => '03',
  'courseSecCode' => 'EPSYC-1002-03',
  'courseSection' => '13/SP-EPSYC-1002-03',
  'buildingCode' => 'UHALL',
  'roomCode' => 'UNIV-312',
  'locationCode' => 'H',
  'courseLevelCode' => '100',
  'acadLevelCode' => 'UG',
  'deptCode' => 'CIVIL',
  'facID' => '00000019',
  'termCode' => '13/SP',
  'courseID' => '00000000002',
  'courseCode' => 'EPSYC-1002',
  'preReqs' => '',
  'secShortTitle' => 'Marriage and Family',
  'startDate' => '2013-01-01',
  'endDate' => '2013-05-20',
  'startTime' => '1:00 PM',
  'endTime' => '2:00 PM',
  'dotw' => 'MW',
  'minCredit' => '3.0',
  'maxCredit' => '0.0',
  'increCredit' => '0.0',
  'ceu' => '0.0',
  'instructorMethod' => 'LEC',
  'instructorLoad' => '1.0',
  'contactHours' => '1.0',
  'webReg' => '1',
  'courseFee' => '330.00',
  'labFee' => '0.00',
  'materialFee' => '0.00',
  'secType' => 'ONC',
  'currStatus' => 'A',
  'statusDate' => '2013-09-26',
  'comment' => '',
  'approvedDate' => '2013-09-26',
  'approvedBy' => '00000001',
  'LastUpdate' => '2014-03-03 00:49:56',
)

Change Log

Since 6.2.0

Source File

get_course_sec() is located in app/functions/section-function.php.