Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python-kosapi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tomáš Pecka
python-kosapi
Commits
d66f4d8e
Unverified
Commit
d66f4d8e
authored
3 years ago
by
Tomáš Pecka
Browse files
Options
Downloads
Patches
Plain Diff
example: progtest import csv generator
parent
ea751261
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/progtest-import.py
+23
-0
23 additions, 0 deletions
examples/progtest-import.py
with
23 additions
and
0 deletions
examples/progtest-import.py
0 → 100644
+
23
−
0
View file @
d66f4d8e
import
kosapi
import
czech_sort
def
get_list
(
course
,
sem
):
res
=
list
()
k
=
kosapi
.
KosapiClient
()
for
stud
in
k
.
get
().
courses
(
course
).
students
(
limit
=
1000
):
code
=
"
--
"
for
p
in
k
.
get
().
students
(
stud
.
code
).
parallels
(
sem
=
sem
,
query
=
"
parallelType==TUTORIAL;course=={}
"
.
format
(
course
)):
code
=
p
.
code
tmp
=
[
stud
.
lastName
,
stud
.
firstName
,
stud
.
username
,
stud
.
email
,
str
(
code
)]
res
.
append
(
'
:
'
.
join
(
tmp
))
return
czech_sort
.
sorted
(
res
)
sem
=
"
B211
"
for
course
in
[
"
BIK-AAG
"
,
"
BIE-AAG
"
,
"
BI-AAG
"
]:
with
open
(
'
{}-dump_{}.csv
'
.
format
(
sem
,
course
),
'
w
'
)
as
f
:
for
e
in
get_list
(
course
,
sem
):
f
.
write
(
e
+
"
\n
"
)
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
register
or
sign in
to comment