<logic:variable as="course" value="[? \Components\AF\Courses::get($course_id) ?]" />
<logic:variable as="course_title" value="[? \Components\Commerce\Products::getColumn($course['product_id'], 'product_title') ?]" />
<p>Dear <personalisation:firstname /></p>
<p>The course <strong>[? $course_title ?]</strong> you are enrolled in is starting soon. Check below for the details of the course.<p>
<div style="margin: 10px; margin-top: 20px; padding: 10px; border: 1px dotted #aaaaaa;">
<strong>[? $course_title ?]</strong><br />
[? $course['course_code'] ?] ([? ucfirst($course['course_type']) ?] Course)<br /><br />
<logic:if test="$course['course_comment']">
<em>Note: [? $course['course_comment'] ?]</em><br />
</logic:if>
<ul>
<data:repeater as="course_location" datasource="\Components\AF\Courses\Units::getLocationAddressesForCourse($course)">
<li>
<strong>[? \Components\AF\Courses\Configuration\Locations::renderTitle($course_location['location_id'], true) ?]</strong>
<logic:if test="$course_location['location_address']">
<br />[? $course_location['location_address'] ?]
</logic:if>
</li>
</data:repeater>
</ul>
<data:table datasource="\Components\AF\Courses\Units::getAllForCourse($course['course_id'])" emptymessage="The schedule for this course has not been set yet." as="unit">
<data:column heading="Unit">
[? \Components\AF\Courses\Units::renderTitle($unit) ?]
</data:column>
<logic:if test="!(\Components\AF\Courses\CollectiveCourses::configGetValue('hide_location_name'))">
<data:column heading="Location" width="200px">
<logic:if test="$unit['location_id']">
<small>[? \Components\AF\Courses\Configuration\Locations::renderTitle($unit['location_id'], true) ?]</small>
</logic:if>
</data:column>
</logic:if>
<logic:if test="!(\Components\AF\Courses\CollectiveCourses::configGetValue('hide_teacher_name'))">
<data:column heading="Teacher" width="150px">
<logic:if test="$unit['teacher_id']">
<logic:variable as="teacher" value="[? \Components\Customers\Contacts::get($unit['teacher_id']) ?]" />
<small>[? $teacher['contact_first_name'] ?] [? strtoupper($teacher['contact_last_name']) ?]</small>
</logic:if>
</data:column>
</logic:if>
</data:table>
</div>
<logic:variable as="course" value="[? \Components\AF\Courses::get($course_id) ?]" />
<logic:variable as="course_title" value="[? \Components\Commerce\Products::getColumn($course['product_id'], 'product_title') ?]" />
<p>Dear <personalisation:firstname /></p>
<p>The course <strong>[? $course_title ?]</strong> you are enrolled in is starting soon. Check below for the details of the course.<p>
<div style="margin: 10px; margin-top: 20px; padding: 10px; border: 1px dotted #aaaaaa;">
<strong>[? $course_title ?]</strong><br />
[? $course['course_code'] ?] ([? ucfirst($course['course_type']) ?] Course)<br /><br />
<logic:if test="$course['course_comment']">
<em>Note: [? $course['course_comment'] ?]</em><br />
</logic:if>
<ul>
<data:repeater as="course_location" datasource="\Components\AF\Courses\Units::getLocationAddressesForCourse($course)">
<li>
<strong>[? \Components\AF\Courses\Configuration\Locations::renderTitle($course_location['location_id'], true) ?]</strong>
<logic:if test="$course_location['location_address']">
<br />[? $course_location['location_address'] ?]
</logic:if>
</li>
</data:repeater>
</ul>
<data:table datasource="\Components\AF\Courses\Units::getAllForCourse($course['course_id'])" emptymessage="The schedule for this course has not been set yet." as="unit">
<data:column heading="Unit">
[? \Components\AF\Courses\Units::renderTitle($unit) ?]
</data:column>
<logic:if test="!(\Components\AF\Courses\CollectiveCourses::configGetValue('hide_location_name'))">
<data:column heading="Location" width="200px">
<logic:if test="$unit['location_id']">
<small>[? \Components\AF\Courses\Configuration\Locations::renderTitle($unit['location_id'], true) ?]</small>
</logic:if>
</data:column>
</logic:if>
<logic:if test="!(\Components\AF\Courses\CollectiveCourses::configGetValue('hide_teacher_name'))">
<data:column heading="Teacher" width="150px">
<logic:if test="$unit['teacher_id']">
<logic:variable as="teacher" value="[? \Components\Customers\Contacts::get($unit['teacher_id']) ?]" />
<small>[? $teacher['contact_first_name'] ?] [? strtoupper($teacher['contact_last_name']) ?]</small>
</logic:if>
</data:column>
</logic:if>
</data:table>
</div>