{"id":37851,"date":"2010-09-24T11:28:11","date_gmt":"2010-09-24T15:28:11","guid":{"rendered":"http:\/\/www.bu.edu\/tech\/?page_id=37851"},"modified":"2010-09-24T11:58:27","modified_gmt":"2010-09-24T15:58:27","slug":"course-container-file","status":"publish","type":"page","link":"https:\/\/www.bu.edu\/tech\/services\/cccs\/websites\/www\/non-wordpress\/how-to\/coursedescription\/course-container-file\/","title":{"rendered":"Creating a Course Container File"},"content":{"rendered":"<h3>Overview<\/h3>\n<p>This step should take place only after your department&#8217;s course-feeds  directory has been created and a notification received from Webmaster  suppport. It creates two files or sets of files: the Course Container  (.CFT), which determines what courses are displayed, and the Course  Template (.html), which determines how the course feed data is  displayed.<\/p>\n<h3>Creating a Course Container file<\/h3>\n<p>The Course Container file specifies which courses you would like to  see in your CD Feed. This file should have a name ending with &#8220;.CFT&#8221;  (e.g, &#8220;<code>history.cft<\/code>&#8220;) and be placed in your\u00a0<code>course-feeds<\/code> directory (e.g.,<em>http:\/\/www.bu.edu\/history\/course-feeds\/<\/em>).  If you would like to have multiple CD Feeds, simply create a Course  Container file (hereafter .CFT) for each feed. You can create a .CFT  file using any text editor, such as Windows Notepad or OS\/X TextEdit.<\/p>\n<p>Tip: Choose an intuitive name for your .CFT file, such as  &#8220;undergraduate.cft&#8221; for your department&#8217;s undergraduate courses, or  &#8220;armenian.cft&#8221; for Armenian Studies courses.<\/p>\n<h3>Contents<\/h3>\n<p>A .CFT file consits of two custom tags and (optional) HTML. These tags are: the<code>&lt;bub_base&gt;<\/code> tag, which names the file that will contain your CD Feed, and the<code>&lt;bub_course&gt;<\/code> tag, which selects the courses contained in your CD Feed. Both the\u00a0<code>&lt;bub_base&gt;<\/code> and\u00a0<code>&lt;bub_course&gt;<\/code> tags must be included in your .CFT file.<\/p>\n<h3>&lt;bub_base&gt;<\/h3>\n<p>The\u00a0<code>&lt;bub_base&gt;<\/code> tag has three basic functions: it  states where your CD Feed files will go, how they will appear, and &#8211; in  very broad terms &#8211; what types of courses to display or exclude.<\/p>\n<p>The\u00a0<code>output<\/code> attribute is the most basic attribute of the\u00a0<code>&lt;bub_base&gt;<\/code> tag: it specifies where your CF Feed file will be produced.\u00a0<code>charset<\/code> indicates the character set used in the CD Feed files; by default, this is &#8220;<code>latin1<\/code>&#8220;,  the same as a standard webpage, but can be changed to match the  character set used in your website. Other (optional) attributes are  included below; note that you\u00a0<strong>must<\/strong>include an\u00a0<code>output<\/code> attribute in your\u00a0<code>&lt;bub_base&gt;<\/code> tag. All other attributes are optional.<\/p>\n<h3>Full List of Possible\u00a0<code>&lt;bub_base&gt;<\/code> Attributes<\/h3>\n<table>\n<tbody>\n<tr>\n<th width=\"182\">Attribute<\/th>\n<th width=\"198\">Description<\/th>\n<th width=\"128\">Sample Value<\/th>\n<\/tr>\n<tr>\n<td>blank_titles<\/td>\n<td>Indicates whether to include courses that have blank titles (and usually blank descriptions). Can be Y (default) or N.<\/td>\n<td>&#8220;Y&#8221;<\/td>\n<\/tr>\n<tr>\n<td><code>charset<\/code><\/td>\n<td>Character set of the output, using MySQL syntax.  Default is &#8220;<code>latin1<\/code>&#8220;<\/td>\n<td>&#8220;<code>utf8<\/code>&#8220;<\/td>\n<\/tr>\n<tr>\n<td><code>output<\/code><\/td>\n<td>File to write resulting output to. This should indicate a file within <code>course-feeds\/output<\/code>, preferably with a name ending in &#8220;.html&#8221;.<\/td>\n<td>&#8220;<code>com.html<\/code>&#8220;<\/td>\n<\/tr>\n<tr>\n<td>semester<\/td>\n<td>Restricts course listings to a particular semester. Required if  show_sections=&#8221;Y&#8221; or show_unscheduled_courses=&#8221;Y&#8221;. The first four digits  must be the semester code: FALL, SPRG, SUM1, SUM2, or SUMM (which will  return courses in both SUM1 and SUM2). The last four digits must be the  calendar year.<\/td>\n<td>&#8220;FALL2007&#8221;<\/td>\n<\/tr>\n<tr>\n<td>show_sections<\/td>\n<td>Whether to show section and schedule information in addition to course descriptions. Can be Y or N (default).<\/td>\n<td>&#8220;Y&#8221;<\/td>\n<\/tr>\n<tr>\n<td>show_unscheduled_courses<\/td>\n<td>Whether to include courses that have no sections scheduled in the specified semester. Can be Y (default) or N.<\/td>\n<td>&#8220;Y&#8221;<\/td>\n<\/tr>\n<tr>\n<td>template<\/td>\n<td>Specifies a template file to be used when formatting CD Feed data. This should indicate a file within <code>course-feeds\/templates<\/code>. See below for additional information.<\/td>\n<td>&#8220;<code>history.tpl<\/code>&#8221; or &#8220;<code>com.html<\/code>&#8220;<\/td>\n<\/tr>\n<tr>\n<td>terms<\/td>\n<td>Whether to include summer-term courses and descriptions. Can be one of: regular (default), summer, or all.<\/td>\n<td>&#8220;regular&#8221;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Examples<\/h3>\n<p>&lt;bub_base output=&#8221;undergraduate.html&#8221;&gt;<\/p>\n<p>This code specifies an output file &#8220;undergraduate.html&#8221;, with the  default &#8220;latin1&#8221; character set. Because this uses the default &#8220;latin1&#8243;  character set, there is no visible charset attribute. It will show all  courses that fit the requirements outlined in the &lt;bub_course&gt; tag  (see below).<\/p>\n<p>&lt;bub_base output=&#8221;all.html&#8221; charset=&#8221;utf8&#8243;&gt;<\/p>\n<p>This code specifies an output file &#8220;all.html&#8221;, with the &#8220;utf8&#8243;  character set. It will show all courses that fit the requirements  outlined in the &lt;bub_course&gt; tag.<\/p>\n<p>&lt;bub_base output=&#8221;all.html&#8221; charset=&#8221;utf8&#8243; semester=&#8221;FALL2008&#8243; show_sections=&#8221;Y&#8221; show_unscheduled_course=&#8221;N&#8221;&gt;<\/p>\n<p>This code specifies an output file &#8220;all.html&#8221;, with the &#8220;utf8&#8221;  character set. Additionally, it indicates to show all courses scheduled  for the Fall 2008 semester, showing section and schedule information,  and omitting any courses which aren&#8217;t scheduled for this semester. These  courses are drawn from pool of courses specified in the  &lt;bub_course&gt; tag.<\/p>\n<h3>&lt;bub_course&gt;<\/h3>\n<p>The &lt;bub_course&gt; tag specifies what courses to include or exclude courses from your CD Feed. Its properties <strong>do not<\/strong> specify scheduling information (e.g., whether a course is being  offered) &#8211; this is set by the &lt;bub_base&gt; tag. To specify several  sets of courses to be included in your CD Feed, you can add more than  one &lt;bub_course&gt; tag to your .CFT file.<\/p>\n<p>The &lt;bub_course&gt; tag <strong>must<\/strong> contain either an &#8220;id&#8221; attribute or both a &#8220;college&#8221; and a &#8220;department&#8221; attribute.<\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"182\">Attribute<\/th>\n<th width=\"198\">Description<\/th>\n<th width=\"128\">Sample Value<\/th>\n<\/tr>\n<tr>\n<td>college<\/td>\n<td>Specifies courses to display; required if using department.  Unlike  id, this cannot be a list (e.g., college=&#8221;CAS,CFA&#8221; is not valid.)<\/td>\n<td>&#8220;COM&#8221;<\/td>\n<\/tr>\n<tr>\n<td>department<\/td>\n<td>Specifies courses to display; required if using college. Unlike id,  this cannot be a list (e.g., department=&#8221;AR,MU&#8221; is not valid.)<\/td>\n<td>&#8220;CO&#8221;<\/td>\n<\/tr>\n<tr>\n<td>except<\/td>\n<td>Specifies course(s) to exclude from listing.  Can be one or more courses or ranges, in the same format as id.<\/td>\n<td>&#8220;COMCM301&#8221; , &#8220;COMCM301-COMCM350&#8221;, &#8220;COMCM301, COMCM302, COMCM305&#8221;, &#8220;COMCM301, COMCM320-COMCM350&#8221;<\/td>\n<\/tr>\n<tr>\n<td>id<\/td>\n<td>Specifies course(s) to display.  Can be one or more courses or ranges.  Overrides college\/department.<\/td>\n<td>&#8220;COMCM301&#8221; , &#8220;COMCM301-COMCM350&#8221;, &#8220;COMCM301, COMCM302, COMCM305&#8221;, &#8220;COMCM301, COMCM320-COMCM350&#8221;<\/td>\n<\/tr>\n<tr>\n<td>template<\/td>\n<td>Specifies a template file to be used when formatting CD Feed data. This should indicate a file within <code>course-feeds\/templates<\/code>. See below for additional information.<\/td>\n<td>&#8220;<code>history.tpl<\/code>&#8221; or &#8220;<code>com.html<\/code>&#8220;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Note that you can include a template file in both the  and  tags.  This allows one to have the courses indicated in one  tag (e.g., classes  outside your department) displayed differently than those indicated in  another tag.<\/p>\n<p>Hint: When adding multiple  tags, some  attributes (e.g.,  &#8220;show_unscheduled_courses&#8221;) can be used inside a  tag to override the  defaults set in  .<\/p>\n<h3>Examples<\/h3>\n<p>&lt;bub_base output=&#8221;undergraduate.html&#8221;&gt;<\/p>\n<p>This code selects all CAS History courses with numbers in-between 100  and 599 (i.e., all undergraduate courses). Note that it does not  specify an output template.<\/p>\n<p>&lt;bub_base output=&#8221;all.html&#8221; charset=&#8221;utf8&#8243;&gt;<\/p>\n<p>This code adds an output template and selects all CAS History courses  with numbers in-between 100 and 599, adding also CAS Anthropology 550.  An example usage would be to include courses of interest in another  department.<\/p>\n<p>&lt;bub_base output=&#8221;all.html&#8221; charset=&#8221;utf8&#8243; semester=&#8221;FALL2008&#8243; show_sections=&#8221;Y&#8221; show_unscheduled_course=&#8221;N&#8221;&gt;<\/p>\n<p>This code adds an output template and selects all CAS History courses  with numbers in-between 100 and 599, adding also CAS Anthropology 550,  but excluding CAS HI112. An example usage of &#8220;except&#8221; would be to  exclude courses offered to non-majors that cannot be taken for credit by  majors.<\/p>\n<h3>&lt;bub_course&gt;<\/h3>\n<p>The &lt;bub_course&gt; tag specifies what courses to include or exclude courses from your CD Feed. Its properties <strong>do not<\/strong> specify scheduling information (e.g., whether a course is being  offered) &#8211; this is set by the &lt;bub_base&gt; tag. To specify several  sets of courses to be included in your CD Feed, you can add more than  one &lt;bub_course&gt; tag to your .CFT file.<\/p>\n<p>The &lt;bub_course&gt; tag <strong>must<\/strong> contain either an &#8220;id&#8221; attribute or both a &#8220;college&#8221; and a &#8220;department&#8221; attribute.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview This step should take place only after your department&#8217;s course-feeds directory has been created and a notification received from Webmaster suppport. It creates two files or sets of files: the Course Container (.CFT), which determines what courses are displayed, and the Course Template (.html), which determines how the course feed data is displayed. Creating&#8230;<\/p>\n","protected":false},"author":3321,"featured_media":0,"parent":37730,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/37851"}],"collection":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/users\/3321"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/comments?post=37851"}],"version-history":[{"count":6,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/37851\/revisions"}],"predecessor-version":[{"id":37888,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/37851\/revisions\/37888"}],"up":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/37730"}],"wp:attachment":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/media?parent=37851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}