Time yyyy-mm-dd hh:mm |
Action performed | Revision | Folders/Files in repository |
---|---|---|---|
2012-01-13 13:30 | Student logs onto MarkUs for first time | 0 | None. |
2012-01-13 14:00 | Student clicks on "Assignment 00" link from MarkUs homepage | 1 | a00/ folder |
2012-01-14 07:00 | Student submits a file called a00q1.rkt |
2 | a00/a00q1.rkt |
2012-01-14 07:30 | Student submits a00q2.rkt= |
3 | a00/a00q1.rkt, =a00/a00q2.rkt |
2012-01-14:10:00 | Student replaces a00q1.rkt with a newer version |
4 | a00/a00q1.rkt (Modified), a00/a00q2.rkt |
2012-01-15 14:30 | Student submits a00q3.rkt== |
5 | a00/a00q1.rkt (Modified), =a00/a00q2.rkt, =a00/a00q3.rkt |
2012-01-15 16:00 | Student replaces a00q2.rkt with a newer version |
6 | a00/a00q1.rkt (Modified), a00/a00q2.rkt (Modified), a00/a00q3.rkt |
a00q1.rkt
at revision 2 and 4. The latest revision is called the head revision. In the example above, the head revision is revision 6. MarkUs only shows students the head revision. So, students cannot go to a previous revision to retrieve an old file.
You can access a repository and its contents with a URL. Here are some examples of URLs:
file:///u/markus/markus_cs115_f/svn-repos-root/group_0168
file:///u/markus/markus_cs115_f/svn-repos-root/group_0168/a00
file:///u/markus/markus_cs115_f/svn-repos-root/group_0168/a00/a00q1.rkt
group_0168
. This student gets one repository for the whole term, and each assignment is a folder under that repository. Here are two ways to determine the group ID, given a student's Quest ID.
svn
command from the course account. svn
takes some arguments, which are similar to the normal linux commands.
Here are some examples. By default, the svn
command will use the head revision.
svn ls URL ubuntu1204-002:~> svn ls file:///u/markus/markus_cs115_f/svn-repos-root/group_0168/a00 a00q1.rkt a00q2.rkt a00q3.rktsvn cat URL
ubuntu1204-002:~> svn cat file:///u/markus/markus_cs115_f/svn-repos-root/group_0168/a00/a00q1.rkt This is my a00q1.rkt file It's very cool. I submitted this file at 2012-01-14:10:00.There are other commands you can try (run
svn help
to see them all). From the course account, you can only run read-only commands. So svn commit
will not work.
svn checkout -r RorD URL PATH
where
RorD
is either a number or a date. If you put a number R, you will checkout revision R. If you enter a date D, you will checkout the last revision before D. The argument -r RorD
is optional. If you omit it, then svn
will use the head revision.
URL
is a repository URL
PATH
is where you want to save the copy.
svn checkout -r 4 file:///u/markus/markus_cs115_f/svn-repos-root/group_0168/a00 my_copy
a00q1.rkt
and a00q2.rkt
. The folder won't contain a00q3.rkt
.
svn checkout -r "{2012-01-15 09:00}" file:///u/markus/markus_cs115_f/svn-repos-root/group_0168/a00 my_copy
svn checkout file:///u/markus/markus_cs115_f/svn-repos-root/group_0168/a00 my_copy
a00q1.rkt
, a00q2.rkt
, and a00q3.rkt
.
R
. You can get R
from the Submissions tab in MarkUs. You can also get it from the groups CSV file downloadable from the Groups tab. R
is the second column in the CSV file you download.
You also need the assignment name A
. You can look it up in the assignment's Properties page. It is the "Repository Folder/" field.
/u/markus/svn_add_file_stdin R/A filename.txtCreates a file called
filename.txt
in repository R
, under assignment A
. The contents of filename.txt will be read from standard input.
In the following example, I am in the cs115 course account. I am adding a file called filetoadd.txt
to the repository group_0149, under assignment a00. The contents of the file will be "hello world." You can run this command from any folder.
cs115@ubuntu1404-012:~$ echo "hello world" | /u/markus/svn_add_file_stdin group_0149/a00 filetoadd.txt Hello cs115! I am markus. Adding file with name filetoadd.txt to repository group_0149/a00. Making temporary directory... Created /tmp/markus_cs115_adding_file_rhzj55nc Enter file contents for filetoadd.txt: Read 1 lines of input Checking out file:///u/markus/markus_cs115_s/svn-repos-root/group_0149/a00 to /tmp/markus_cs115_adding_file_rhzj55nc Writing to file filetoadd.txt Calling svn add filetoadd.txt A filetoadd.txt Calling svn commit filetoadd.txt Deleting temporary directory /tmp/markus_cs115_adding_file_rhzj55nc End of script. (exit code = 0) cs115@ubuntu1404-012:~$If you are adding a file that already exists in the student's repository, you will see warnings like these, which you can ignore. The file will still be updated (ie overwritten).
svn: warning: W150002: '/tmp/markus_cs115_adding_file_378uzr6h/filetoadd.txt' is already under version control svn: E200009: Could not add all targets because some targets are already versioned svn: E200009: Illegal target for the requested operation
/u/markus/svn_add_file R A /path/to/filetoadd.txtAdds a file called
filetoadd.txt
to the repository R
, under assignment A
. The contents of the added file will be the same as /path/to/filetoadd.txt. This script is mostly just a wrapper around svn_add_file_stdin
.
In the following example, there is a file called myfile.txt located in the /tmp folder. (The cat command just shows what's in it.) A file with the same name (myfile.txt) is added to the repository group_0149 under assignment a00.
cs115@ubuntu1404-012:~$ cat /tmp/myfile.txt hello there! cs115@ubuntu1404-012:~$ /u/markus/svn_add_file group_0149 a00 /tmp/myfile.txt Repository name: group_0149 Assignment: a00 Given file: /tmp/myfile.txt File's full path: /tmp/myfile.txt Filename: myfile.txt Hello cs115! I am markus. Adding file with name myfile.txt to repository group_0149/a00. Making temporary directory... Created /tmp/markus_cs115_adding_file_tdvgkeuj Enter file contents for myfile.txt: Read 1 lines of input Checking out file:///u/markus/markus_cs115_s/svn-repos-root/group_0149/a00 to /tmp/markus_cs115_adding_file_tdvgkeuj Writing to file myfile.txt Calling svn add myfile.txt A myfile.txt Calling svn commit myfile.txt Deleting temporary directory /tmp/markus_cs115_adding_file_tdvgkeuj End of script. (exit code = 0) cs115@ubuntu1404-012:~$
/u/markus/svn_add_dir R/A /path/to/dir/to/add/Adds the contents of the folder /path/to/dir/to/add/ to repository R under assignment A. You can use this command to add many files at once. To use this command, the course account should have SSH access in to itself. In the example below, I add a directory to the student's account:
cs115@ubuntu1404-012:~$ /u/yc2lee/tree /tmp/dirtoadd/ /tmp/dirtoadd/ |-- dir1 | `-- anotherfile.txt |-- dir2 | `-- mygamefile.txt |-- filea.txt `-- no 2 directories, 4 files cs115@ubuntu1404-012:~$ /u/markus/svn_add_dir group_0149/a00 /tmp/dirtoadd/ Hello cs115! I am markus. Adding directory /tmp/dirtoadd/ to repository group_0149/a00. Making temporary directory... Created /tmp/markus_cs115_adding_file_gddu3w92 Checking out file:///u/markus/markus_cs115_s/svn-repos-root/group_0149/a00 to /tmp/markus_cs115_adding_file_gddu3w92 Copying /tmp/dirtoadd/ to /tmp/markus_cs115_adding_file_gddu3w92 with scp. Running '/usr/bin/svn add --force .' in /tmp/markus_cs115_adding_file_gddu3w92 A dirtoadd A dirtoadd/no A dirtoadd/filea.txt A dirtoadd/dir1 A dirtoadd/dir1/anotherfile.txt A dirtoadd/dir2 A dirtoadd/dir2/mygamefile.txt Running svn commit Deleting temporary directory /tmp/markus_cs115_adding_file_gddu3w92 End of script. (exit code = 0) cs115@ubuntu1404-012:~$If you don't want the directory actually in the student's account, first
cd
to the directory and use . as the path. Example:
cs115@ubuntu1404-012:~$ cd /tmp/dirtoadd/ cs115@ubuntu1404-012:/tmp/dirtoadd$ /u/markus/svn_add_dir group_0149/a00 . Hello cs115! I am markus. Adding directory /tmp/dirtoadd/. to repository group_0149/a00. Making temporary directory... Created /tmp/markus_cs115_adding_file_iesdm7xz Checking out file:///u/markus/markus_cs115_s/svn-repos-root/group_0149/a00 to /tmp/markus_cs115_adding_file_iesdm7xz Copying /tmp/dirtoadd/. to /tmp/markus_cs115_adding_file_iesdm7xz with scp. Running '/usr/bin/svn add --force .' in /tmp/markus_cs115_adding_file_iesdm7xz A no A filea.txt A dir1 A dir1/anotherfile.txt A dir2 A dir2/mygamefile.txt Running svn commit Deleting temporary directory /tmp/markus_cs115_adding_file_iesdm7xz End of script. (exit code = 0) cs115@ubuntu1404-012:/tmp/dirtoadd$
/u/markus/svn_delete_file R/A file_to_delete
Deletes the file file_to_delete
from folder A
in repo R
.
In the example below, I delete a file called test.rkt from student yc2lee-student's a01 folder:
cs115ae@ubuntu1604-008:~$ /u/markus/svn_delete_file yc2lee-student/a01 test.rkt Hello cs115ae! I am markus. I'm going to delete file with name test.rkt from repository yc2lee-student/a01. Making temporary directory... Created /tmp/markus_cs115ae_adding_file_t9a8igvp Checking out file:///u/markus/markus_cs115ae_f/svn_repos/yc2lee-student/a01 to /tmp/markus_cs115ae_adding_file_t9a8igvp Deleting file test.rkt with svn rm D test.rkt Deleting temporary directory /tmp/markus_cs115ae_adding_file_t9a8igvp End of script. (exit code = 0) cs115ae@ubuntu1604-008:~$
/u/markus/svn_delete_all R/A
Deletes the entire A
folder from repo R
.
In the example below, I delete the entire a01 folder from student yc2lee-student's repo.
cs115ae@ubuntu1604-008:~$ /u/markus/svn_delete_all yc2lee-student/a01 Hello cs115ae! I am markus. Preparing to delete yc2lee-student/a01 Making temporary directory... Created /tmp/markus_cs115ae_adding_file_0pi5ujeu Checking out file:///u/markus/markus_cs115ae_f/svn_repos/yc2lee-student/a01 to /tmp/markus_cs115ae_adding_file_0pi5ujeu Deleting... D a D a/testing D juice.txt Running svn commit Deleting temporary directory /tmp/markus_cs115ae_adding_file_0pi5ujeu End of script. (exit code = 0) cs115ae@ubuntu1604-008:~$
https://markus.student.cs.uwaterloo.ca/markus_cs135_f/en/main/results/edit/6111
https://markus.student.cs.uwaterloo.ca/markus_cs135_f/en/main/results/edit/9876
. At this new URL, the marking is all blank.
prezi.exe
) explaining the auto-testing procedure. It was created by Luc Larocque for CS 115 in Fall 2012. As you read the instructions below, follow along in the presentation.
Step 1: Create a folder where the students' code will be checked out to. Also create a symbolic link in /u/cs115/marking/ so that RST can find the test suite:
mkdir /u/cs115/handin/a04_autotest cd /u/cs115/marking ln -s a04 a04_autotestWe will checkout the student's code to a04_autotest. Step 2: Log onto MarkUs with Admin Role and go to the assignment. Then click the "Groups" tab and click "Download" link. Save the CSV file as /u/cs115/marking/a04/a04groups.csv Step 3: Set the variables in
CheckoutAndCommit.py
and MakeGradedAssignment.py
. See MarkUsScripts for detailed info about those scripts.
Example Values: csv_file_location = '/u/cs115/marking/a04/a04groups.csv'
assn = 'a04'
checkout_folder = '/u/cs115/handin/a04_autotest'
due_date = '2011-10-26 21:10'
markus_url = "markus.student.cs.uwaterloo.ca/markus_cs115_f/en/main"
assn_name = '04'
file_list = [ 'a04q1.rkt', 'a04q2.rkt', 'a04q3.rkt', 'a04q4.rkt' ]
assn_folder = 'a04_autotest'
autotest_folder = 'test.1.AUTOTESTRESULTS'
output_filename = 'GRADED_ASSIGNMENT.ss'
python CheckoutAndCommit.py checkout viewcmds python CheckoutAndCommit.py checkout runcmdsCourses that use online Stepper and MarkUs: Manually create repositories for students who complete stepping problems, but have no repository in MarkUs. See CompSci135 Step 5: At this step, you can process the assignments with your own scripts. You may want to:
distrst
(ie in one terminal, you run distrst
, and in another terminal, you run CheckTestcases).
distrst
(the exact command may differ).
distrst -t t -s '*' a04_autotest 1 AUTOTESTRESULTS
The argument -t t
indicates the output should be in plain-text. The -s '*'
indicates that every student should be tested. The a04_autotest
argument is the folder where the students' code is located. The 1
argument tells RST to use the test suite test.1 inside /u/cs115/marking/a04_autotest/. The last argument, AUTOTESTRESULTS
, is a name you can pick for this test run. The name should match the end of autotest_folder
variable above (in MakeGradedAssignment.py)
Step 7: Join the auto-test results and the students' submissions: python MakeGradedAssignment.py
. The script will ask if you want to continue. You can enter 'y' or 'n'.
Step 8: Add and commit GRADED_ASSIGNMENT.ss:
python CheckoutAndCommit.py commit viewcmds python CheckoutAndCommit.py commit runcmdsTake note of the completed time. We'll call this time T. Step 9: We have to tell MarkUs to mark the revision we committed from the previous step. Logon to MarkUs with Admin Role, and go to the assignment's "Properties" page.
/u/markus/bin/autotest_runner_ca.rb
. This script writes log messages to /u/cs115/course/markus/markus_autotest_log
. You can use this log file to find the students who submit late on MarkUs. For example, you can run:
grep assn=A2 /u/cs115/course/markus/markus_autotest_log
In the output, each line corresponds to a submission. At the start of a line is the time of submission. You can use the repo_path or group_id to find the student's Quest ID.
For each student who submitted late, check if you're grading the correct revision. Also make sure you are grading from GRADED_ASSIGNMENT.ss; the individual files may contain code that was submitted late.
Step 11 (Optional): You can automatically assign correctness marks in the MarkUs rubric using MarkUsScripts#set_mark_sub_command and, if you're using RST, MarkUsScripts#set_marks_rst_sub_command.
Step 12 (Last step): Archive the submissions (check your courses's archiving policies first):
mv -i /u/cs115/handin/a04_autotest /u/cs115/archives/1119/handin/a04 rm /u/cs115/marking/a04_autotestThe second command deletes the symbolic link created in Step 1.
/u/cs115/handin/a04_autotest
. The main reason is because MarkUs lets students submit late. If students submit late, the handin folder will get updated. Consider this scenario: /u/cs115/handin/a04/
. His previous submission, if any, will be overwritten.
handin
folder relies SSH working. In some situations (ex. server crashes or gets overloaded), SSH may fail. In this case, the handin
folder won't get updated correctly. If you checkout the student's code explicitly again before running the autotests, you'll know for sure you're marking every student's submission.
/u/markus/bin/post-commit
is run as markus
user. This script will attempt to ssh into the course account. Once in the course account, the script /u/markus/bin/newMarkusSubmission.py
is run. How can we run this script located on markus
account, if we've ssh'ed into course account? Answer: That script has world readable and world executable permissions.
The script newMarkusSubmission.py
does two things:
svn checkout
command. Otherwise, it will run svn update
.
post-commit
and newMarkusSubmission.py
do logging.
post-commit
's log files are located in /u/markus/bin/logs/
. That directory contains logs for every course.
newMarkusSubmission.py
's log is located at /u/csXXX/course/markus/new_submission.log
submit
command tool) and use MarkUs only for hand-marking.
This is the general procedure for adding submissions: