~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/submit/submit.html

  • Committer: William Grant
  • Date: 2009-04-28 04:50:39 UTC
  • Revision ID: grantw@unimelb.edu.au-20090428045039-ibb7gwtjrhe9osq3
Populate req.config in a cleaner manner.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
    <div id="ivle_padding">
9
9
      <py:choose test="offering">
10
10
        <div py:when="None">
11
 
          <p>Error: IVLE could not find a valid offering to submit to, from <span style="font-family: monospace">${path}</span> in
 
11
          <p>You may not submit files from <span style="font-family: monospace">${path}</span> in
12
12
            <py:choose test="">
13
13
              <span py:when="principal is req.user">your repository.</span>
14
14
              <span py:otherwise="">the repository for ${principal.display_name}.</span>
15
15
            </py:choose>
16
 
            This may have one of the following causes:
 
16
            You can only submit files from a subject directory.
17
17
          </p>
18
 
          <ul>
19
 
            <li>You are not in a subject directory. You can only submit files from a subject directory. For example, you cannot submit a file from your "<code>stuff</code>" directory.</li>
20
 
            <li>You are not enrolled in the subject of that name. You can only submit files to a subject you are enrolled in.</li>
21
 
            <li>You are enrolled in a past (or even future) offering of the subject. You can only submit files to a current offering of a subject.</li>
22
 
          </ul>
23
18
        </div>
24
19
        <div py:otherwise="">
25
20
          <p>You are submitting <span style="font-family: monospace">${path}</span> from
32
27
          <form action="" method="post">
33
28
            <table>
34
29
              <tr py:for="project in principal.get_projects(offering=offering)"
35
 
                  py:attrs="{'class': 'project closed'} if project.has_deadline_passed(req.user) else {'class': 'project'}">
 
30
                  py:with="attrs = {'disabled': 'disabled'} if project.deadline &lt; now else {}">
36
31
                <td style="vertical-align: top">
37
 
                  <input type="radio" name="project" id="project_${project.id}" value="${project.id}" />
 
32
                  <input type="radio" name="project" id="project_${project.id}" value="${project.id}" py:attrs="attrs" />
38
33
                </td>
39
34
                <td>
40
 
                  <label for="project_${project.id}">
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="${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="${format_datetime(latest.date_submitted)}">
61
 
                          last submitted ${format_datetime_short(latest.date_submitted)}
62
 
                        </span>
63
 
                      </py:choose>
64
 
                    </py:if>
65
 
                    <br />
66
 
                    ${project.synopsis}
67
 
                    <py:if test="project.has_deadline_passed(req.user)"><br />
68
 
                      <em>Note: The deadline has passed. You may still submit late, but a penalty may be incurred.</em>
69
 
                    </py:if>
70
 
                  </label>
 
35
                  <label for="project_${project.id}"><a href="${project.url}">${project.name}</a> (<span title="Due ${format_datetime(project.deadline)}">due ${format_datetime_short(project.deadline)}</span>)<br />${project.synopsis}</label>
71
36
                </td>
72
37
              </tr>
73
38
            </table>
74
39
            <p>Ensure that you have committed all changes - only changes in the repository will be submitted.</p>
75
 
            <p>You may resubmit a project again at any time, but a new submission will overwrite any made earlier, and submissions after the deadline may incur a penalty.</p>
76
 
            <p><input type="submit" value="Submit Project" />
77
 
              <a class="helpaction" href="/+help/Submitting%20a%20project">Help submitting a project</a>
78
 
            </p>
 
40
            <p>You may resubmit a project again at any time until its deadline.</p>
 
41
            <p><input type="submit" value="Submit Project" /></p>
79
42
          </form>
80
43
        </div>
81
44
      </py:choose>