-
Notifications
You must be signed in to change notification settings - Fork 1
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
Export stats #94
Export stats #94
Conversation
340eef3
to
76d84a5
Compare
I've rebase this, so it's ready to be reviewed. Thanks! |
@@ -177,9 +182,9 @@ const ClassroomEditor = (props) => { | |||
props.assignments[props.selectedClassroom.id] && | |||
props.assignments[props.selectedClassroom.id].length > 0 && | |||
students.map((student) => { | |||
const galaxyAssignment = props.assignments[props.selectedClassroom.id].filter( | |||
const galaxyAssignment = assignments.filter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[minor] If you're changing props.assignments[props.selectedClassroom.id]
to the more sensible assignments
, wouldn't you also want to update the condition checks as well? i.e.
{props.assignmentsStatus === ASSIGNMENTS_STATUS.SUCCESS &&
props.assignments[props.selectedClassroom.id] &&
props.assignments[props.selectedClassroom.id].length > 0 &&
students.map((student) => {
...
WTF? When I'm looking at the I2A classrooms as
but the problem is I can't find anything in our code that asks for |
@shaunanoordin I have no idea where those warnings are coming from. It's a mystery to me at the moment! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Review
This PR adds functionality to the "Export Stats" button, which exists inside the Edit Classroom page.
Note the teal "Export Stats" button when we're viewing/editing this Classroom as zootester1.
- Clicking on the Export Stats button prompts the user's browser to download the statistics of the classroom (i.e. the percentage of work done by each student) as a CSV.
- NOTE: This Export Stats function works primarily for I2A classrooms, as the exported CSV is hardcoded for the I2A classes' known structure.
Comments
Overall, this PR looks good, but I had an initial concern that the "Export Stats" feature is making the Classroom Editor common component more specific/hardcoded for I2A.
But then I realised that we never actually followed up on the discussion of shared Classroom components (vs shared Classroom APIs/features/etc), and I need to start properly designing the Darien/Wildcam-specific components and figure out how they should spin off from the existing I2A-specific compos and general app architecture. (Side note: the current ClassroomEditor component might need to be relabelled as AstroClassroomEditor when that happens.)
Status
Anyway, TL;DR, this PR is 👍 and I need to start working on the Darien-specific Classroom components and figure out how 'shared' classroom compos/features can work.
Approved, merging.
|
@shaunanoordin this will likely have to happen because as it is now the ClassroomEditor is really for I2A. I've opened #85 to discuss it. I think a mix of pulling more shared methods into the ducks as well as some refactoring should do it. I'm becoming more comfortable with higher order components, so those could help us out possibly too. |
To be merged after #90. This closes #50. It finishes the export stats class method for the individual classroom edit view. Note: I've renamed the button and method to
Export Stats
andexportStats
because I think we should avoid saying grades anywhere. As a former IT person who worked for a couple of Universities, even implying we store grades could make us vulnerable to complying with student privacy laws. It's up to the teacher if they want to use these stats in their grading, but they aren't grades.