Skip to content

JSON enrollment importer #2187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 61 commits into from
Jun 17, 2025
Merged

Conversation

hansegucker
Copy link
Collaborator

@hansegucker hansegucker commented May 13, 2024

Close #2131

@hansegucker hansegucker marked this pull request as draft May 13, 2024 18:17
@richardebeling richardebeling linked an issue May 17, 2024 that may be closed by this pull request
@hansegucker hansegucker force-pushed the json-enrollment-importer branch from 6f2f53a to cc0f045 Compare July 1, 2024 17:46
Copy link
Member

@janno42 janno42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not yet manually tested, because test data doesn't import (course = self.course_map[event["relatedevents"]["gguid"]] KeyError: '0x6')

@janno42
Copy link
Member

janno42 commented Jul 29, 2024

If possible, we should remove the debug info text from the log email

@hansegucker
Copy link
Collaborator Author

If possible, we should remove the debug info text from the log email

Done.

@janno42
Copy link
Member

janno42 commented Mar 13, 2025

Still missing

  • use import names for CourseTypes
  • use import names for Programs
  • tests

@janno42 janno42 force-pushed the json-enrollment-importer branch 3 times, most recently from 742606d to af1825d Compare March 14, 2025 10:09
Copy link
Member

@janno42 janno42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Currently all new evaluations are listed under "New Evaluations" and "Updated Evaluations" in the import log
  • For all "unused events" the programs are currently not imported

@janno42 janno42 force-pushed the json-enrollment-importer branch from b09ecfc to d3fab05 Compare May 5, 2025 16:56
@janno42
Copy link
Member

janno42 commented May 5, 2025

@hansegucker tests are done. some mypy stuff is left, do you want to look into it?

@hansegucker hansegucker marked this pull request as ready for review May 19, 2025 18:16
@hansegucker hansegucker changed the title WIP: JSON enrollment importer JSON enrollment importer May 19, 2025
@janno42 janno42 force-pushed the json-enrollment-importer branch from e5e5290 to 85a6a6a Compare June 11, 2025 10:57
@janno42 janno42 force-pushed the json-enrollment-importer branch 2 times, most recently from 631e44f to fdee2a3 Compare June 16, 2025 15:34
@janno42 janno42 force-pushed the json-enrollment-importer branch from fdee2a3 to fec92c1 Compare June 16, 2025 16:07
niklasmohrin
niklasmohrin previously approved these changes Jun 16, 2025
Copy link
Member

@niklasmohrin niklasmohrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 🚢

programs = [
self._get_program(c["cprid"]) for c in data["courses"] if c["cprid"] not in settings.IGNORE_PROGRAMS
]
course.programs.add(*programs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something we want to track as changed?

Comment on lines +379 to +380
participant_changes = set(evaluation.participants.all()) != set(participants)
evaluation.participants.set(participants)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use our helper here? Or is it wasteful when we don't actually care about the old values?

@janno42 janno42 merged commit d9b17c6 into e-valuation:main Jun 17, 2025
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

JSON enrollment data importer (v1)
4 participants