-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Challenges and leaderboards #3127
base: main
Are you sure you want to change the base?
Challenges and leaderboards #3127
Conversation
…o challenges-leaderboard
@DonnieBLT Sir i have made the required functionality , but the challenges are limited to 3 , just so i can confirm with you that :
|
We can start with three challenges that looks good let's let's make everything one point and then yes if you think it's better to have a separate file then that would be fine for the signals |
@DonnieBLT sir, i have made the changes and attached a video, let me know of any other changes. Thanks. |
What do you think about modifying the badge code to work with teams instead of adding new models? |
While there seems to be some overlap between the badge model and the challenge model , if in future we want to add badges for lets say , "Complete all the team challenges" , "Complete all weekly challenges in 3 consecutive weeks", wouldnt there be significant mismatch in the logic? |
That’s a good point. How about if a user reports 5 ips for the team, they should get the individual badge too right? I think the badge code is setup to be similar to the challenges. Maybe if it’s a team capable badge, it only gets rewarded when all members earn it and it ties into the progress bar. If we use badges we also get the nice graphic. |
I believe then the this depends on the use case , if you plan to have badges associated with all the challenges , then combining the challenges and badge model would be good , but if badges have multiple use cases beyond challenges then keeping them separate would be a better option , For teams i can modify the badge model to have a field like and i can modify the UserBadge model to RecipientBadge model , that can link the badges to the users as well as teams depending on the badge . |
I think it’s fine if each challenge also has a badge. We also want them to work with team+individual so I could report 5 ips for my team and earn two badges one for the team when all members find 5 ip and individual when I find 5 |
Sir, treating challenges that way would compromise the point system and leaderboard functionality. Currently, a challenge is marked as complete when team members collectively report 5 IPs, allowing the team to earn points and be ranked on the global leaderboard. So, I wanted to propose either of the following options:
This way, we preserve the focus on team challenges while still recognizing individual efforts within teams. |
I like the ability to have individual and team challenges |
So , finally we want in team challenges to be like, |
Yes I think that seems right |
fixes #3126
Used the points model in user.py to award points to users when they complete challenges.
Teams will earn team_points when they complete challenges.
For the navigation structure:
Under the Users section in the sidenav, Introduced a new page for challenges. Points earned from these challenges are also added showcased on the existing leaderboard.
Under the new Teams section in the sidenav:
a new page for challenges for teams.
a Team Leaderboard with views: global rankings
Separating badges for challenges in necessary because if in future we want to add weekly challenges , we wont need to assign badges for every completion of challenge.
https://github.com/user-attachments/assets/033dcdf8-2e8f-4818-9122-27f9571567ac