-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a202bd
commit d1c7415
Showing
7 changed files
with
111 additions
and
175 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<rss version="2.0" xmlns:catalog="http://www.middlebury.edu/course_catalog"> | ||
<channel> | ||
<title>{{ title }}</title> | ||
<link>{{ feedLink }}</link> | ||
<description></description> | ||
<lastBuildDate>{{ 'now' | date('r') }}</lastBuildDate> | ||
<generator>Course Catalog</generator> | ||
<docs>http://blogs.law.harvard.edu/tech/rss</docs> | ||
{% for course_data in courses %} | ||
{{ include('partials/course.xml.twig', course_data, with_context = FALSE) }} | ||
{% endfor %} | ||
|
||
</channel> | ||
</rss> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<item> | ||
<title>{{ course.displayname }}</title> | ||
<link>{{ url('view_course', {'course': osidIdToString(course.id)}) }}</link> | ||
<description><![CDATA[{{ course.description|raw }}]]></description> | ||
<catalog:title>{{ course.title }}</catalog:title> | ||
<catalog:id>{{ osidIdToString(course.id) }}</catalog:id> | ||
{%~ if is_primary is not null %} | ||
<catalog:enrollable>{{ is_primary ? 'true':'false' }}</catalog:enrollable> | ||
{% endif ~%} | ||
{%- if alternates is not empty %} | ||
{%- for alternate in alternates %} | ||
<catalog:alternate id="{{ osidIdToString(alternate.id) }}" href="{{ url('view_course', {course: osidIdToString(alternate.id)}) }}" is_primary="{{ alternate.is_primary ? 'true':'false' }}">{{ alternate.displayname }}</catalog:alternate> | ||
{% endfor ~%} | ||
{% endif %} | ||
<catalog:genustype type="{{ osidTypeToString(course.genustype) }}" id="{{ osidTypeToString(course.genustype) }}">{{ course.genustype.displayname }}</catalog:genustype> | ||
{% for topic in subjectTopics %} | ||
<catalog:topic type="{{ osidTypeToString(topic.genustype) }}" id="{{ osidIdToString(topic.id) }}" href='{{ url('view_topic', {topic: osidIdToString(topic.id)}) }}'>{{ topic.displayname }}</catalog:topic> | ||
{% endfor %} | ||
{%- for topic in departmentTopics %} | ||
<catalog:topic type="{{ osidTypeToString(topic.genustype) }}" id="{{ osidIdToString(topic.id) }}" href='{{ url('view_topic', {topic: osidIdToString(topic.id)}) }}'>{{ topic.displayname }}</catalog:topic> | ||
{% endfor %} | ||
{%- for topic in divisionTopics %} | ||
<catalog:topic type="{{ osidTypeToString(topic.genustype) }}" id="{{ osidIdToString(topic.id) }}" href='{{ url('view_topic', {topic: osidIdToString(topic.id)}) }}'>{{ topic.displayname }}</catalog:topic> | ||
{% endfor %} | ||
{%- for topic in requirementTopics %} | ||
<catalog:topic type="{{ osidTypeToString(topic.genustype) }}" id="{{ osidIdToString(topic.id) }}" href='{{ url('view_topic', {topic: osidIdToString(topic.id)}) }}'>{{ topic.displayname }}</catalog:topic> | ||
{% endfor %} | ||
{%- if blockTopics is not empty %} | ||
{%- for topic in blockTopics %} | ||
<catalog:topic type="{{ osidTypeToString(topic.genustype) }}" id="{{ osidIdToString(topic.id) }}" href='{{ url('view_topic', {topic: osidIdToString(topic.id)}) }}'>{{ topic.displayname }}</catalog:topic> | ||
{% endfor %} | ||
{% endif %} | ||
{%- if levelTopics is not empty %} | ||
{%- for topic in levelTopics %} | ||
<catalog:topic type="{{ osidTypeToString(topic.genustype) }}" id="{{ osidIdToString(topic.id) }}" href='{{ url('view_topic', {topic: osidIdToString(topic.id)}) }}'>{{ topic.displayname }}</catalog:topic> | ||
{% endfor ~%} | ||
{% endif %} | ||
{{ include('partials/offering_list.xml.twig', {offerings: offerings}, with_context = false) }} | ||
</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<catalog:offering_list> | ||
{% set currentTerm = null %} | ||
{% for offering in offerings %} | ||
{% if currentTerm is null or currentTerm.id != offering.termid %} | ||
{% if currentTerm is not null %} | ||
</catalog:offering_term> | ||
{% endif %} | ||
{% set currentTerm = offering.term %} | ||
<catalog:offering_term id="{{ osidIdToString(currentTerm.id) }}" name="{{ currentTerm.displayname }}"> | ||
{% endif %} | ||
<catalog:offering id="{{ osidIdToString(offering.id) }}" href="{{ url('view_offering', {id: osidIdToString(offering.id)}) }}"> | ||
<catalog:display_name>{{ offering.displayname }}</catalog:display_name> | ||
<catalog:title>{{ offering.title }}</catalog:title> | ||
<catalog:description><![CDATA[{{ offering.description|raw }}]]></catalog:description> | ||
<catalog:type id="{{ osidTypeToString(offering.genustype) }}">{{ offering.genustype.displayname }}</catalog:type> | ||
<catalog:term id="{{ osidIdToString(offering.term.id) }}">{{ offering.term.displayname }}</catalog:term> | ||
<catalog:location id="{{ osidIdToString(offering.locationid) }}">{{ offering.locationInfo }}</catalog:location> | ||
<catalog:schedule>{{ offering.scheduleinfo }}</catalog:schedule> | ||
{% for instructor in offering.instructors %} | ||
<catalog:instructor id="{{ osidIdToString(instructor.resource.id) }}"> | ||
<catalog:given_name>{{ instructor.givename }}</catalog:given_name> | ||
<catalog:surname>{{ instructor.surname }}</catalog:surname> | ||
<catalog:display_name>{{ instructor.resource.displayname }}</catalog:display_name> | ||
</catalog:instructor> | ||
{% endfor %} | ||
</catalog:offering> | ||
{% endfor %} | ||
</catalog:offering_term> | ||
</catalog:offering_list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters