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

« back to all changes in this revision

Viewing changes to www/apps/tutorial/toplevel.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:
1
 
<html xmlns="http://www.w3.org/1999/xhtml"
2
 
      xmlns:xi="http://www.w3.org/2001/XInclude"
3
 
      xmlns:py="http://genshi.edgewall.org/" py:strip="">
4
 
  <head foo="bar" py:strip="">
5
 
    <title>Tutorial - Top Level</title>
6
 
  </head>
7
 
  <body class="innerbody" py:strip="">
8
 
    <div id="ivle_padding">
9
 
      <h1>IVLE Tutorials</h1>
10
 
      <p>
11
 
        Welcome to the IVLE tutorial system.
12
 
  Please select a subject from the list below to select a worksheet
13
 
  for that subject.
14
 
      </p>
15
 
      <h2>Subjects</h2>
16
 
      <ul>
17
 
        <py:for each="subject in enrolled_subjects">
18
 
          <li>
19
 
            <a href="${subject.code}">${subject.name}</a>
20
 
          </li>
21
 
        </py:for>
22
 
      </ul>
23
 
      <py:if test="len(unenrolled_subjects) > 0">
24
 
        <h3>Other Subjects</h3>
25
 
        <p>
26
 
          You are not currently enrolled in these subjects.
27
 
           Your marks will not be counted.
28
 
        </p>
29
 
        <ul>
30
 
          <py:for each="subject in unenrolled_subjects">
31
 
            <li>
32
 
              <a href="${subject.code}">${subject.name}</a>
33
 
            </li>
34
 
          </py:for>
35
 
        </ul>
36
 
      </py:if>
37
 
    </div>
38
 
  </body>
39
 
</html>