function get_term_structures

6.x misc.inc get_term_structures($school_id = 0)
4.x misc.inc get_term_structures()
5.x misc.inc get_term_structures()

Return an array version of the term_id_structure field from the admin settings

2 calls to get_term_structures()
course_search_display_courses in modules/course_search/course_search.module
Show the user their select of courses.
course_search_edit_course_details_form in modules/course_search/course_search.edit.inc
This form lets the user edit the course's syllabus or rotation schedule

File

includes/misc.inc, line 590
This file contains misc functions for FlightPath

Code

function get_term_structures() {
  $rtn = array();

  $temp = $GLOBALS ["fp_system_settings"]["term_id_structure"];
  $structures = explode("\n", $temp);

  foreach ($structures as $structure) {
    $tokens = explode(",", $structure);
    $term_def = trim($tokens [0]);

    // Get rid of the replacement pattern.
    // Looks like:  [Y4]40.  We want the 40.
    // Simply explode on "]"
    $temp = explode("]", $term_def);
    $rtn [trim($temp [1])] = array(
      "term_def" => $term_def,
      "short" => trim($tokens [1]),
      "abbr" => trim($tokens [2]),
      "full" => trim($tokens [3]),
      "disp_adjust" => trim($tokens [4]),
    );

  }


  return $rtn;
}