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

Implement the coloring of the each bid according to the number of bids made on each of the projects. #1

Open
santoshpavan opened this issue Apr 20, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@santoshpavan
Copy link
Collaborator

No description provided.

@santoshpavan santoshpavan self-assigned this Apr 20, 2020
@santoshpavan santoshpavan added the enhancement New feature or request label Apr 20, 2020
@santoshpavan
Copy link
Collaborator Author

Implementing this using ReviewBid model.

@santoshpavan
Copy link
Collaborator Author

Creating a new model review_bids_controller has the actions specific to the students and the actions specific to the instructors shall be in the lottery_controller.

@santoshpavan
Copy link
Collaborator Author

santoshpavan commented Apr 20, 2020

The view with the colors has been implemented here.
<tr style= <%= "background-color:rgb("+ (400*(1-(Math.tanh(2*@max_team_size.to_f/Bid.where(topic_id:topic.id).count,1].min-1)+1)/2)).to_i.to_s+","+ (400*(Math.tanh(2*[@max_team_size.to_f/Bid.where(topic_id:topic.id).count,1].min-)+1)/2).to_i.to_s+",0)" %>id="topic_<%= topic.id %>"><% end %>
Trying to implement this and see.

@santoshpavan
Copy link
Collaborator Author

santoshpavan commented Apr 20, 2020

The color shade has been implemented in the view of the student.
There is refactoring to be done both in the review_bid.html.erb and review_bids_controller.rb because of this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant