E1844 Issues related to names: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:


Issue #842: Team names created by bidding are incorrect
Issue #842: Team names created by bidding are incorrect
Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsew
Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. Team names generated everywhere must be standardized.
 


Issue #982: Usernames can have spaces in them. And currently, if you create a user with a space in the username, you can't impersonate that user. Expertiza should prohibit spaces in usernames. Implementation should probably just include a format check in the user model, and tests to validate a username.
Issue #982: Usernames can have spaces in them. And currently, if you create a user with a space in the username, you can't impersonate that user. Expertiza should prohibit spaces in usernames. Implementation should probably just include a format check in the user model, and tests to validate a username.
Line 18: Line 17:
=='''Modified Files'''==
=='''Modified Files'''==


==='''Issue #842:'''===
==='''Issue #842'''===


1) app/controllers/lottery_controller.rb
1) app/controllers/lottery_controller.rb
Line 28: Line 27:
4) spec/models/team_spec.rb
4) spec/models/team_spec.rb


==='''Issue #982:'''===
==='''Issue #982'''===


1) app/models/user.rb
1) app/models/user.rb
Line 35: Line 34:


----
----
=='''Approach used to resolve the issues'''==
==='''Issue #842 '''===
Teams are generated within Expertiza in various scenarios. Teams are generated for every assignment, and team names are generated in various formats at several places in the bidding code. Also, automatic generation of teams for assignment follows a different team name format.

Revision as of 22:22, 2 November 2018

Introduction

Problem Statement

In Expertiza, teams are created for every homework. Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. The team names should be of the form "Team_random_number". Also currently, the usernames can have spaces in them but then you cannot impersonate that user. The expertiza should prohibit spaces in usernames.


Issues to be fixed

Issues as described by the problem statement:

Issue #842: Team names created by bidding are incorrect Somewhere in the bidding code, or the code that assigns topics based on bids, team names are generated. In this case, team names are not appended to the name of the assignment, like they are when teams are created elsewhere in the code. Team names generated everywhere must be standardized.

Issue #982: Usernames can have spaces in them. And currently, if you create a user with a space in the username, you can't impersonate that user. Expertiza should prohibit spaces in usernames. Implementation should probably just include a format check in the user model, and tests to validate a username.


Modified Files

Issue #842

1) app/controllers/lottery_controller.rb

2) app/controllers/suggestion_controller.rb

3) app/models/team.rb

4) spec/models/team_spec.rb

Issue #982

1) app/models/user.rb

2) spec/models/user_spec.rb


Approach used to resolve the issues

Issue #842

Teams are generated within Expertiza in various scenarios. Teams are generated for every assignment, and team names are generated in various formats at several places in the bidding code. Also, automatic generation of teams for assignment follows a different team name format.