~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: 2012-06-28 01:52:02 UTC
  • Revision ID: me@williamgrant.id.au-20120628015202-f6ru7o367gt6nvgz
Hah

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} semester ${context.semester.semester})</title>
 
4
    <title>${context.subject.name} (${context.semester.year} ${context.semester.display_name})</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>
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'}"
44
49
                </py:choose>
45
50
                &ndash;
46
51
                <span py:content="format_submission_principal(req.user, principal)" /> &ndash;
47
 
                <span title="${format_datetime(project.deadline)}">
 
52
                <!-- XXX This deadline does not take the student's extensions into account. -->
 
53
                <span title="${'Closed' if project.has_deadline_passed(req.user) else 'Due'}: ${format_datetime(project.deadline)}">
48
54
                  ${'closed' if project.has_deadline_passed(req.user) else 'due'} ${format_datetime_short(project.deadline)}
49
55
                </span>
50
56
                <py:if test="principal is not None"
56
62
                    </span>
57
63
                    <span py:otherwise=""
58
64
                          py:with="latest = submissions.last()"
59
 
                          title="${format_datetime(latest.date_submitted)}">
 
65
                          title="Submitted: ${format_datetime(latest.date_submitted)}">
60
66
                      last submitted ${format_datetime_short(latest.date_submitted)}
 
67
                      <a class="verifyaction" href="${latest.get_verify_url(req.user)}">Verify</a>
61
68
                    </span>
62
69
                  </py:choose>
63
70
                </py:if>
64
71
                <br />
65
72
                ${project.synopsis}
 
73
                <div class="horizontalactions" py:if="'view_project_submissions' in permissions">
 
74
                  <a class="verifyaction" href="${req.publisher.generate(project)}">View submissions</a>
 
75
                  <a py:if="project.project_set.is_group" class="groupaction"
 
76
                     href="${req.publisher.generate(project.project_set, GroupsView)}">Manage groups</a>
 
77
                </div>
66
78
              </li>
67
79
            </ul>
68
 
            <py:if test="context.get_open_projects_for_user(req.user).count() > 0">
69
 
              <p>
70
 
                To submit to a project that has not yet closed, use the file
71
 
                browser to navigate to the file or directory that you wish to
72
 
                submit, click &ldquo;More actions...&rdquo;,
73
 
                &ldquo;Submit&rdquo;, and then select the correct project.
74
 
              </p>
75
 
              <p>
76
 
                If the project to which you intend to submit is not listed,
77
 
                ensure that you are in the correct directory, or a subdirectory
78
 
                thereof. For solo projects, you must be inside the subject's
79
 
                &ldquo;mywork&rdquo; directory. For group projects, you must be
80
 
                inside the directory for the assigned group.
81
 
              </p>
82
 
              <p>
83
 
                You may resubmit a project as you wish until the deadline, but
84
 
                a new submission will overwrite any made earlier.
85
 
              </p>
86
 
            </py:if>
 
80
            <p py:if="context.get_open_projects_for_user(req.user).count() > 0">
 
81
              <a class="helpaction" href="/+help/Submitting%20a%20project">Help submitting a project</a>
 
82
            </p>
87
83
          </py:otherwise>
88
84
        </py:choose>
89
85
 
94
90
        </a>
95
91
      </div>
96
92
 
97
 
      <div py:if="'edit' in permissions or context.worksheets.count() > 0"
 
93
      <div py:if="'edit_worksheets' in permissions or len(worksheets) > 0"
98
94
           class="majorsection">
99
95
        <h2>Worksheets</h2>
100
 
        <py:choose test="context.worksheets.count()">
 
96
        <py:choose test="len(worksheets)">
101
97
          <p py:when="0">
102
98
            There are no worksheets for this offering.
103
99
            <a class="addaction" href="${req.publisher.generate(context, None, ('+worksheets', '+new'))}">Create one now</a>
108
104
                <li>
109
105
                  <!-- Can't generate a URL directly to the worksheet, since this is a fake worksheet. -->
110
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>
111
108
                  <py:if test="worksheet.assessable">
112
109
                    <ul>
113
110
                      <li class="${worksheet.complete_class}">
124
121
                  Total exercises completed: ${exercises_done}/${exercises_total} (${exercises_pct}%)
125
122
                </li>
126
123
              </ul> 
127
 
              <p>
 
124
              <p py:if="context.show_worksheet_marks">
128
125
                <span style="font-weight: bold;">Mark:</span> ${worksheet_mark}/${worksheet_max_mark}
129
126
              </p>
130
127
            </py:if>
131
 
            <a py:if="'edit' in permissions"
132
 
               class="manageaction"
133
 
               href="${req.publisher.generate(context, None, ('+worksheets', '+edit'))}">
134
 
              Manage worksheets
135
 
            </a><br />
136
 
            <a py:if="'edit' in permissions"
137
 
               class="manageaction"
138
 
               href="/+exercises">
139
 
              Manage exercises
140
 
            </a>
 
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
            <div class="horizontalactions" py:if="'edit_worksheets' in permissions">
 
138
              <a class="manageaction" href="${req.publisher.generate(context, None, ('+worksheets', '+edit'))}"> Manage worksheets</a>
 
139
              <a class="manageaction" href="/+exercises">Manage exercises</a>
 
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>
141
144
          </div>
142
145
        </py:choose>
143
146
      </div>