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

« back to all changes in this revision

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

  • Committer: Matt Giuca
  • Date: 2010-07-23 06:27:02 UTC
  • mfrom: (1818.1.1 project-extensions)
  • Revision ID: matt.giuca@gmail.com-20100723062702-cknq5zzk1cwf8q2q
Merge from branch project-extensions (changes project_extension.deadline into project_extension.days in the database).
The branch isn't finished; I just want this DB change to be included before we release 1.0.2, in case the rest of the changes for this branch don't make it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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>
15
20
        <a py:if="'enrol' in permissions"
16
21
           class="groupaction"
17
 
           href="${req.publisher.generate(context, None, ('+enrolments', '+new'))}">
18
 
          Enrol users
 
22
           href="${req.publisher.generate(context, EnrolmentsView)}">
 
23
          Administer enrolments
19
24
        </a>
20
25
      </div>
21
26
 
33
38
          </p>
34
39
          <py:otherwise>
35
40
            <ul class="paddedlist">
36
 
              <li py:for="project in context.projects"
 
41
              <li py:for="project in context.projects.order_by(Project.deadline)"
37
42
                  py:attrs="{'class': 'project closed'}
38
43
                            if project.has_deadline_passed(req.user)
39
44
                            else {'class': 'project'}"
85
90
        </a>
86
91
      </div>
87
92
 
88
 
      <div py:if="'edit_worksheets' in permissions or context.worksheets.count() > 0"
 
93
      <div py:if="'edit_worksheets' in permissions or len(worksheets) > 0"
89
94
           class="majorsection">
90
95
        <h2>Worksheets</h2>
91
 
        <py:choose test="context.worksheets.count()">
 
96
        <py:choose test="len(worksheets)">
92
97
          <p py:when="0">
93
98
            There are no worksheets for this offering.
94
99
            <a class="addaction" href="${req.publisher.generate(context, None, ('+worksheets', '+new'))}">Create one now</a>
99
104
                <li>
100
105
                  <!-- Can't generate a URL directly to the worksheet, since this is a fake worksheet. -->
101
106
                  <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>
102
108
                  <py:if test="worksheet.assessable">
103
109
                    <ul>
104
110
                      <li class="${worksheet.complete_class}">
115
121
                  Total exercises completed: ${exercises_done}/${exercises_total} (${exercises_pct}%)
116
122
                </li>
117
123
              </ul> 
118
 
              <p>
 
124
              <p py:if="context.show_worksheet_marks">
119
125
                <span style="font-weight: bold;">Mark:</span> ${worksheet_mark}/${worksheet_max_mark}
120
126
              </p>
121
127
            </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>
122
137
            <div class="horizontalactions" py:if="'edit_worksheets' in permissions">
123
138
              <a class="manageaction" href="${req.publisher.generate(context, None, ('+worksheets', '+edit'))}"> Manage worksheets</a>
124
139
              <a class="manageaction" href="/+exercises">Manage exercises</a>
125
140
            </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>
126
144
          </div>
127
145
        </py:choose>
128
146
      </div>