Section and schedule information can be included for scheduled courses by including the attribute show_sections=”Y” specified in your course container’s bub_course or bub_base tag. You can indicate whether to include or exclude unscheduled courses by using the show_unscheduled_courses attribute (see the course container section for details). If you do include section and schedule data, you must set the semester in the bub_base tag – otherwise, the system won’t know which semester’s sections to show.
Once you instruct the system to retrieve section information, it can be included in the course template by using a set of section_block tags within the course description, like so:
<!– BEGIN section_block –>
{!section_name!}
<br />
<!– END section_block –>
Creating a section block will display each section (A1, B1, etc.) of the course or display nothing if no sections are scheduled. The section_block block only contains information about the section name and instructor. In order to display the times and locations, a schedule_block needs to be created inside of the section_block. For example:
<!– BEGIN section_block –>
{!section_name!}
<ul>
<!– BEGIN schedule_block –>
<li>{!schedule_days!} {!schedule_time_start!}-{!schedule_time_end!}</li>
<!– END schedule_block –>
</ul>
<!– END section_block –>
The reason for the block structure is that a course can have multiple sections, and a section can have multiple schedules. As with the course templates, you can mix and match special variables (described below) and arbitrary HTML; each block will be parsed once for each section or schedule. The following special variables can be used in section or schedule blocks:
Section Block Template Elements
Element | Description | Sample Output |
section_name | Letter/number section code | “A1” |
section_title_abbrev | Abbreviated section title | “JO INTERNSHIP” |
section_instructor_uc | Last name of instructor, in caps | “KLARFELD” |
section_instructor | Last name of instructor | “Klarfeld” |
Schedule Block Template Elements
Element | Description | Sample Output |
schedule_class_type | Type of class, written fully | “Independent” |
schedule_class_type_abbrev | Type of class, abbreviated | “IND” |
schedule_building | Three letter building code | “SAR” |
schedule_room | Room number | “218” |
schedule_days | Days of section, as single letters | “MW” |
schedule_days_1 | Days of section, as single letters separated by a comma | “M, W” |
schedule_days_3 | Days of section, as three letters | “Mon, Wed” |
schedule_days_full | Days of section, written fully | “Monday, Wednesday” |
schedule_time_start | Start time | “6:00 PM” |
schedule_time_end | End time | “7:30 PM” |
schedule_time_start_24 | Start time written in military time | “18:00” |
schedule_time_end_24 | End time written in military time | “19:30” |
Below is a sample course description template that uses both the “section_block” and “schedule_block” tags. For readability’s sake, this example omits HTML markup; in a production environment, you would probably style the fields below to make them appear like you want them to.
{!college!} {!department!} {!course_num!} – {!title!}
—————————————————–
<!– BEGIN section_block –>
section: {!section_name!}
instructor: {!section_instructor!}
meets:
<!– BEGIN schedule_block –>
{!schedule_days!} {!schedule_time_start!}-{!schedule_time_end!}
({!schedule_building!} {!schedule_room!})
<!– END schedule_block –>
<!– END section_block –>
This template will be parsed to produce something like:
COM FT 310 – Screenwriting I
—————————————————–
section: A1
instructor: Tba
meets:
M 2:00 PM-4:30 PM
(SAR 218)
F 1:30 PM-3:00 PM
(COM 213)
section: B1
instructor: Tba
meets:
W 2:00 PM-4:30 PM
(CAS B18A)
F 1:30 PM-3:00 PM
(GCB 203)
section: C1
instructor: Thompson
meets:
F 10:00 AM-12:30 PM
(KCB 107)
F 1:30 PM-3:00 PM
(KCB 103)
Note that the section and schedule blocks are repeated in the output, despite appearing in the template only once.