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

修了したプラクティスの数が正しい状態にならない #7804

Closed
kyokucho1989 opened this issue May 26, 2024 · 2 comments
Closed
Assignees
Labels

Comments

@kyokucho1989
Copy link
Contributor

概要

#7635 のIssueを解消するため下記のPRを作成しました。

#7699
その後本番環境に反映されましたが、修了した数が正しい状態になりません。

スクリーンショット

ユーザー詳細ページ

スクリーンショット 2024-05-26 4 17 51

クリックすると表記が切り替わります。
gif2

数を以下のように定義する。

A = 修了したプラクティスの数
B = 修了したプラクティスの内、必須の数
C = コースの全体の必須のプラクティスの数

左の修了プラクティス

A (必須:B)

右の修了したプラクティス

通常:B/C*100 %
クリック後:修了: A (必須: B/C)

大小関係は本来ならC > A > B となるが、C > B > A となっている。

再現手順

1.任意のユーザーページにアクセス (Railsのプラクティスを修了しているユーザー)
2.修了数を確認

期待される振る舞い

修了数の関係がC > B > A となる。

関連Issue

#7635

@kyokucho1989
Copy link
Contributor Author

この事象の原因ですが、複数のカテゴリに所属しているプラクティスについて、重複して修了数を計算しているためと思われます。

Railsのプラクティスは「Ruby on Rails」と「Ruby on Rails (Rails 6.1版)」という二つのカテゴリに所属しています。
この修了数が重複して計算されている可能性があります。

もうすこし調査してからPRを送ります。

@kyokucho1989
Copy link
Contributor Author

動作確認できましたのでクローズします。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

1 participant