~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: 2009-12-01 04:27:58 UTC
  • mfrom: (1164.2.46 sphinx-docs)
  • Revision ID: matt.giuca@gmail.com-20091201042758-wuxd9bdec00c283i
Merged sphinx-docs branch. This adds Sphinx documentation for the entire IVLE system (for system administrators and developers), and removes all of our random old document files (all either irrelevant, or moved into the Sphinx docs nicely). Currently incomplete, but ready to merge.

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