Skip to content
Snippets Groups Projects
Commit 17f3b5ed authored by Andreas Beckmann's avatar Andreas Beckmann
Browse files

support reading ID,selected pairs from assign-*.csv

parent 3d19051c
Branches
No related tags found
No related merge requests found
ID,selected
72,invalid
12,declined
46,declined
ID,selected
2,2001.1
53,2002.1
63,2003.1
51,2004.1
32,2005.1
49,2006.1
41,2007.1
15,2008.1
6,2009.1
36,2010.1
7,2011.1
27,2012.1
55,2013.1
39,2014.1
22,2015.1
50,2017.1
12,2018.1
60,2019.1
10,2020.1
35,2021.1
38,2022.1
4,2023.1
8,2024.1
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# cd Selection # cd Selection
# usage: python3 ../create-evaluation-files-multi.py \ # usage: python3 ../create-evaluation-files-multi.py \
# ../registrations.csv ../submissions-638.csv # ../registrations.csv ../submissions-638.csv [../assign-*.csv]
# #
# Some --- columns needs to be renamed in evaluation-results.csv # Some --- columns needs to be renamed in evaluation-results.csv
# First column --- to -o- # First column --- to -o-
...@@ -457,6 +457,18 @@ for row in tmp_user_data['rows']: ...@@ -457,6 +457,18 @@ for row in tmp_user_data['rows']:
dic.update({'link_application': "%s/index.html" % link}) dic.update({'link_application': "%s/index.html" % link})
user_data.update({id:dic}) user_data.update({id:dic})
# load assignments
for a in sys.argv[3:]:
for row in read_csv_file(a)['rows']:
id = int(row[0])
proj = row[1].strip()
if user_data[id]['selected'] == proj:
pass
else:
if user_data[id]['selected']:
print("trying to reselect student %d from '%s' to '%s'\n" % (id, user_data[id]['selected'], proj))
else:
user_data[id]['selected'] = proj
#print(user_data) #print(user_data)
......
#!/bin/sh #!/bin/sh
set -e
if [ ! -d Application_Form ]; then if [ ! -d Application_Form ]; then
echo "Missing 'Application_Form' directory" echo "Missing 'Application_Form' directory"
exit 1 exit 1
...@@ -6,7 +8,7 @@ fi ...@@ -6,7 +8,7 @@ fi
rm -rf Selection rm -rf Selection
mkdir Selection mkdir Selection
cd Selection cd Selection
python3 ../create-evaluation-files.py ../registrations.csv ../submissions-638.csv python3 ../create-evaluation-files.py ../registrations.csv ../submissions-638.csv ../assign-[0-1].csv
cd .. cd ..
mv Selection/students.csv . mv Selection/students.csv .
perl sohpc-assign.pl slots-round1.csv weights-pref.csv students.csv project-preferences.csv > select-round1-by-pref.txt perl sohpc-assign.pl slots-round1.csv weights-pref.csv students.csv project-preferences.csv > select-round1-by-pref.txt
...@@ -14,8 +16,7 @@ perl sohpc-assign.pl slots.csv weights-pref.csv students.csv project-preference ...@@ -14,8 +16,7 @@ perl sohpc-assign.pl slots.csv weights-pref.csv students.csv project-preference
perl sohpc-assign.pl slots.csv weights-score.csv students.csv project-preferences.csv > select-by-score.txt perl sohpc-assign.pl slots.csv weights-score.csv students.csv project-preferences.csv > select-by-score.txt
mkdir Selection/scripts mkdir Selection/scripts
cp prepare-selection.sh create-evaluation-files.py evaluation-detail-format.html submissions-638.csv registrations.csv Selection/scripts cp prepare-selection.sh create-evaluation-files.py evaluation-detail-format.html submissions-638.csv registrations.csv Selection/scripts
cp sohpc-assign.pl slots*.csv weights*.csv students.csv project-preferences.csv select*.txt Selection/scripts cp sohpc-assign.pl slots*.csv weights*.csv students.csv project-preferences.csv select*.txt assign-*.csv Selection/scripts
echo zip -r Selection Selection echo zip -r Selection Selection
# submissions-638.csv: David Henty's #24 renamed to #34, Duplicate #15 on line 151 removed # submissions-638.csv: David Henty's #24 renamed to #34, Duplicate #15 on line 151 removed
# registrations.csv: Keys 1,2,3 changed to Choice 1, Choice 2, Choice 3 # registrations.csv: Keys 1,2,3 changed to Choice 1, Choice 2, Choice 3
# registrations.csv: third choice of Stefan Popov (ID: 37) changed from 2009 to 2016
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment