~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/templates/offering.html

  • Committer: William Grant
  • Date: 2010-02-15 08:49:58 UTC
  • Revision ID: grantw@unimelb.edu.au-20100215084958-8x5dzd9k4pbcddlz
Split subject/semester management out onto a separate page, and link to SemesterEdit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<html xmlns="http://www.w3.org/1999/xhtml"
2
2
      xmlns:py="http://genshi.edgewall.org/">
3
3
  <head>
4
 
    <title>${context.subject.name} (${context.semester.year} ${context.semester.display_name})</title>
 
4
    <title>${context.subject.name} (${context.semester.year} semester ${context.semester.semester})</title>
5
5
  </head>
6
6
  <body>
7
7
    <h1>${context.subject.name}</h1>
12
12
           href="${req.publisher.generate(context, OfferingEdit)}">
13
13
           Change details
14
14
        </a>
15
 
        <a py:if="req.user.admin"
16
 
           class="subjectaction"
17
 
           href="${req.publisher.generate(context, OfferingCloneWorksheets)}">
18
 
           Clone worksheets
19
 
        </a>
20
15
        <a py:if="'enrol' in permissions"
21
16
           class="groupaction"
22
 
           href="${req.publisher.generate(context, EnrolmentsView)}">
23
 
          Administer enrolments
 
17
           href="${req.publisher.generate(context, None, ('+enrolments', '+new'))}">
 
18
          Enrol users
24
19
        </a>
25
20
      </div>
26
21
 
38
33
          </p>
39
34
          <py:otherwise>
40
35
            <ul class="paddedlist">
41
 
              <li py:for="project in context.projects.order_by(Project.deadline)"
 
36
              <li py:for="project in context.projects"
42
37
                  py:attrs="{'class': 'project closed'}
43
38
                            if project.has_deadline_passed(req.user)
44
39
                            else {'class': 'project'}"
90
85
        </a>
91
86
      </div>
92
87
 
93
 
      <div py:if="'edit_worksheets' in permissions or len(worksheets) > 0"
 
88
      <div py:if="'edit_worksheets' in permissions or context.worksheets.count() > 0"
94
89
           class="majorsection">
95
90
        <h2>Worksheets</h2>
96
 
        <py:choose test="len(worksheets)">
 
91
        <py:choose test="context.worksheets.count()">
97
92
          <p py:when="0">
98
93
            There are no worksheets for this offering.
99
94
            <a class="addaction" href="${req.publisher.generate(context, None, ('+worksheets', '+new'))}">Create one now</a>
104
99
                <li>
105
100
                  <!-- Can't generate a URL directly to the worksheet, since this is a fake worksheet. -->
106
101
                  <a href="${req.publisher.generate(context)}/+worksheets/${worksheet.id}">${worksheet.name}</a>
107
 
                  <span py:if="not worksheet.published">(unpublished &mdash; not visible to students)</span>
108
102
                  <py:if test="worksheet.assessable">
109
103
                    <ul>
110
104
                      <li class="${worksheet.complete_class}">
121
115
                  Total exercises completed: ${exercises_done}/${exercises_total} (${exercises_pct}%)
122
116
                </li>
123
117
              </ul> 
124
 
              <p py:if="context.show_worksheet_marks">
 
118
              <p>
125
119
                <span style="font-weight: bold;">Mark:</span> ${worksheet_mark}/${worksheet_max_mark}
126
120
              </p>
127
121
            </py:if>
128
 
            <span py:if="context.worksheet_cutoff is not None"
129
 
              title="${'Closed' if context.has_worksheet_cutoff_passed(req.user) else 'Due'}: ${format_datetime(context.worksheet_cutoff)}">
130
 
              Worksheet submissions ${'closed' if context.has_worksheet_cutoff_passed(req.user) else 'are due'} ${format_datetime_short(context.worksheet_cutoff)}.
131
 
              <br />
132
 
              <py:choose test="context.has_worksheet_cutoff_passed(req.user)">
133
 
              <py:when test="True">You can still submit, but it will not count towards your mark.</py:when>
134
 
              <py:when test="False">After this time, you can still submit, but it will not count towards your mark.</py:when>
135
 
              </py:choose>
136
 
            </span>
137
122
            <div class="horizontalactions" py:if="'edit_worksheets' in permissions">
138
123
              <a class="manageaction" href="${req.publisher.generate(context, None, ('+worksheets', '+edit'))}"> Manage worksheets</a>
139
124
              <a class="manageaction" href="/+exercises">Manage exercises</a>
140
125
            </div>
141
 
            <div class="horizontalactions" py:if="'view_worksheet_marks' in permissions">
142
 
              <a class="marksaction" href="${req.publisher.generate(context, None, ('+worksheets', '+marks'))}">View worksheet marks</a>
143
 
            </div>
144
126
          </div>
145
127
        </py:choose>
146
128
      </div>