Closed piotrvidal closed 2 years ago
Excellent, I'll review the PR properly on February 16th!
Problem 1: How do we calculate last time they reviewed the course? Is it in some other table I missed or should we just take the timestamp from the last question answered in the last review?
The latter - it's in the problem_user_is_learning
table, last_reviewed_at
column.
Problem 2: What is a learned card once they're in review mode? Should how well the student is doing remembering flashcards statistics be related to consecutive correct answers or is there any other more specific metric stored in
I suggest two metrics of how well the student is doing with the course:
problem_user_is_learning.if_ignored = false
)problem_user_is_learning.easiness
, so (easiness_1 + easiness_2 + easiness_3)/3). problem_user_is_learning.easiness
is the best reflection of how well the student knows the flashcard.PS. Please use knex
when you're dealing with the backend, see the old-style backend endpoints VS new-style backend endpoints issue https://github.com/lakesare/memcode/issues/65.
I added the backend using knex
and further modified the frontend bit.
Regarding how many flashcards user has learned, I don't think the bool you mention is currently working. Every flashcard appears with the bool False in the database regardless of whether I marked it for learning or not. When pulling stuff from problem_user_is_learning
I only get those I marked as learned anyway, so I guess all's good :roll_eyes:
Check the PR thoroughly, I've only now used knex
and react
for the first time ever. I'm also thinking about refactoring getStudentsStats.js
by adding some file to the services folder like in the case of getRatings.js
Regarding how many flashcards user has learned, I don't think the bool you mention is currently working.
There are 3 states the user can have with a particular flashcard:
problem_user_is_learning
for this user & flashcard doesn't existproblem_user_is_learning
gets created with problem_user_is_learning.if_ignored = false
problem_user_is_learning
gets created with problem_user_is_learning.if_ignored = true
Check the PR thoroughly, I've only now used knex and react for the first time ever.
Hah sure, from a brief look the code does look like what someone experienced in coding and unfamiliar with react traditions and ceremonies would write. I'll add a few comments on the PR now (didn't yet review properly).
Added a few requests for changes. The stats table is great, I can already see how nice it will be to have in production. I think it's hard for you to be developing without the proper database dump, e.g. you didn't see that "10 students" learning some course only results in "1 student" being shown in most courses. Would you like me to generate a database dump for you, or are you fine without it?
@lakesare I use some dummy google accounts but I see them all in the list as you see on this screenshot. It says 3 students, I click, and the list shows all 3 students:
If there's any db seeding that adds lots of dummy users with random data for testing purposes yeah, I'd like to use that :) I thought we were restricted to using github/google accounts for now.
You're likely fine with dummy accounts now that the coauthors/students confusion is resolved, however I sent you the db dump in the email.
Uh still doesn't work for me :-( Most likely the sql is off.
Very strange. Students list loads locally without any problem. Is there anything in the browser's network tab in the response of the CourseApi.getStudentStats request?
The frontend is done but I can't continue further without knowing exactly how to show statistics based on what we have or what approach @lakesare would like to take.
In #143 it was mentioned:
Problem 1: How do we calculate last time they reviewed the course? Is it in some other table I missed or should we just take the timestamp from the last question answered in the last review?
Problem 2: What is a learned card once they're in review mode? Should how well the student is doing remembering flashcards statistics be related to consecutive correct answers or is there any other more specific metric stored in tables?
So far I've left placeholders in the list values corresponding to Problem 1 and 2. Please let me know how to proceed.