Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SoHPC-Selection
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Beckmann
SoHPC-Selection
Commits
3d19051c
Commit
3d19051c
authored
Apr 3, 2020
by
Andreas Beckmann
Browse files
Options
Downloads
Patches
Plain Diff
support keywords 'invalid', 'withdrawn', 'declined' for 'selected'
parent
ba9b6349
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
create-evaluation-files.py
+26
-10
26 additions, 10 deletions
create-evaluation-files.py
sohpc-assign.pl
+3
-1
3 additions, 1 deletion
sohpc-assign.pl
with
29 additions
and
11 deletions
create-evaluation-files.py
+
26
−
10
View file @
3d19051c
...
@@ -103,6 +103,14 @@ skeleton = """
...
@@ -103,6 +103,14 @@ skeleton = """
table.list tr.registrant_selected_other a {
table.list tr.registrant_selected_other a {
color: #999999;
color: #999999;
}
}
table.list tr.registrant_withdrawn {
text-decoration: line-through;
font-style: italic;
color: #999999;
}
table.list tr.registrant_withdrawn a {
color: #999999;
}
</style>
</style>
</head>
</head>
<body>
<body>
...
@@ -683,6 +691,8 @@ for fldName in ['Choice 1', 'Choice 2', 'Choice 3']:
...
@@ -683,6 +691,8 @@ for fldName in ['Choice 1', 'Choice 2', 'Choice 3']:
for
id
in
user_data
:
for
id
in
user_data
:
if
user_data
[
id
][
'
selected
'
].
strip
()
in
[
'
invalid
'
,
'
withdrawn
'
,
'
declined
'
]:
continue
# loop over usr data and save selected students/registrants for each projct
# loop over usr data and save selected students/registrants for each projct
if
user_data
[
id
][
'
selected
'
].
strip
():
if
user_data
[
id
][
'
selected
'
].
strip
():
# get project ID and order from selected number: 2001.1 (project ID.order of selection)
# get project ID and order from selected number: 2001.1 (project ID.order of selection)
...
@@ -771,15 +781,18 @@ for projID in project_ids:
...
@@ -771,15 +781,18 @@ for projID in project_ids:
row
=
row
.
replace
(
"
{{OVERALL_COMMENT_1}}
"
,
student_data
[
id
][
'
overall_comment
'
][
0
])
row
=
row
.
replace
(
"
{{OVERALL_COMMENT_1}}
"
,
student_data
[
id
][
'
overall_comment
'
][
0
])
row
=
row
.
replace
(
"
{{OVERALL_COMMENT_2}}
"
,
student_data
[
id
][
'
overall_comment
'
][
1
])
row
=
row
.
replace
(
"
{{OVERALL_COMMENT_2}}
"
,
student_data
[
id
][
'
overall_comment
'
][
1
])
if
user_data
[
id
][
'
selected
'
]:
if
user_data
[
id
][
'
selected
'
]
in
[
'
invalid
'
,
'
withdrawn
'
,
'
declined
'
]:
# current student is selected for project; display it in special way
style
=
"
registrant_withdrawn
"
if
user_data
[
id
][
'
selected
'
].
startswith
(
"
%d
"
%
projID
):
elif
user_data
[
id
][
'
selected
'
].
startswith
(
"
%d
"
%
projID
):
row
=
row
.
replace
(
"
{{REGISTRANT_SELECTED}}
"
,
"
registrant_selected
"
)
# current student is selected for the current project
else
:
style
=
"
registrant_selected
"
row
=
row
.
replace
(
"
{{REGISTRANT_SELECTED}}
"
,
"
registrant_selected_other
"
)
elif
user_data
[
id
][
'
selected
'
]:
# current student is selected for a different project
style
=
"
registrant_selected_other
"
else
:
else
:
# ordinary row
# ordinary row
row
=
row
.
replace
(
"
{{REGISTRANT_SELECTED}}
"
,
""
)
style
=
""
row
=
row
.
replace
(
"
{{REGISTRANT_SELECTED}}
"
,
style
)
for
part
in
[
'
motivation
'
,
'
ambasador
'
,
'
technical
'
]:
for
part
in
[
'
motivation
'
,
'
ambasador
'
,
'
technical
'
]:
# add all parts
# add all parts
...
@@ -872,12 +885,15 @@ for cell in user_sorted.most_common():
...
@@ -872,12 +885,15 @@ for cell in user_sorted.most_common():
project_list_tmp
=
""
project_list_tmp
=
""
sep
=
""
sep
=
""
if
user_data
[
id
][
'
selected
'
]:
if
user_data
[
id
][
'
selected
'
]
in
[
'
invalid
'
,
'
withdrawn
'
,
'
declined
'
]:
style
=
"
registrant_withdrawn
"
elif
user_data
[
id
][
'
selected
'
]:
# current student is selected for project; display it in special way
# current student is selected for project; display it in special way
row
=
row
.
replace
(
"
{{REGISTRANT_SELECTED}}
"
,
"
registrant_selected
"
)
style
=
"
registrant_selected
"
else
:
else
:
# ordinary row
# ordinary row
row
=
row
.
replace
(
"
{{REGISTRANT_SELECTED}}
"
,
""
)
style
=
""
row
=
row
.
replace
(
"
{{REGISTRANT_SELECTED}}
"
,
style
)
for
fldName
in
[
'
Choice1ID
'
,
'
Choice2ID
'
,
'
Choice3ID
'
]:
for
fldName
in
[
'
Choice1ID
'
,
'
Choice2ID
'
,
'
Choice3ID
'
]:
# get all three projects and first add all user's first choise, then second and then third choice
# get all three projects and first add all user's first choise, then second and then third choice
...
...
...
...
This diff is collapsed.
Click to expand it.
sohpc-assign.pl
+
3
−
1
View file @
3d19051c
...
@@ -66,7 +66,9 @@ while (<>) {
...
@@ -66,7 +66,9 @@ while (<>) {
push
@
{
$project
{
$pref2
}{
cand
}},
{
value
=>
$score
*
$weight2
,
student
=>
$id
,
score
=>
$score
,
spref
=>
2
,
pweight
=>
1.0
,
ppref
=>
0
}
if
$pref2
;
push
@
{
$project
{
$pref2
}{
cand
}},
{
value
=>
$score
*
$weight2
,
student
=>
$id
,
score
=>
$score
,
spref
=>
2
,
pweight
=>
1.0
,
ppref
=>
0
}
if
$pref2
;
push
@
{
$project
{
$pref3
}{
cand
}},
{
value
=>
$score
*
$weight3
,
student
=>
$id
,
score
=>
$score
,
spref
=>
3
,
pweight
=>
1.0
,
ppref
=>
0
}
if
$pref3
;
push
@
{
$project
{
$pref3
}{
cand
}},
{
value
=>
$score
*
$weight3
,
student
=>
$id
,
score
=>
$score
,
spref
=>
3
,
pweight
=>
1.0
,
ppref
=>
0
}
if
$pref3
;
if
(
$selected
)
{
if
(
$selected
eq
'
invalid
'
||
$selected
eq
'
withdrawn
'
||
$selected
eq
'
declined
')
{
$student2project
{
$id
}
=
$selected
;
}
elsif
(
$selected
)
{
(
$p
,
$ps
)
=
split
(
/\./
,
$selected
,
2
);
(
$p
,
$ps
)
=
split
(
/\./
,
$selected
,
2
);
die
"
reassignment of
$selected
:
$id
vs.
$project2student
{
$p
}{
$ps
}->{student}
"
if
defined
$project2student
{
$p
}{
$ps
};
die
"
reassignment of
$selected
:
$id
vs.
$project2student
{
$p
}{
$ps
}->{student}
"
if
defined
$project2student
{
$p
}{
$ps
};
$student2project
{
$id
}
=
$p
;
$student2project
{
$id
}
=
$p
;
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment