quickhac / qhac-common

Common libraries for use in QuickHAC applications
3 stars 1 forks source link

Refactor login process #9

Closed xsznix closed 10 years ago

xsznix commented 10 years ago

Make the login process two-step:

  1. GradeRetriever.login(username, password, [callbacks]), which returns DisambiguationOption { string name, string studentid } if there are multiple students to be selected or null if there is only one student;
  2. Graderetriever.disambiguate(studentid, [callbacks])

This way, the user will be able to select their name from a list of students instead of having to enter a student ID at login.

This will break existing code.

xsznix commented 10 years ago

Implemented in TypeScript with commit b0e8b428cdd7fb94ee05825ec1d21cc3beee1649 and Java with commit 2093a2535108ffaeef3f0af942458d2411741099.