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

« back to all changes in this revision

Viewing changes to exercises/sample/hello.xml

  • Committer: dcoles
  • Date: 2008-07-18 02:40:58 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:912
Makeuser: Makeuser will now chown all files in a users home directory to the
unixid provided by the database. This means remakeallusers.py can be used to
update everyones unixids after a database change. The makeuser script will also 
no longer generate a random unixid when one is not given on the command line.

Database: Change to database so that a sequence is used by default. The allowed  
range is 1000-29999 (let's start at 5000, because 1000+ is used by adduser.  
Reference: http://www.debian.org/doc/debian-policy/ch-opersys.html)
See SF Bug '[ 2012190 ] Student UID generation'
Migration script will reallocate all users a new unixid from the sequence.

Usermgt-Server: Now no longer generates a random unixid. Rely on the database 
to come up with a new sequence number.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<exercise name = "Hello Name">
 
2
    <desc>You need to write <b>Hello</b> and then your name.</desc>
 
3
    <partial>
 
4
<![CDATA[
 
5
print "Hello &lt;print the contents of the variable 'name' here&gt;."
 
6
]]>
 
7
    </partial>
 
8
    <solution>
 
9
<![CDATA[
 
10
# Sample solution, used to generate test output
 
11
greeting = "Hello"
 
12
print " ".join([greeting, name])
 
13
]]>
 
14
    </solution>
 
15
    <!-- Alternatively, <solution src="all_input_test_soln.py" /> -->
 
16
    <case name="&quot;Hello Alice&quot;">
 
17
        <!-- Specify input -->
 
18
        <var name="name" value="'Alice'" />
 
19
        <function pass="All letters are correct, ignoring case" fail="Output contains incorrect characters" default="ignore">
 
20
            <stdout>str.lower</stdout>
 
21
        </function>
 
22
        <function pass="Program contains a print statement" fail="You need to use a print statement" default="ignore">
 
23
            <code type="check">lambda x,y: 'print' in y</code>
 
24
        </function>
 
25
        <!-- Ensures that all outputs match exactly --> 
 
26
        <function pass="Exact match" fail="Incorrect characters still" default="match"/>
 
27
    </case>
 
28
</exercise>
 
29