The ProjectsUser represents the subscription of an user on a project.
A subscribed user can have one or more teams based on his number of attempts to this project. Be careful to always select the active team (the last team).
Here is basically the different states a user can have on a project:
- He (the user) has't any projects_user, he is not registered on the project.
- He has no team, he is actually searching a group, in order to make one.
- He has a team, wich is not locked (the
locked_at
field is not null), he is creating a group.
If the user have a locked team, he did, or he is doing the project. At this point, the available states are:
- His team is closed and has a final_mark (the
locked_at
, closed_at
and final_mark
fields aren't null), he has finished his project. If he don't have a final_mark yet, he his waiting for correction.