~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: 2009-02-25 23:04:11 UTC
  • Revision ID: grantw@unimelb.edu.au-20090225230411-lbdyl32ir0m3d59b
Make all of the services executable.

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="'enrol' in permissions"
11
 
           class="groupaction"
12
 
           href="${req.publisher.generate(context, None, ('+enrolments', '+new'))}">
13
 
          Enrol users
14
 
        </a>
15
 
      </div>
16
 
 
17
 
      <div py:if="context.description" style="margin-bottom: 1em;">
18
 
        <div style="margin-bottom: 0.5em;">${context.description}</div>
19
 
        <a py:if="context.url" class="webaction" href="${context.url}">Home page</a>
20
 
      </div>
21
 
 
22
 
      <div py:if="'edit' in permissions or context.projects.count() > 0"
23
 
           class="majorsection">
24
 
        <h2>Projects</h2>
25
 
        <py:choose test="context.projects.count()">
26
 
          <p py:when="0">
27
 
            There are no projects for this offering.
28
 
          </p>
29
 
          <py:otherwise>
30
 
            <ul class="paddedlist">
31
 
              <li py:for="project in context.projects"
32
 
                  py:attrs="{'class': 'project closed'}
33
 
                            if project.has_deadline_passed(req.user)
34
 
                            else {'class': 'project'}"
35
 
                  py:with="principal = project.project_set.get_submission_principal(req.user)">
36
 
                <a href="${project.url}">${project.name}</a> &ndash;
37
 
                <span py:content="format_submission_principal(req.user, principal)" /> &ndash;
38
 
                <span title="${format_datetime(project.deadline)}">
39
 
                  ${'closed' if project.has_deadline_passed(req.user) else 'due'} ${format_datetime_short(project.deadline)}
40
 
                </span>
41
 
                <py:if test="principal is not None"
42
 
                       py:with="submissions = project.get_submissions_for_principal(principal)">
43
 
                  &ndash;
44
 
                  <py:choose test="submissions.count()">
45
 
                    <span py:when="0">
46
 
                      not yet submitted
47
 
                    </span>
48
 
                    <span py:otherwise=""
49
 
                          py:with="latest = submissions.last()"
50
 
                          title="${format_datetime(latest.date_submitted)}">
51
 
                      last submitted ${format_datetime_short(latest.date_submitted)}
52
 
                    </span>
53
 
                  </py:choose>
54
 
                </py:if>
55
 
                <br />
56
 
                ${project.synopsis}
57
 
              </li>
58
 
            </ul>
59
 
            <py:if test="context.get_open_projects_for_user(req.user).count() > 0">
60
 
              <p>
61
 
                To submit to a project that has not yet closed, use the file
62
 
                browser to navigate to the file or directory that you wish to
63
 
                submit, click &ldquo;More actions...&rdquo;,
64
 
                &ldquo;Submit&rdquo;, and then select the correct project.
65
 
              </p>
66
 
              <p>
67
 
                If the project to which you intend to submit is not listed,
68
 
                ensure that you are in the correct directory, or a subdirectory
69
 
                thereof. For solo projects, you must be inside the subject's
70
 
                &ldquo;mywork&rdquo; directory. For group projects, you must be
71
 
                inside the directory for the assigned group.
72
 
              </p>
73
 
              <p>
74
 
                You may resubmit a project as you wish until the deadline, but
75
 
                a new submission will overwrite any made earlier.
76
 
              </p>
77
 
            </py:if>
78
 
          </py:otherwise>
79
 
        </py:choose>
80
 
 
81
 
        <a py:if="'edit' in permissions"
82
 
           class="manageaction"
83
 
           href="${req.publisher.generate(context, None, '+projects')}">
84
 
          Manage projects
85
 
        </a>
86
 
      </div>
87
 
 
88
 
      <div py:if="'edit' in permissions or context.worksheets.count() > 0"
89
 
           class="majorsection">
90
 
        <h2>Worksheets</h2>
91
 
        <py:choose test="context.worksheets.count()">
92
 
          <p py:when="0">
93
 
            There are no worksheets for this offering.
94
 
            <a class="addaction" href="${req.publisher.generate(context, None, ('+worksheets', '+new'))}">Create one now</a>
95
 
          </p>
96
 
          <div py:otherwise="">
97
 
            <ul id="tutorial-toc">
98
 
              <py:for each="worksheet in worksheets">
99
 
                <li>
100
 
                  <!-- Can't generate a URL directly to the worksheet, since this is a fake worksheet. -->
101
 
                  <a href="${req.publisher.generate(context)}/+worksheets/${worksheet.name}">${worksheet.name}</a>
102
 
                  <py:if test="worksheet.assessable">
103
 
                    <ul>
104
 
                      <li class="${worksheet.complete_class}">
105
 
                        Completed ${worksheet.mand_done}/${worksheet.total}${worksheet.optional_message}
106
 
                      </li>
107
 
                    </ul>
108
 
                  </py:if>
109
 
                </li>
110
 
              </py:for>
111
 
            </ul>
112
 
            <py:if test="exercises_total > 0">
113
 
              <ul>
114
 
                <li class="${worksheets_complete_class}">
115
 
                  Total exercises completed: ${exercises_done}/${exercises_total} (${exercises_pct}%)
116
 
                </li>
117
 
              </ul> 
118
 
              <p>
119
 
                <span style="font-weight: bold;">Mark:</span> ${worksheet_mark}/${worksheet_max_mark}
120
 
              </p>
121
 
            </py:if>
122
 
            <a py:if="'edit' in permissions"
123
 
               class="manageaction"
124
 
               href="${req.publisher.generate(context, None, ('+worksheets', '+edit'))}">
125
 
              Manage worksheets
126
 
            </a>
127
 
          </div>
128
 
        </py:choose>
129
 
      </div>
130
 
    </div>
131
 
  </body>
132
 
</html>
133
 
    
134