~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-26 06:33:35 UTC
  • Revision ID: grantw@unimelb.edu.au-20100226063335-25ka31up8cegwaiz
ivle.interpret.execute_raw now sets a clean environment, in particular with HOME set correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
          </p>
39
39
          <py:otherwise>
40
40
            <ul class="paddedlist">
41
 
              <li py:for="project in context.projects"
 
41
              <li py:for="project in context.projects.order_by(Project.deadline)"
42
42
                  py:attrs="{'class': 'project closed'}
43
43
                            if project.has_deadline_passed(req.user)
44
44
                            else {'class': 'project'}"
90
90
        </a>
91
91
      </div>
92
92
 
93
 
      <div py:if="'edit_worksheets' in permissions or context.worksheets.count() > 0"
 
93
      <div py:if="'edit_worksheets' in permissions or len(worksheets) > 0"
94
94
           class="majorsection">
95
95
        <h2>Worksheets</h2>
96
 
        <py:choose test="context.worksheets.count()">
 
96
        <py:choose test="len(worksheets)">
97
97
          <p py:when="0">
98
98
            There are no worksheets for this offering.
99
99
            <a class="addaction" href="${req.publisher.generate(context, None, ('+worksheets', '+new'))}">Create one now</a>
104
104
                <li>
105
105
                  <!-- Can't generate a URL directly to the worksheet, since this is a fake worksheet. -->
106
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>
107
108
                  <py:if test="worksheet.assessable">
108
109
                    <ul>
109
110
                      <li class="${worksheet.complete_class}">
120
121
                  Total exercises completed: ${exercises_done}/${exercises_total} (${exercises_pct}%)
121
122
                </li>
122
123
              </ul> 
123
 
              <p>
 
124
              <p py:if="context.show_worksheet_marks">
124
125
                <span style="font-weight: bold;">Mark:</span> ${worksheet_mark}/${worksheet_max_mark}
125
126
              </p>
126
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>
127
137
            <div class="horizontalactions" py:if="'edit_worksheets' in permissions">
128
138
              <a class="manageaction" href="${req.publisher.generate(context, None, ('+worksheets', '+edit'))}"> Manage worksheets</a>
129
139
              <a class="manageaction" href="/+exercises">Manage exercises</a>
130
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>
131
144
          </div>
132
145
        </py:choose>
133
146
      </div>