Assignments are optional and have no effect on your final mark.
Still, it is strongly recommended that you submit some of them during the
course.
To submit your answers, please edit the assignment files and fill the
answer section(s) without modifying anything else. You will need to install
LyX, which greatly helps in typesetting
formulae and is available on all major platforms
(including Linux, Windows, and Mac).
I will correct your answers by editing those files again, and adding my
remarks. Please be patient: checking assignments is a low-priority task
of mine.
Submitted answers must be anonymous.
Do not write your name, matriculation number, or anything that can
reveal who you are in the answer file you submit. Provide instead
your matriculation number in the form below, only.
If you are submitting a solution for a group of students, just use
the matriculation for any memeber of the group. Do not replicate the
submission for all members.
Submitted anonymous answers are made public.
I encourage all students to browse them, but only after having submitted
their own answer (or giving up).
Copying somebody else's answer is completely pointless (remind: no
effect on your final mark), so please refrain from it -- submit genuine
answers, only.
I may discuss the most significant errors I found in the
anonymous submissions in class.
Error: " .
$msg . "\n";
}
$t = microtime(true);
$maxSize = 1000000; # 1 MB
$basename = "assignment_" .
normalizeAssignment($assignment) . "__" .
$t . ".lyx" ;
$filename = "/home/zunino/stuff/uploads/" . $basename;
$logfile = "/home/zunino/stuff/uploads/log_" . $matriculation . ".txt" ;
if (! isset($_POST["dummy"])) {
# Hack: not a post, don't complain about missing stuff
} else if (! checkMatriculation($matriculation)) {
uploadError("matriculation number should be 5 or 6 digits");
} else if (! checkAssignment($assignment)) {
uploadError("wrong assignment number");
} else if (! $_FILES["userfile"]["tmp_name"]) {
uploadError("no file specified");
} else if (! checkLyX($_FILES["userfile"]["name"])) {
uploadError("uploaded file must be a LyX file");
} else if ($_FILES["userfile"]["size"] > $maxSize) {
uploadError("uploaded file is too large (max " . $maxSize . " bytes)");
} else if (1) { # disable submissions
uploadError("submissions disabled for year 2012");
} else {
# echo "File uploaded: " . $_FILES["userfile"]["tmp_name"] . " - \n";
# echo "File name: " . $_FILES["userfile"]["name"] . " - \n";
# echo "File size: " . $_FILES["userfile"]["size"] . " - \n";
# echo "Logfile: " . $logfile . " \n";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $filename)) {
# if (true) {
echo "
\n";
echo "
" .
"Your file was successfully uploaded.
\n";
echo "
You should now bookmark this link " .
"to access your submission. If you do not do so, it will be " .
"hard to locate your submission among all the others in the " .
"future.