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: LC-368 stats backend #233

Merged
merged 1 commit into from
Nov 19, 2024
Merged

feat: LC-368 stats backend #233

merged 1 commit into from
Nov 19, 2024

Conversation

typeWolffo
Copy link
Member

@typeWolffo typeWolffo commented Nov 18, 2024

Jira issue(s)

https://selleolabs.atlassian.net/browse/LC-371
https://selleolabs.atlassian.net/browse/LC-375
https://selleolabs.atlassian.net/browse/LC-376
https://selleolabs.atlassian.net/browse/LC-377
https://selleolabs.atlassian.net/browse/LC-378

Overview

  • API endpoint to provide statistics for student
  • Provide data for course statistics
  • Provide data for lesson statistics
  • Provide data for quiz statistics
  • Provide data for streak of using platform

@typeWolffo typeWolffo changed the title Jw feat lc 368 stats backend feat: LC-368 stats backend Nov 18, 2024
@typeWolffo typeWolffo force-pushed the jw_feat_lc-368_stats_backend branch from 6e7e8e2 to 13eadd2 Compare November 19, 2024 00:04
@@ -120,7 +121,7 @@ export class AuthService {
const tokens = await this.getTokens(user);
return tokens;
} catch (error) {
throw new UnauthorizedException("Invalid refresh token");
throw new ForbiddenException("Invalid refresh token");
Copy link
Member Author

Choose a reason for hiding this comment

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

this probably should fix our problem with infinite /refresh requests

Comment on lines 170 to 171
let correctAnswers = 0;
let wrongAnswers = 0;
Copy link
Member Author

Choose a reason for hiding this comment

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

@wielopolski any ideas on how to get this data in a better way?

Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe

Suggested change
let correctAnswers = 0;
let wrongAnswers = 0;
const correctAnswerCount = questionLessonItem.content.questionAnswers
.filter(answer => Boolean(answer.isCorrect))
.length;
const wrongAnswerCount = totalQuestions - correctAnswerCount

@typeWolffo typeWolffo self-assigned this Nov 19, 2024
@typeWolffo typeWolffo added the Status: WIP 🏗 Work in progress label Nov 19, 2024
@typeWolffo typeWolffo force-pushed the jw_feat_lc-368_stats_backend branch from 13eadd2 to aad2dcf Compare November 19, 2024 00:37
@typeWolffo typeWolffo added review me 👀 PR is ready to be reviewed and removed Status: WIP 🏗 Work in progress labels Nov 19, 2024
@typeWolffo typeWolffo force-pushed the jw_feat_lc-368_stats_backend branch from aad2dcf to 34d6b10 Compare November 19, 2024 12:06
@typeWolffo typeWolffo marked this pull request as ready for review November 19, 2024 12:14
Copy link
Collaborator

@wielopolski wielopolski left a comment

Choose a reason for hiding this comment

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

LGTM 🍻
I left suggestion

Comment on lines 170 to 171
let correctAnswers = 0;
let wrongAnswers = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe

Suggested change
let correctAnswers = 0;
let wrongAnswers = 0;
const correctAnswerCount = questionLessonItem.content.questionAnswers
.filter(answer => Boolean(answer.isCorrect))
.length;
const wrongAnswerCount = totalQuestions - correctAnswerCount

@typeWolffo typeWolffo force-pushed the jw_feat_lc-368_stats_backend branch from 34d6b10 to 5bc8c07 Compare November 19, 2024 14:21
@typeWolffo typeWolffo merged commit b307deb into main Nov 19, 2024
6 checks passed
@typeWolffo typeWolffo deleted the jw_feat_lc-368_stats_backend branch November 19, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review me 👀 PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants