ladok3 5.1__tar.gz → 5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ladok3 might be problematic. Click here for more details.
- {ladok3-5.1 → ladok3-5.2}/PKG-INFO +1 -1
- {ladok3-5.1 → ladok3-5.2}/pyproject.toml +1 -1
- {ladok3-5.1 → ladok3-5.2}/src/ladok3/data.nw +23 -11
- {ladok3-5.1 → ladok3-5.2}/LICENSE +0 -0
- {ladok3-5.1 → ladok3-5.2}/README.md +0 -0
- {ladok3-5.1 → ladok3-5.2}/doc/Makefile +0 -0
- {ladok3-5.1 → ladok3-5.2}/doc/abstract.tex +0 -0
- {ladok3-5.1 → ladok3-5.2}/doc/ladok3.tex +0 -0
- {ladok3-5.1 → ladok3-5.2}/doc/preamble.tex +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/doc.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/exam.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/haskell.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/miun.course.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/miun.depend.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/miun.docs.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/miun.port.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/miun.pub.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/noweb.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/pkg.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/portability.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/pub.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/results.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/subdir.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/tex.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/makefiles/transform.mk +0 -0
- {ladok3-5.1 → ladok3-5.2}/src/ladok3/.gitignore +0 -0
- {ladok3-5.1 → ladok3-5.2}/src/ladok3/Makefile +0 -0
- {ladok3-5.1 → ladok3-5.2}/src/ladok3/api.nw +0 -0
- {ladok3-5.1 → ladok3-5.2}/src/ladok3/cli.nw +0 -0
- {ladok3-5.1 → ladok3-5.2}/src/ladok3/ladok3.nw +0 -0
- {ladok3-5.1 → ladok3-5.2}/src/ladok3/report.nw +0 -0
- {ladok3-5.1 → ladok3-5.2}/src/ladok3/scripts.nw +0 -0
- {ladok3-5.1 → ladok3-5.2}/src/ladok3/student.nw +0 -0
- {ladok3-5.1 → ladok3-5.2}/src/ladok3/undoc.nw +0 -0
|
@@ -76,8 +76,8 @@ This way the user can deal with how to store the data.
|
|
|
76
76
|
<<produce data about course specified in args>>=
|
|
77
77
|
data_writer = csv.writer(sys.stdout, delimiter=args.delimiter)
|
|
78
78
|
course_rounds = filter_rounds(
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
ladok.search_course_rounds(code=args.course_code),
|
|
80
|
+
args.rounds)
|
|
81
81
|
|
|
82
82
|
if args.header:
|
|
83
83
|
data_writer.writerow([
|
|
@@ -137,21 +137,24 @@ def extract_data_for_round(ladok, course_round, args):
|
|
|
137
137
|
<<compute start and length of the course>>
|
|
138
138
|
<<get the results for the course round>>
|
|
139
139
|
|
|
140
|
-
students = filter_students(course_round.participants(),
|
|
140
|
+
students = filter_students(course_round.participants(),
|
|
141
|
+
args.students)
|
|
141
142
|
|
|
142
143
|
for student in students:
|
|
143
|
-
student_results = filter_student_results(student,
|
|
144
|
+
student_results = filter_student_results(student,
|
|
145
|
+
results)
|
|
144
146
|
|
|
145
147
|
<<determine if student should be included>>
|
|
146
148
|
|
|
147
|
-
components = filter_components(course_round.components(),
|
|
149
|
+
components = filter_components(course_round.components(),
|
|
150
|
+
args.components)
|
|
148
151
|
|
|
149
152
|
for component in components:
|
|
150
153
|
if len(student_results) < 1:
|
|
151
154
|
result_data = None
|
|
152
155
|
else:
|
|
153
|
-
result_data = filter_component_result(
|
|
154
|
-
|
|
156
|
+
result_data = filter_component_result(component,
|
|
157
|
+
student_results[0]["ResultatPaUtbildningar"])
|
|
155
158
|
|
|
156
159
|
if not result_data:
|
|
157
160
|
grade = "-"
|
|
@@ -164,12 +167,21 @@ def extract_data_for_round(ladok, course_round, args):
|
|
|
164
167
|
|
|
165
168
|
We want to yield the data in CSV form, so we simply yield a tuple.
|
|
166
169
|
The date is either the normalized date or the date from the result data.
|
|
170
|
+
The student's identifier will be either the LADOK ID or the student name and
|
|
171
|
+
personnummer, depending on the command line arguments.
|
|
167
172
|
<<yield [[student, component, grade]] and date>>=
|
|
168
|
-
if args.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
173
|
+
yield student.ladok_id if args.ladok_id \
|
|
174
|
+
else student, \
|
|
175
|
+
component, \
|
|
176
|
+
grade, \
|
|
177
|
+
normalized_date if args.normalize_date \
|
|
178
|
+
else result_data["Examinationsdatum"] if result_data \
|
|
179
|
+
else None
|
|
172
180
|
<<add data command arguments to data parser>>=
|
|
181
|
+
data_parser.add_argument("-l", "--ladok-id", action="store_true",
|
|
182
|
+
help="Use the LADOK ID for the student, "
|
|
183
|
+
"otherwise the student name and personnummer "
|
|
184
|
+
"will be used.")
|
|
173
185
|
data_parser.add_argument("-n", "--normalize-date", action="store_true",
|
|
174
186
|
help="Normalize the date to the start of the course, "
|
|
175
187
|
"otherwise the date is printed as is.")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|