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

Darien Classrooms & Assignments Mk2 - Part 2 #114

Closed
wants to merge 3 commits into from

Conversation

shaunanoordin
Copy link
Member

@shaunanoordin shaunanoordin commented Dec 20, 2017

PR Overview

This PR plans to improve the WildCam Darien Lab's Classrooms and Assignments systems, following up from Part 1 in #107 . I have an eye on making a generalised 'WildCam' Classroom & Assignment system (as opposed to being Darien-specific) but we'll see how that generalisation goes.

Goals:

  • Educators can create & edit Darien-specific Classrooms.
  • Educators can create & edit Darien-specific Assignments.
  • [major] Educators can select Subjects from the Map Explorer to create Assignments.
  • [code][long-term]

Expected BIG STUFF that needs handling:

NOT in the scope:

  • Students pages. (i.e. "view my Assignments, view my Classrooms")

Status

WIP

@shaunanoordin
Copy link
Member Author

PR Update

I'm stopping development on this branch so it can be properly reviewed; of note, I'd seriously appreciate the reorganisation of components having a look-over. 👍

There's only one outstanding feature that will be spun off into its own PR:

  • [major] Educators can select Subjects from the Map Explorer to create Assignments.

That feature was a bit buggy because I was trying something smart (i.e. dumb) with the storage of Subject selection, so I'll resort to something simpler later.

Also, Minor Weirdness:

  • You can't add a new Darien Assignment after you created one. That's just a bad copy-paste that didn't account for different class logic.
  • You'll notice some strange naming conventions, (some compos called wildcamdarien, others just wildcam) as I was originally trying to spin off several of the WildCam Darien components into generic WildCam components (i.e. ready for WildCam Gorongosa Lab to roll in) but there were some issues, e.g. the Join Link being hardcoded.

Status

Ready for review, with further features to be taken care of later.

@shaunanoordin shaunanoordin requested a review from srallen January 8, 2018 17:59
Copy link
Contributor

@srallen srallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is largely duplication of the original components in the folders classrooms, this is mostly good to go. I'd like to have a better understanding of what the plan is for the Wildcam container components that hold the React lifecycle methods handling the API calls. Will the new Wildcam containers for the classrooms differentiate from the I2A needs? If so, then split makes sense. If not, then they should be shared somehow so we aren't duplicating code. I mostly wrote them with the intention that the API calls are shared. Should these move eventually into the classroom or assignments ducks to be shared there instead?

The views I understand will need to be different, especially the classroom editor since there aren't a fixed number of assignments. I'm not sure if @beckyrother has any time for input there, but if she does, it might be good to consult about it. I don't think a table will work if there's an unknown number of assignments.

The ClassroomForm I don't think needs its own Wildcam version? Unless you're planning on having fields specific to Wildcam?

You already know about the assignment creation weirdness on the WildcamClassroomManager, but I'll note what I'm seeing for subsequent PRs:

  • The assignment list didn't update after the create form was submitted. I had to refresh to see the newly created assignment.
  • Some CSS needs adjusting with the assignment delete button placement. It's not centered in its table cell.
  • Should the edit button be after the assignment name? It just seems a bit odd to see the edit button for the classroom before the classroom name and the opposite with assignments
  • The form doesn't load up the current assignment for editing if you click the edit button

? props.assignments[props.selectedClassroom.id]
: [];

const programURL = props.match.url.split('/'); // Remove once programs is in place with API
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this is a comment I left for myself in the original ClassroomEditor. Non-blocker for this PR, but programs are in place now so this should be addressed. I think the slug property on programs would be used instead.

<th id="student-name" scope="col">
<span className="headers__header">Student Name/Zooniverse ID</span>
</th>
<th id="assignment-galaxy" scope="col">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wildcam would have different headers, so this id needs to be different.

<th id="assignment-galaxy" scope="col">
ABC
</th>
<th id="assignment-hubble" scope="col" >
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment about header id.

? <span>{student.zooniverseDisplayName}</span>
: <span className="secondary">{student.zooniverseLogin}</span> }
</td>
<td headers="assignment-galaxy">ABC</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment about the header id

: <span className="secondary">{student.zooniverseLogin}</span> }
</td>
<td headers="assignment-galaxy">ABC</td>
<td headers="assignment-hubble">ABC</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment about the header id.

removeStudentFromClassroom: () => {},
//----------------
showConfirmationDialog: false,
showCounts: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably doesn't apply?

removeStudentFromClassroom: PropTypes.func,
//----------------
showConfirmationDialog: PropTypes.bool,
showCounts: PropTypes.shape({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably doesn't apply for Wildcam.


return Actions.createClassroom(classroomData)
.then((classroom) => {
if (!this.props.selectedProgram.custom) {
Copy link
Contributor

@srallen srallen Jan 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only applies to I2A (a program with custom: false set). This is non-blocking comment and in my overall PR review, I'll go into the shared API request needs more.

@shaunanoordin
Copy link
Member Author

PR Update

This PR has been made obsolete by the new updates made in PR #122, #123, #124, and #125. These newer updates separate the WildCam components into their own independent modules, which are easier to extend into different WildCam classrooms (e.g. WildCam Darien, WildCam Gorongosa, etc)

@shaunanoordin shaunanoordin deleted the darien-classrooms-pt2 branch July 2, 2018 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants