Skip to content
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

feat: [ACI-850] implement badge completion check #108

Merged
merged 7 commits into from
Apr 8, 2024

Conversation

andrii-hantkovskyi
Copy link

No description provided.

Copy link
Collaborator

@wowkalucky wowkalucky left a comment

Choose a reason for hiding this comment

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

Pls resolve comments.

credentials/apps/badges/models.py Outdated Show resolved Hide resolved
return self.user_progress(username) == 1.0

@property
def ratio(self) -> float:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This property is expected to be on the BadgeProgress, so it is possible to get the exact badge template progress value on a specific BadgeProgress record (not a generic ratio on a BadgeTemplate).

So, the .ratio value must mirror the .user_progress(username) but from the progress instance side.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, if this wasn't that clear in the description 😞

credentials/apps/badges/models.py Outdated Show resolved Hide resolved
credentials/apps/badges/models.py Outdated Show resolved Hide resolved
@wowkalucky wowkalucky merged commit 31cc26b into aci.main Apr 8, 2024
2 checks passed
@wowkalucky wowkalucky deleted the hantkovskyi/aci-850/badge-completion-check branch April 8, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants