106
106
one worksheet, Worksheet Basics. Clicking this takes you to the worksheet,
107
107
where students are challenged by Python questions.
109
After reading the worksheet, attempt the first simple programming question,
110
which is to write the Hello world program.
112
First, click Submit without writing any code, and note that the system
113
automatically runs a test case, which fails. Now change the code to be "almost
114
right" (for example, write "Hello world" instead of "Hello, world!"), and
115
press Submit again. It will tell you that you almost got it right. In this
116
way, the IVLE test framework can show users that they're on the right track.
117
If you get it exactly right and click Submit a third time, you will pass the
120
Note that you can also click "Run", and it will execute your solution in the
121
Python console. This doesn't cost you an "attempt", nor does it run the test
122
cases. It just lets you test it out for yourself before making an official
125
Back on the subject page, you will notice that the exercise appears complete,
126
and you have been awarded a mark.
128
A sample solution to the second exercise follows::
109
After reading the worksheet, attempt the simple programming question, which is
110
to write a factorial program.
112
A sample solution follows::
137
121
f = int(raw_input())
124
First, click Submit, and note that the system automatically runs some test
125
cases, all of which fail. Now paste the solution to :func:`fac` (but not
126
:func:`main`). Clicking Submit again shows some test cases pass, but not all.
127
Finally, paste the solution to :func:`main`, and click Submit again. This
128
time, you will pass the test.
130
Note that you can also click "Run", and it will execute your solution in the
131
Python console. This doesn't cost you an "attempt", nor does it run the test
132
cases. It just lets you test it out for yourself before making an official
135
Back on the subject page, you will notice that the exercise appears complete,
136
and you have been awarded some marks.
140
138
A lecturer's view
141
139
=================
183
181
to start using a new repository.
185
183
Usually, the hassle of getting into new groups and creating new repositories
186
means that you will want to create just two project sets for a subject: one
187
for solo projects, and another for group projects.
192
Lecturers and tutors can view any student or group's project submission, using
193
an external Subversion client. As submissions are really just Subversion
194
commits, you can examine a student's work by simply checking out the correct
195
revision of the repository.
197
From the offering page, click "View submissions" under the project of interest.
198
This takes you to a page which lists the latest submissions from every student
199
(presumably you will just see the submission made by "studenta" earlier in
200
this tour). Next to each submission is a command line, beginning with
201
``svn co``. For instance, you might see the line::
203
svn co --username lecturer -r7 http://svn.ivle.localhost/users/studenta/ivle-102/phase1.html
205
Paste this line into a command-line (or, if you use a GUI Subversion client,
206
use the username, revision and URL given). Subversion will likely prompt for a
207
password. For the sample data, this password is "password", but in general, it
208
will **not** be your normal IVLE password. You can learn your Subversion
209
password by opening a Console in IVLE and typing::
212
ivle.config.Config()['user_info']['svn_pass']
214
This will check out the student's work into the current directory, to inspect.
216
You can also try to check out the group submission from Phase 2.
219
It is currently not possible to check out a single file (not a directory)
220
submission using the instructions given. Instead, run ``svn cat``, and
221
redirect the output into a file.
184
means that you will want to create a single project set for a subject, and
185
just partition the projects into solo and group projects.
223
187
Managing worksheets and exercises
224
188
---------------------------------