1442.1.2
by William Grant
Add basic (ie. pretty much empty) offering index. |
1 |
<html xmlns="http://www.w3.org/1999/xhtml" |
2 |
xmlns:py="http://genshi.edgewall.org/"> |
|
3 |
<head>
|
|
4 |
<title>${context.subject.name} (${context.semester.year} semester ${context.semester.semester})</title> |
|
5 |
</head> |
|
6 |
<body>
|
|
7 |
<h1>${context.subject.name}</h1> |
|
8 |
<div id="ivle_padding"> |
|
9 |
<div class="contextactions"> |
|
1451.1.7
by William Grant
Add a 'Change details' link on the offering index, pointing to +edit. |
10 |
<a py:if="'edit' in permissions" |
11 |
class="editaction" |
|
12 |
href="${req.publisher.generate(context, OfferingEdit)}"> |
|
13 |
Change details |
|
14 |
</a> |
|
1442.1.5
by William Grant
Improve worksheet management experience from the offering index. |
15 |
<a py:if="'enrol' in permissions" |
1442.1.6
by William Grant
Enrolment is now a groupaction, and project management a manageaction. |
16 |
class="groupaction" |
1442.1.2
by William Grant
Add basic (ie. pretty much empty) offering index. |
17 |
href="${req.publisher.generate(context, None, ('+enrolments', '+new'))}"> |
18 |
Enrol users |
|
19 |
</a> |
|
1442.1.8
by William Grant
Add an empty projects section. |
20 |
</div> |
21 |
||
1451.1.2
by William Grant
Move Subject.url to Offering, and add Offering.description. Show these on the offering index. |
22 |
<div py:if="context.description" style="margin-bottom: 1em;"> |
23 |
<div style="margin-bottom: 0.5em;">${context.description}</div> |
|
24 |
<a py:if="context.url" class="webaction" href="${context.url}">Home page</a> |
|
25 |
</div> |
|
26 |
||
1442.1.9
by William Grant
Add some extra margin between the projects and worksheets sections. |
27 |
<div py:if="'edit' in permissions or context.projects.count() > 0" |
28 |
class="majorsection"> |
|
1442.1.8
by William Grant
Add an empty projects section. |
29 |
<h2>Projects</h2> |
30 |
<py:choose test="context.projects.count()"> |
|
31 |
<p py:when="0"> |
|
32 |
There are no projects for this offering. |
|
33 |
</p> |
|
1442.1.21
by William Grant
Add submission instructions under the list of projects. |
34 |
<py:otherwise>
|
35 |
<ul class="paddedlist"> |
|
36 |
<li py:for="project in context.projects" |
|
37 |
py:attrs="{'class': 'project closed'} |
|
38 |
if project.has_deadline_passed(req.user) |
|
39 |
else {'class': 'project'}" |
|
40 |
py:with="principal = project.project_set.get_submission_principal(req.user)"> |
|
41 |
<a href="${project.url}">${project.name}</a> – |
|
42 |
<span py:content="format_submission_principal(req.user, principal)" /> – |
|
43 |
<span title="${format_datetime(project.deadline)}"> |
|
44 |
${'closed' if project.has_deadline_passed(req.user) else 'due'} ${format_datetime_short(project.deadline)} |
|
45 |
</span> |
|
46 |
<py:if test="principal is not None" |
|
47 |
py:with="submissions = project.get_submissions_for_principal(principal)"> |
|
48 |
–
|
|
49 |
<py:choose test="submissions.count()"> |
|
50 |
<span py:when="0"> |
|
51 |
not yet submitted |
|
52 |
</span> |
|
53 |
<span py:otherwise="" |
|
54 |
py:with="latest = submissions.last()" |
|
55 |
title="${format_datetime(latest.date_submitted)}"> |
|
56 |
last submitted ${format_datetime_short(latest.date_submitted)} |
|
57 |
</span> |
|
58 |
</py:choose> |
|
59 |
</py:if> |
|
60 |
<br /> |
|
61 |
${project.synopsis} |
|
62 |
</li> |
|
63 |
</ul> |
|
1442.1.24
by William Grant
Only display the submission help text when there are submittable projects. |
64 |
<py:if test="context.get_open_projects_for_user(req.user).count() > 0"> |
65 |
<p>
|
|
66 |
To submit to a project that has not yet closed, use the file |
|
67 |
browser to navigate to the file or directory that you wish to |
|
68 |
submit, click “More actions...”, |
|
69 |
“Submit”, and then select the correct project. |
|
70 |
</p> |
|
71 |
<p>
|
|
72 |
If the project to which you intend to submit is not listed, |
|
73 |
ensure that you are in the correct directory, or a subdirectory |
|
1442.1.25
by William Grant
Note that you must be in the correct subject's mywork directory. |
74 |
thereof. For solo projects, you must be inside the subject's |
1442.1.24
by William Grant
Only display the submission help text when there are submittable projects. |
75 |
“mywork” directory. For group projects, you must be |
76 |
inside the directory for the assigned group. |
|
77 |
</p> |
|
78 |
<p>
|
|
79 |
You may resubmit a project as you wish until the deadline, but |
|
80 |
a new submission will overwrite any made earlier. |
|
81 |
</p> |
|
82 |
</py:if> |
|
1442.1.21
by William Grant
Add submission instructions under the list of projects. |
83 |
</py:otherwise> |
1442.1.8
by William Grant
Add an empty projects section. |
84 |
</py:choose> |
85 |
||
1442.1.5
by William Grant
Improve worksheet management experience from the offering index. |
86 |
<a py:if="'edit' in permissions" |
1442.1.6
by William Grant
Enrolment is now a groupaction, and project management a manageaction. |
87 |
class="manageaction" |
1442.1.2
by William Grant
Add basic (ie. pretty much empty) offering index. |
88 |
href="${req.publisher.generate(context, None, '+projects')}"> |
89 |
Manage projects |
|
90 |
</a> |
|
1442.1.5
by William Grant
Improve worksheet management experience from the offering index. |
91 |
</div> |
1442.1.8
by William Grant
Add an empty projects section. |
92 |
|
1442.1.9
by William Grant
Add some extra margin between the projects and worksheets sections. |
93 |
<div py:if="'edit' in permissions or context.worksheets.count() > 0" |
94 |
class="majorsection"> |
|
1442.1.5
by William Grant
Improve worksheet management experience from the offering index. |
95 |
<h2>Worksheets</h2> |
96 |
<py:choose test="context.worksheets.count()"> |
|
97 |
<p py:when="0"> |
|
98 |
There are no worksheets for this offering. |
|
99 |
<a class="addaction" href="${req.publisher.generate(context, None, ('+worksheets', '+new'))}">Create one now</a> |
|
100 |
</p> |
|
101 |
<div py:otherwise=""> |
|
1442.1.31
by William Grant
Show the worksheet listing with marks and schtuff on the offering index. |
102 |
<ul id="tutorial-toc"> |
103 |
<py:for each="worksheet in worksheets"> |
|
104 |
<li>
|
|
105 |
<!-- Can't generate a URL directly to the worksheet, since this is a fake worksheet. -->
|
|
106 |
<a href="${req.publisher.generate(context)}/+worksheets/${worksheet.name}">${worksheet.name}</a> |
|
107 |
<py:if test="worksheet.assessable"> |
|
108 |
<ul>
|
|
109 |
<li class="${worksheet.complete_class}"> |
|
110 |
Completed ${worksheet.mand_done}/${worksheet.total}${worksheet.optional_message} |
|
111 |
</li> |
|
112 |
</ul> |
|
113 |
</py:if> |
|
114 |
</li> |
|
115 |
</py:for> |
|
116 |
</ul> |
|
117 |
<py:if test="exercises_total > 0"> |
|
118 |
<ul>
|
|
119 |
<li class="${worksheets_complete_class}"> |
|
120 |
Total exercises completed: ${exercises_done}/${exercises_total} (${exercises_pct}%) |
|
121 |
</li> |
|
122 |
</ul> |
|
123 |
<p>
|
|
124 |
<span style="font-weight: bold;">Mark:</span> ${worksheet_mark}/${worksheet_max_mark} |
|
125 |
</p> |
|
126 |
</py:if> |
|
1442.1.5
by William Grant
Improve worksheet management experience from the offering index. |
127 |
<a py:if="'edit' in permissions" |
128 |
class="manageaction" |
|
129 |
href="${req.publisher.generate(context, None, ('+worksheets', '+edit'))}"> |
|
130 |
Manage worksheets |
|
131 |
</a> |
|
132 |
</div> |
|
133 |
</py:choose> |
|
1442.1.2
by William Grant
Add basic (ie. pretty much empty) offering index. |
134 |
</div> |
135 |
</div> |
|
136 |
</body> |
|
137 |
</html> |
|
138 |
||
139 |