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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/">
<head>
<title>Submit project</title>
</head>
<body>
<h1>Submit project</h1>
<div id="ivle_padding">
<py:choose test="offering">
<div py:when="None">
<p>You may not submit files from <span style="font-family: monospace">${path}</span> in
<py:choose test="">
<span py:when="principal is req.user">your repository.</span>
<span py:otherwise="">the repository for ${principal.display_name}.</span>
</py:choose>
You can only submit files from a subject directory.
</p>
</div>
<div py:otherwise="">
<p>You are submitting <span style="font-family: monospace">${path}</span> from
<py:choose test="">
<span py:when="principal is req.user">your repository.</span>
<span py:otherwise="">the repository for ${principal.display_name}.</span>
</py:choose>
</p>
<p>You may submit to any open project in ${offering.subject.name}. Which project do you wish to submit this for?</p>
<form action="" method="post">
<table>
<tr py:for="project in principal.get_projects(offering=offering)"
py:with="attrs = {'disabled': 'disabled'} if project.has_deadline_passed(req.user) else {}"
py:attrs="{'class': 'project closed'} if project.has_deadline_passed(req.user) else {'class': 'project'}">
<td style="vertical-align: top">
<input type="radio" name="project" id="project_${project.id}" value="${project.id}" py:attrs="attrs" />
</td>
<td>
<label for="project_${project.id}">
<py:choose test="project.url not in (None, '')">
<a py:when="True" href="${project.url}">${project.name}</a>
<span py:otherwise="">${project.name}</span>
</py:choose>
–
<span py:content="format_submission_principal(req.user, principal)" /> –
<!-- XXX This deadline does not take the student's extensions into account. -->
<span title="${format_datetime(project.deadline)}">
${'closed' if project.has_deadline_passed(req.user) else 'due'} ${format_datetime_short(project.deadline)}
</span>
<py:if test="principal is not None"
py:with="submissions = project.get_submissions_for_principal(principal)">
–
<py:choose test="submissions.count()">
<span py:when="0">
not yet submitted
</span>
<span py:otherwise=""
py:with="latest = submissions.last()"
title="${format_datetime(latest.date_submitted)}">
last submitted ${format_datetime_short(latest.date_submitted)}
</span>
</py:choose>
</py:if>
<br />
${project.synopsis}
</label>
</td>
</tr>
</table>
<p>Ensure that you have committed all changes - only changes in the repository will be submitted.</p>
<p>You may resubmit a project again at any time until its deadline, but a new submission will overwrite any made earlier.</p>
<p><input type="submit" value="Submit Project" />
<a class="helpaction" href="/+help/Submitting%20a%20project">Help submitting a project</a>
</p>
</form>
</div>
</py:choose>
</div>
</body>
</html>
|