-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Spreadsheet Interface for Student Data UI: Section field should not be compulsory during enrollment #8994 #8996
Conversation
487a7de
to
821b8ad
Compare
@wkurniawan07 @tran-tien-dat Ready for review. |
Let's try to include this in the upcoming release @xpdavid FYI |
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.
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"); |
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.
Are there better names for the 2 pages beside "First" and "Second"?
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.
Hmm I can't think of any that won't result in a long file name. Any other possible suggestions?
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.
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; | ||
} | ||
|
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.
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.
Ready for review again. |
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.
LGTM
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.
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. */ |
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.
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.
Ready to merge :) |
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.
LGTM
Fixes #8994
Outline of Solution
StudentAttributesFactory
to address empty sections during enrollment.InstructorCourseEnrollPageUiTest
to verify success of enrolling students with no sections.