~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-11 05:09:56 UTC
  • Revision ID: grantw@unimelb.edu.au-20100211050956-t5i2z6b8iulxteza
Unbreak existing tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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">
 
10
        <a py:if="'edit' in permissions"
 
11
           class="editaction"
 
12
           href="${req.publisher.generate(context, OfferingEdit)}">
 
13
           Change details
 
14
        </a>
 
15
        <a py:if="'enrol' in permissions"
 
16
           class="groupaction"
 
17
           href="${req.publisher.generate(context, None, ('+enrolments', '+new'))}">
 
18
          Enrol users
 
19
        </a>
 
20
      </div>
 
21
 
 
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
 
 
27
      <div py:if="'edit' in permissions or context.projects.count() > 0"
 
28
           class="majorsection">
 
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>
 
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
                <py:choose test="project.url not in (None, '')">
 
42
                  <a py:when="True" href="${project.url}">${project.name}</a>
 
43
                  <span py:otherwise="">${project.name}</span> 
 
44
                </py:choose>
 
45
                &ndash;
 
46
                <span py:content="format_submission_principal(req.user, principal)" /> &ndash;
 
47
                <span title="${format_datetime(project.deadline)}">
 
48
                  ${'closed' if project.has_deadline_passed(req.user) else 'due'} ${format_datetime_short(project.deadline)}
 
49
                </span>
 
50
                <py:if test="principal is not None"
 
51
                       py:with="submissions = project.get_submissions_for_principal(principal)">
 
52
                  &ndash;
 
53
                  <py:choose test="submissions.count()">
 
54
                    <span py:when="0">
 
55
                      not yet submitted
 
56
                    </span>
 
57
                    <span py:otherwise=""
 
58
                          py:with="latest = submissions.last()"
 
59
                          title="${format_datetime(latest.date_submitted)}">
 
60
                      last submitted ${format_datetime_short(latest.date_submitted)}
 
61
                    </span>
 
62
                  </py:choose>
 
63
                </py:if>
 
64
                <br />
 
65
                ${project.synopsis}
 
66
              </li>
 
67
            </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>
 
87
          </py:otherwise>
 
88
        </py:choose>
 
89
 
 
90
        <a py:if="'edit' in permissions"
 
91
           class="manageaction"
 
92
           href="${req.publisher.generate(context, None, '+projects')}">
 
93
          Manage projects
 
94
        </a>
 
95
      </div>
 
96
 
 
97
      <div py:if="'edit' in permissions or context.worksheets.count() > 0"
 
98
           class="majorsection">
 
99
        <h2>Worksheets</h2>
 
100
        <py:choose test="context.worksheets.count()">
 
101
          <p py:when="0">
 
102
            There are no worksheets for this offering.
 
103
            <a class="addaction" href="${req.publisher.generate(context, None, ('+worksheets', '+new'))}">Create one now</a>
 
104
          </p>
 
105
          <div py:otherwise="">
 
106
            <ul id="tutorial-toc">
 
107
              <py:for each="worksheet in worksheets">
 
108
                <li>
 
109
                  <!-- Can't generate a URL directly to the worksheet, since this is a fake worksheet. -->
 
110
                  <a href="${req.publisher.generate(context)}/+worksheets/${worksheet.id}">${worksheet.name}</a>
 
111
                  <py:if test="worksheet.assessable">
 
112
                    <ul>
 
113
                      <li class="${worksheet.complete_class}">
 
114
                        Completed ${worksheet.mand_done}/${worksheet.total}${worksheet.optional_message}
 
115
                      </li>
 
116
                    </ul>
 
117
                  </py:if>
 
118
                </li>
 
119
              </py:for>
 
120
            </ul>
 
121
            <py:if test="exercises_total > 0">
 
122
              <ul>
 
123
                <li class="${worksheets_complete_class}">
 
124
                  Total exercises completed: ${exercises_done}/${exercises_total} (${exercises_pct}%)
 
125
                </li>
 
126
              </ul> 
 
127
              <p>
 
128
                <span style="font-weight: bold;">Mark:</span> ${worksheet_mark}/${worksheet_max_mark}
 
129
              </p>
 
130
            </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>
 
141
          </div>
 
142
        </py:choose>
 
143
      </div>
 
144
    </div>
 
145
  </body>
 
146
</html>
 
147
    
 
148