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

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/templates/worksheet.html

  • Committer: Matt Giuca
  • Date: 2010-02-24 13:13:21 UTC
  • mfrom: (1689.1.19 worksheet-marks)
  • Revision ID: matt.giuca@gmail.com-20100224131321-eno7xbrqsyukz869
Added worksheet marks reporting UI for lecturers. This includes the ability to view worksheet marks table in the web application and download as a CSV, as well as some basic statistics on exercise completion. Removed the ivle-marks script, as now lecturers can get the same data themselves. Fixes Launchpad bug #520179.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
      <p py:if="not worksheet.published"><strong>Note:</strong> This worksheet is not yet published &mdash; it is not visible to students.</p>
22
22
      <div id="tutorial-toc">
23
23
        <h2>Contents</h2>
 
24
        <py:if test="show_exercise_stats">
 
25
        <table class="pretty_table">
 
26
          <tr><th></th><th>Exercise</th><th># completed</th>
 
27
              <th># attempted</th><th>% complete</th>
 
28
          </tr>
 
29
          <py:for each="exercise in exercises">
 
30
            <tr class="${exercise['complete']}" id="toc_li_${exercise['exid']}">
 
31
              <td><img
 
32
              src="/+media/ivle.webapp.tutorial/images/tiny/${'complete' if exercise['complete'] == 'complete' else 'incomplete'}.png" /></td>
 
33
              <td><a href="#${exercise['exid']}">${exercise.name}</a></td>
 
34
              <td py:content="exercise.stats[0]" />
 
35
              <td py:content="exercise.stats[1]" />
 
36
              <td py:if="exercise.stats[1] > 0">${int((100.0 * exercise.stats[0]) / exercise.stats[1])}%</td>
 
37
              <td py:if="exercise.stats[1] == 0">N/A</td>
 
38
            </tr>
 
39
          </py:for>
 
40
        </table>
 
41
        <p>Note: The above statistics show the completion and attempt rate on
 
42
        each exercise, for all students enrolled in the subject.</p>
 
43
        </py:if>
 
44
        <py:if test="not show_exercise_stats">
24
45
        <ul>
25
46
          <py:for each="exercise in exercises">
26
47
            <li class="${exercise['complete']}" id="toc_li_${exercise['exid']}">
30
51
            </li>
31
52
          </py:for>
32
53
        </ul>
 
54
        </py:if>
33
55
      </div>
34
56
      ${worksheetstream}
35
57
    </div>