-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscr
69 lines (52 loc) · 2.27 KB
/
scr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
rm -fr tmpdir/exam-0/scans
rm -fr tmpdir/exam-1/scans
rm -fr tmpdir/exam-2/scans
rm -fr tmpdir
mkdir -p tmpdir/exam-0/scans
mkdir -p tmpdir/exam-1/scans
mkdir -p tmpdir/exam-2/scans
chmod -R gao+rwx tmpdir
cp examples/htpasswd tmpdir/.htpasswd
cp examples/htaccess tmpdir/.htaccess
chmod 444 tmpdir/.ht*
sqlite3 tmpdir/exam-0/students.db < schemas.sql
chmod gao+rw tmpdir/exam-0/students.db
sqlite3 tmpdir/exam-1/students.db < schemas.sql
chmod gao+rw tmpdir/exam-1/students.db
sqlite3 tmpdir/exam-2/students.db < schemas.sql
chmod gao+rw tmpdir/exam-2/students.db
sqlite3 tmpdir/graders.db < graders.sql
chmod gao+rw tmpdir/graders.db
sqlite3 tmpdir/exams.db < exams.sql
chmod gao+rw tmpdir/exams.db
php-cgi grade.php go=upload tool=Roster \
file="examples/students.txt" examid=0 evid=0
php-cgi grade.php go=upload tool="Upload Scans" \
file="examples/cse100-midterm-1A.pdf" input="num=2" examid=0 evid=0
php-cgi grade.php go=upload tool=Roster \
file="examples/students.txt" examid=1 evid=1
php-cgi grade.php go=upload tool="Upload Scans" \
file="examples/cse100-midterm-1B.pdf" input="num=2" examid=1 evid=1
php-cgi grade.php go=upload tool=Roster \
file="examples/students.txt" examid=2 evid=2
php-cgi grade.php go=upload tool="Upload Scans" \
file="examples/cse100-midterm-1C.pdf" input="num=2" examid=2 evid=2
cp examples/template-ann-list-1A.json tmpdir/exam-0/ann-list.json
cp examples/template-ann-list-1B.json tmpdir/exam-1/ann-list.json
cp examples/template-ann-list-1C.json tmpdir/exam-2/ann-list.json
chmod gao+rw tmpdir/exam-*/ann-list.json
sqlite3 tmpdir/exam-0/students.db < print.sql
sqlite3 tmpdir/exam-0/students.db < clearRubric.sql
sqlite3 tmpdir/exam-1/students.db < clearRubric.sql
sqlite3 tmpdir/exam-2/students.db < clearRubric.sql
python createRubric.py -e 0 -t examples/template-1A-import.txt \
-r examples/rubric-1A.txt
python createRubric.py -e 1 -t examples/template-1B-import.txt \
-r examples/rubric-1B.txt
python createRubric.py -e 2 -t examples/template-1C-import.txt \
-r examples/rubric-1C.txt
# To update autoincrement sequence
# UPDATE SQLITE_SEQUENCE SET SEQ=1 WHERE NAME='graders';
#php-cgi grade.php go=upload tool=Roster file="tmpdir/roster.txt" examid=1
#php-cgi grade.php go=upload tool=Roster file="tmpdir/roster.txt" examid=2