4
4
<title>Subjects</title>
7
<py:def function="offering_url(offering)">/subjects/${offering.subject.short_name}/${offering.semester.year}/${offering.semester.semester}</py:def>
7
9
<div id="ivle_padding">
8
<h2>IVLE Subject Homepages</h2>
9
<py:if test="(len(enrolled_subjects) > 0)">
12
<py:for each="subject in enrolled_subjects">
13
<py:choose test="subject['url']">
15
<li>${subject['name']} (no home page)</li>
18
<li><a href="${subject['url']}">${subject['name']}</a></li>
24
<py:if test="(len(other_subjects) > 0)">
25
<h3>Other Subjects</h3>
26
<p>You are not currently enrolled in these subjects</p>
28
<py:for each="subject in other_subjects">
29
<py:choose test="subject['url']">
31
<li>${subject['name']} (no home page)</li>
34
<li><a href="${subject['url']}">${subject['name']}</a></li>
10
<p py:if="len(semesters) == 0">You are not currently enrolled in any subjects.</p>
11
<py:for each="(semester, enrolments) in semesters">
12
<py:choose test="semester.state">
13
<h2 py:when="u'current'">${semester.year}, semester ${semester.semester}</h2>
14
<h3 py:otherwise="">${semester.year}, semester ${semester.semester}</h3>
17
<py:for each="enrolment in enrolments">
19
<a href="${offering_url(enrolment.offering)}/+worksheets">${enrolment.offering.subject.name}</a>
20
<py:if test="'edit' in enrolment.offering.get_permissions(user)">
22
<a href="${offering_url(enrolment.offering)}/+groups">(administer groups)</a>
23
<a href="${offering_url(enrolment.offering)}/+enrolments/+new">(enrol users)</a>