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

Instructor: enroll students: allow same team name across sections #2618

Open
damithc opened this issue Oct 7, 2014 · 4 comments
Open

Instructor: enroll students: allow same team name across sections #2618

damithc opened this issue Oct 7, 2014 · 4 comments
Labels
a-Storage Database schema, Datastore-related technologies/quirks committers only Difficult; better left for committers or more senior developers p.Medium Marginal impact; would like to do if time permits
Milestone

Comments

@damithc
Copy link
Contributor

damithc commented Oct 7, 2014

'team 1' in tutorial 1 should be considered different from 'team 1' in tutorial 2

@damithc damithc added t.Enhancement p.Medium Marginal impact; would like to do if time permits labels Oct 7, 2014
@damithc damithc added a-UIX User Interface, User eXperience, responsiveness committers only Difficult; better left for committers or more senior developers f.Courses labels Dec 22, 2014
@damithc damithc removed the s.Accepted label Feb 6, 2016
@damithc damithc changed the title allow same team name across sections Instructor: enroll students: allow same team name across sections May 6, 2017
@damithc damithc added a-Storage Database schema, Datastore-related technologies/quirks and removed a-UIX User Interface, User eXperience, responsiveness labels May 10, 2017
@Haozhe321
Copy link
Contributor

@damithc this would change the following method

private String getTeamInvalidityInfo(List<StudentAttributes> mergedList) {
StudentAttributes.sortByTeamName(mergedList);
List<String> invalidTeamList = new ArrayList<>();
for (int i = 1; i < mergedList.size(); i++) {
StudentAttributes currentStudent = mergedList.get(i);
StudentAttributes previousStudent = mergedList.get(i - 1);
if (currentStudent.team.equals(previousStudent.team)
&& !currentStudent.section.equals(previousStudent.section)
&& !invalidTeamList.contains(currentStudent.team)) {
invalidTeamList.add(currentStudent.team);
}
}
StringBuilder errorMessage = new StringBuilder(100);
for (String team : invalidTeamList) {
errorMessage.append(String.format(Const.StatusMessages.TEAM_INVALID_SECTION_EDIT,
SanitizationHelper.sanitizeForHtml(team)));
}
if (errorMessage.length() != 0) {
errorMessage.append("Please use the enroll page to edit multiple students");
}
return errorMessage.toString();
}

In that case, what would constitute an invalid team info?

@damithc
Copy link
Contributor Author

damithc commented Mar 16, 2018

In that case, what would constitute an invalid team info?

Nothing I guess. However, note that we need to tweak our UI (and the logic) in many place to distinguish multiple teams with the same name but in different sections. e.g., show sec1/team1 instead of showing team1 only.

@Haozhe321
Copy link
Contributor

Should a new variable be added in TeamDetailsBundle class, i.e. the sectional this team belongs to?
One consideration of this is backwards compatibility with students created before this change takes place.

Since this is a big change, I want to be clear of the steps taken. Here are some of the areas that would be affected by the change. Let me know if there are other considerations. Right now I have

  1. UI of team name for feedback result (every time a team name needs to be displayed, it has to be accompanied with the section name as well)
  2. Feedback path to own team and other teams(a team name cannot uniquely determine the team of the student anymore, the section name would be needed)

How should I proceed to solve this issue systematically i.e. which part of the code base should be changed before the others?

@wkurniawan07 would love to have your input on this as well!

@wkurniawan07
Copy link
Member

@Haozhe321 TeamDetailsBundle is not persisted to DB; modifying it should not have any backward-incompatibility issue.

I'm not familiar with this feature myself, but if anything, the result should be the last of all the worries (i.e. worry about the POST before the GET), so the first thing to loosen the criteria for team name uniqueness when adding new teams. Afterwards all code which retrieve team information by name only should be changed to retrieving by name and section name.

@wkurniawan07 wkurniawan07 added this to the V9.0.0 milestone May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-Storage Database schema, Datastore-related technologies/quirks committers only Difficult; better left for committers or more senior developers p.Medium Marginal impact; would like to do if time permits
Projects
None yet
Development

No branches or pull requests

4 participants