hex337 / quantum-attendance

An attendance program for Quantum Martial Arts
MIT License
3 stars 2 forks source link

'Num Students' in ClassList includes instructors #10

Open mlamina opened 7 years ago

mlamina commented 7 years ago

The 'Num Students' column in the classes overview contains the amount of all members - students and assistants - but should only show the number of students.

hex337 commented 7 months ago

/pilot look at the class overview page (/classes) and understand how it calculates the number of students, then explain how you could distinguish between a student who was part of the class or a teacher that taught the class

arcane-engine[bot] commented 7 months ago

I attempted to locate the relevant code or files that would provide insight into how the number of students is calculated on the class overview page (/classes) within the quantum-attendance project. Unfortunately, my searches did not yield any results or encountered an error, preventing me from accessing the necessary information to fulfill your request.

Given this situation, I recommend directly examining the source code related to the class overview page, specifically any Python files that handle the rendering of this page or the calculation of class members. Look for any logic that aggregates or filters class members, and consider how it might differentiate between students and teachers. This differentiation could potentially be based on roles, permissions, or specific attributes assigned to users within the system.

If you have further details or specific files in mind that could help narrow down the search, please let me know, and I'll be happy to assist further.

Task Log

hex337 commented 7 months ago

/pilot This is a rails project, and for the partial view in the path app/views/meetings/_meeting_list.html.haml the Num Students column is calculated by looking at all members who participated in a meeting. Each member in a meeting has a role, teacher, student, or assistant. Update the code in the view template to only include the count of members who were students for the meeting and do not include any other roles in the count.

arcane-engine[bot] commented 7 months ago

I've updated the partial view template at app/views/meetings/_meeting_list.html.haml to only include the count of members who were students for the meeting. The Num Students column will now accurately reflect the number of students who participated in each meeting, excluding any other roles. This change has been successfully applied to the project.

Pull request has been created: #78

Task Log