1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/">
<head>
<title>Enrolments - ${offering.subject.name}</title>
</head>
<body>
<h1>Staff and students in ${offering.subject.name}</h1>
<div id="ivle_padding">
<div class="majorsection" py:def="userlist(title, role)"
py:if="offering.get_members_by_role(unicode(role)).count()"
py:with="can_edit = ('enrol_' + role) in offering_perms">
<h2>${title}</h2>
<table class="pretty_table">
<thead><tr><th>Login</th><th>Name</th><th py:if="can_edit">Actions</th></tr></thead>
<tbody>
<tr py:for="user in offering.get_members_by_role(unicode(role))">
<td>${user.login}</td>
<td>${user.display_name}</td>
<td py:if="can_edit">
<a href="${req.publisher.generate(offering.get_enrolment(user), EnrolmentEdit)}" title="Edit"><img src="${mediapath + 'interface/pencil.png'}" alt="Edit" /></a>
<a href="${req.publisher.generate(offering.get_enrolment(user), EnrolmentDelete)}" title="Remove"><img src="${mediapath + 'interface/delete.png'}" alt="Remove" /></a>
</td>
</tr>
</tbody>
</table>
</div>
${userlist("Lecturers", "lecturer")}
${userlist("Tutors", "tutor")}
${userlist("Students", "student")}
<a class="groupaction" href="${req.publisher.generate(offering, EnrolView)}">Enrol user</a>
</div>
</body>
</html>
|