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

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/templates/project.html

  • Committer: David Coles
  • Date: 2010-08-30 03:26:13 UTC
  • Revision ID: coles.david@gmail.com-20100830032613-d14vng0jkelniu3l
python-console: Fix globals broken with new JSON library.

simplejson always returns unicode strings. cJSON would return ordinary strings 
if possible. cPickle.loads() only accepts strings. At present we use pickle 
version 0 so they should all works as ASCII strings. Higher versions of pickle 
are not plain ASCII and are likely to break this and so this should be fixed 
at some point.

Also replaced unconditional exception with one that catches Pickle errors. Not 
sure the best way to report failures of these functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
  <body>
7
7
    <h1>${project.name} for ${project.project_set.offering.subject.name}</h1>
8
8
    <div id="ivle_padding">
 
9
      <div class="contextactions">
 
10
        <a py:if="'edit' in permissions"
 
11
           class="editaction"
 
12
           href="${req.publisher.generate(project, ProjectEdit)}">
 
13
           Change details
 
14
        </a>
 
15
        <a py:if="'edit' in permissions"
 
16
           class="deleteaction"
 
17
           href="${req.publisher.generate(project, ProjectDelete)}">
 
18
           Delete project
 
19
        </a>
 
20
      </div>
 
21
      <a py:if="project.url not in (None, '')" href="${project.url}">${project.url}</a>
 
22
      <p>Deadline: ${format_datetime(project.deadline)}</p>
9
23
      <p>${project.synopsis}</p>
10
24
      <p>Submissions: ${project.latest_submissions.count()}/${project.project_set.assigned.count()}</p>
11
25
 
12
26
      <h2>Latest submissions</h2>
13
 
      <table id="project_submissions" class="project_list" summary="Latest Submissions"
 
27
      <p>Check these out with your IVLE username and Subversion password, as
 
28
      documented under <a class="helpaction"
 
29
      href="/+help/Files/Subversion#external">External Subversion
 
30
      access</a>.<br />
 
31
      <a class="marksaction"
 
32
           href="${req.publisher.generate(project, ProjectExport)}">
 
33
           Bash script for exporting submitted projects
 
34
        </a>
 
35
      </p>
 
36
      <p class="late_submission">* Late submissions (number of days late)</p>
 
37
      <div py:if="project.latest_submissions.count() == 0">
 
38
        There are no submissions.
 
39
      </div>
 
40
      <table id="project_submissions" class="pretty_table" summary="Latest Submissions"
14
41
             py:if="project.latest_submissions.count() > 0">
15
42
        <thead>
16
43
          <tr>
22
49
        </thead>
23
50
        <tbody>
24
51
        <py:for each="submission in project.latest_submissions">
25
 
          <tr>
 
52
          <tr py:attrs="{'class': 'late_submission'} if submission.late else {}">
26
53
          <py:choose test="submission.assessed.principal is submission.submitter">
27
54
            <td py:when="True">-</td>
28
55
            <td py:otherwise=""><span title="${submission.assessed.principal.display_name}">${submission.assessed.principal.short_name}</span></td>
29
56
          </py:choose>
30
57
            <td><span title="${submission.submitter.display_name}">${submission.submitter.short_name}</span></td>
31
 
            <td>${submission.date_submitted.strftime("%Y-%m-%d %H:%M:%S")}</td>
32
 
            <td>svn co --username ${user.login} -r${submission.revision} ${build_subversion_url(svn_addr, submission)}</td>
 
58
            <td>${submission.date_submitted.strftime("%Y-%m-%d %H:%M:%S")}<py:if test="submission.late">* (${submission.days_late})</py:if></td>
 
59
            <td>${submission.get_svn_export_command(req)}</td>
33
60
          </tr>
34
61
        </py:for>
35
62
        </tbody>
36
63
      </table>
37
64
 
38
 
      <h2>Assigned submitters</h2>
39
 
      <table id="project_assigneds" class="project_list">
40
 
        <thead><tr><th>Assigned</th></tr></thead>
 
65
      <h2>Expected submitters</h2>
 
66
      <div py:if="project.project_set.assigned.count() == 0"
 
67
           py:choose="project.project_set.is_group">
 
68
        <py:when test="True">There are no groups assigned to submit this project. Do you want to <a href="${req.publisher.generate(project.project_set, GroupsView)}">create some</a>?</py:when>
 
69
        <py:otherwise>There are no students assigned to submit this project. Do you want to <a href="${req.publisher.generate(project.project_set.offering, EnrolView)}">enrol some</a>?</py:otherwise>
 
70
      </div>
 
71
      <table id="project_assigneds" class="pretty_table"
 
72
             py:if="project.project_set.assigned.count() > 0">
 
73
        <thead><tr><th>Name</th></tr></thead>
41
74
        <tbody>
42
75
        <py:for each="assignee in project.project_set.assigned">
43
76
          <tr>