-
Notifications
You must be signed in to change notification settings - Fork 1
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
#208 Add functionality to mark user_program as complete #220
#208 Add functionality to mark user_program as complete #220
Conversation
|
||
def mark_user_program_as_completed(self, JsonData): | ||
self.set_init_data(JsonData) | ||
self.user_program_data = models.UserProgram.get_by_user_id(self.user_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be futuristic, but what will happen in the case of multiple user experiences?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_by_user_id function give use the latest active (i.e status = in-progress) user_program.
def get_by_user_id(self, user_id): | ||
return self.filter(Registration.user_id == user_id).first() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate
if not user_program_details: | ||
user_program_details = self.get_latest_user_program(user_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case there is no active user_program. As we have not yet decided how we will do resign up for these users. So currently not creating a new user program for completed users.
#208
Please complete the following steps and check these boxes before filing your PR:
Types of changes
Short description of what this resolves:
"is_last_content"
value is"true"
Checklist: