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

Spreadsheet Interface for Student Data UI: Section field should not be compulsory during enrollment #8994 #8996

Merged

Conversation

tanhengyeow
Copy link
Member

Fixes #8994

Outline of Solution

  1. Added logic and comments in StudentAttributesFactory to address empty sections during enrollment.
  2. Updated InstructorCourseEnrollPageUiTest to verify success of enrolling students with no sections.

@tanhengyeow tanhengyeow force-pushed the 8994-section-field-not-compulsory branch from 487a7de to 821b8ad Compare July 27, 2018 11:09
@tanhengyeow
Copy link
Member Author

@wkurniawan07 @tran-tien-dat Ready for review.

@damithc
Copy link
Contributor

damithc commented Jul 28, 2018

Let's try to include this in the upcoming release @xpdavid FYI

@xpdavid xpdavid added this to the V6.8.0 milestone Jul 28, 2018
@xpdavid xpdavid added the s.ToReview The PR is waiting for review(s) label Jul 28, 2018
Copy link
Contributor

@tran-tien-dat tran-tien-dat left a comment

Choose a reason for hiding this comment

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

A small suggestion

@@ -90,7 +90,7 @@ private void testEnrollAction() throws Exception {
InstructorCourseEnrollResultPage resultsPage = enrollPage.enroll(enrollString);

// This is the full HTML verification for Instructor Course Enroll Results Page, the rest can all be verifyMainHtml
resultsPage.verifyHtml("/instructorCourseEnrollPageResult.html");
resultsPage.verifyHtml("/instructorCourseEnrollFirstPageResult.html");
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there better names for the 2 pages beside "First" and "Second"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm I can't think of any that won't result in a long file name. Any other possible suggestions?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's okay for the names to be long, since they are already pretty long and some other HTML file names are pretty long too. Can just be sth like ...AllFields or ...EmptySection

if (columns[sectionColumnIndex].isEmpty()) {
hasSection = false;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like this approach, as I think these has... variables should purely reflect the status of the header row. You can just add a && !columns[sectionColumnIndex].isEmpty() to the check below.

@tanhengyeow
Copy link
Member Author

Ready for review again.

Copy link
Contributor

@tran-tien-dat tran-tien-dat left a comment

Choose a reason for hiding this comment

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

LGTM

@tran-tien-dat tran-tien-dat added s.FinalReview The PR is ready for final review and removed s.ToReview The PR is waiting for review(s) labels Jul 29, 2018
Copy link
Contributor

@damithc damithc left a comment

Choose a reason for hiding this comment

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

Just a nit. Can merge after that.

if (hasSection && columns.length > sectionColumnIndex) {
/* Since the migration to spreadsheet interfaces, section header index will always be present.
Therefore, if the user chooses not to include a section entry in the student row during enrollment,
we treat it that the student has no section. */
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally, a future reader of this comment should not need to know there was a data migration in the past. Code comments should explain the current state irrespective of what happened in the past.

@tanhengyeow
Copy link
Member Author

Ready to merge :)

Copy link
Member

@wkurniawan07 wkurniawan07 left a comment

Choose a reason for hiding this comment

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

LGTM

@wkurniawan07 wkurniawan07 added s.ToMerge The PR is approved by all reviewers including final reviewer; ready for merging and removed s.FinalReview The PR is ready for final review labels Jul 29, 2018
@xpdavid xpdavid merged commit 08820f1 into TEAMMATES:master Jul 30, 2018
@xpdavid xpdavid added the c.Feature User-facing feature; can be new feature or enhancement to existing feature label Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c.Feature User-facing feature; can be new feature or enhancement to existing feature s.ToMerge The PR is approved by all reviewers including final reviewer; ready for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants