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

Assignment Updates: assign button assigns a course #31385

Merged
merged 11 commits into from Oct 24, 2019

Conversation

Erin007
Copy link
Contributor

@Erin007 Erin007 commented Oct 21, 2019

Description

This PR leverages existing edit section details functions from teacherSectionsRedux so that the AssignButton actually assigns a course in the context of the course overview page to the section selected from the dropdown.

assign-button

Links

Testing story

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@Erin007 Erin007 changed the title WIP for assigning a course Assignment Updates: assign button assigns a course Oct 22, 2019
Copy link
Contributor

@dmcavoy dmcavoy left a comment

Choose a reason for hiding this comment

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

LGTM Erin. One question: Why did you switch away from the AssignedButton?

@Erin007
Copy link
Contributor Author

Erin007 commented Oct 22, 2019

LGTM Erin. One question: Why did you switch away from the AssignedButton?

Good question. I'm getting nervous about the on-hover unassign UI since it's inconsistent with other UI across the site so I swapped it to show Mark and Amanda. We might to keep it like this and add a separate in-line unassign button or switch back to the hover way it was.

Copy link
Member

@davidsbailey davidsbailey left a comment

Choose a reason for hiding this comment

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

Great work Erin!

Comment on lines +69 to +71
{
assignCourseToSection
}
Copy link
Member

Choose a reason for hiding this comment

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

Comment on lines +68 to +73
{selectedSection.isAssigned && (
<span style={styles.assigned}>
<FontAwesome icon="check" />
{i18n.assigned()}
</span>
)}
Copy link
Member

Choose a reason for hiding this comment

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

The new UX looks good to me!

@@ -140,6 +140,20 @@ export const toggleSectionHidden = sectionId => (dispatch, getState) => {
return dispatch(finishEditingSection());
};

/**
* Assigns a course to a given section, persisting these changes * to the server
Copy link
Member

Choose a reason for hiding this comment

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

nit: stray * near end of line

Comment on lines +152 to +154
dispatch(beginEditingSection(sectionId, true));
dispatch(editSectionProperties({courseId: courseId}));
return dispatch(finishEditingSection());
Copy link
Member

Choose a reason for hiding this comment

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

very creative! this is a bit roundabout, since it is piggybacking off of actions that are designed for the edit section form. but as long as we are only doing actions that are a subset of what we can do in that form, then it seems like this should work fine (and also later for assigning scripts).

Copy link

@clareconstantine clareconstantine left a comment

Choose a reason for hiding this comment

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

Looks good!

@Erin007 Erin007 merged commit 17f70bd into staging Oct 24, 2019
@Erin007 Erin007 deleted the assign-button-assigns-course branch October 24, 2019 00:29
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.

None yet

4 participants