Skip to content

Add validation to prevent multiple class assignment#646

Open
Dym03 wants to merge 2 commits intomrlvsb:masterfrom
Dym03:class_validation
Open

Add validation to prevent multiple class assignment#646
Dym03 wants to merge 2 commits intomrlvsb:masterfrom
Dym03:class_validation

Conversation

@Dym03
Copy link
Contributor

@Dym03 Dym03 commented Mar 20, 2025

Fixes #445
Updated validation before adding user to a class to prevent one student having multiple classes from same subject.
Updated errors returned to frontend. Split returned users into 2 groups for easier handling. Please do check if the inbus part is correct, I am not able to run the inbus import, maybe due to a wrong local setup.

@Dym03 Dym03 force-pushed the class_validation branch from 6bdabe4 to ac0a055 Compare March 20, 2025 20:25
Copy link
Collaborator

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I'm not sure if we can do this before we have class types (similarly as to the recently added task types). Because right now it's quite common to have a student in multiple classes, because there can be e.g. lecture + laboratory class for the same subject, or exam + laboratory classes for the same subject.

@geordi?

@Dym03 Dym03 force-pushed the class_validation branch from 1428e14 to 5900b08 Compare March 21, 2025 07:28
@Dym03
Copy link
Contributor Author

Dym03 commented Mar 21, 2025

That is true, will leave it here, if the class types are added, then it could be finished :). Just to leave the frontend in a good state is there any way to get the inbus import working on a local machine ? Because right now i have a bulk import in a loading state, maybe due to wrong semester_id.

@Dym03 Dym03 force-pushed the class_validation branch from 5900b08 to 8a1ce87 Compare March 21, 2025 07:36
@Kobzol
Copy link
Collaborator

Kobzol commented Mar 21, 2025

I'm afraid not, we can't give out Inbus API keys to students, I think :(

@geordi
Copy link
Member

geordi commented Mar 21, 2025

At this point, we cannot give out INBUS API keys. Sorry for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not allow to add student to class if he/she is already assigned to a different class in the subject

3 participants