<table style="width: 100%;">
    <tr>
        <th>Exam</th>
        <th>Location</th>
        <th>Date</th>
        <th></th>
        <th></th>
    </tr>


    {% for exam in page.exams %}
    <tr {% if exam.optional %}class="hoverRow"{% endif %}>
      <td>{{ exam.name }}</td>
      <td>{{ exam.location }}</td>
      <td>{{ exam.date }}</td>
      <td class="examTime" data-time="{{ exam.time }}"></td>
      <td><button onclick="searchExam('{{ exam.code }}')">View</button></td>
    </tr>
    {% endfor %}
</table>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.16.0/moment.min.js"></script>
<script src="/static/js/exam-script.js"></script>

Add exam module to includes
Add exam module to includes