MentorsWithoutBorders / mwb-partners-admin

Web app for MWB partners
0 stars 0 forks source link

Mentor details #63

Open edmondpr opened 1 year ago

edmondpr commented 1 year ago

Design: https://www.figma.com/file/DgrKZX9mS13Zgf7k5pZ1WT/Partner-web-app?type=design&node-id=727-148&t=LPfyjEb31x9adSCp-4

When clicking on the details icon for a mentor in the mentors table, the list of courses conducted by that mentor will be retrieved, with the following details for each course:

If a project that has no association with a course was added for that mentor, the ID and name of that project will be retrieved as well.

The details will be made available at the /api/v1/partners/{partner_id}/mentors/{mentor_id} endpoint.

ugudlado commented 1 year ago

@edmondpr

the project associated with that course (if any)

There is no direct relation between project and course. We can get project via mentors but Mentor - Project is many-many relation. Is there any other way or table to check if there is any project associated with a course?

the number of hours corresponding to the lessons completed so far (or within the date range specified for the mentors table)

I tried to check in the code to get this but couldn't find any reference of hours related to completed lessons. Please help in providing direction to get this number. Which tables should be referred here?

edmondpr commented 1 year ago

the project associated with that course (if any)

There is no direct relation between project and course. We can get project via mentors but Mentor - Project is many-many relation. Is there any other way or table to check if there is any project associated with a course?

You're right, thanks for pointing that out. The table should actually be projects_courses instead of projects_mentors, I have updated it now.

the number of hours corresponding to the lessons completed so far (or within the date range specified for the mentors table)

I tried to check in the code to get this but couldn't find any reference of hours related to completed lessons. Please help in providing direction to get this number. Which tables should be referred here?

We'll consider 1h per lesson for now, I'll update the task accordingly.

ugudlado commented 1 year ago

From Edmond: The tables prefixed with userlessons are actually obsolete, we are only using the ones prefixed with userscourses. In order to get the completed lessons, we are just considering one lesson per week after the course start date and counting until the current date.

We are only using the information from the users_courses (the start_date_time value) and users_courses_lessons_canceled tables to get the number of lessons completed.

ManojBahuguna commented 10 months ago

@edmondpr, could you please clarify how we are storing relations between testimonials and course? or is students_testimonials independent of course for mwb in general?

edmondpr commented 10 months ago

We are indeed keeping the students testimonials independent from the courses in our DB.

ManojBahuguna commented 10 months ago

Should we show testimonials here in that case? It will show same testimonials multiple times if student is in multiple courses. Maybe the Students page is fine for that? We can add a link to student details page.

edmondpr commented 10 months ago

Most students enroll in a single course but it's still ok if the same student's testimonial appears in the details of multiple mentors because the students often acknowledge all their mentors in these testimonials.