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

New Feature: Cafeteria Ratings #50

Closed
tobiasjungmann opened this issue Apr 13, 2022 · 6 comments
Closed

New Feature: Cafeteria Ratings #50

tobiasjungmann opened this issue Apr 13, 2022 · 6 comments

Comments

@tobiasjungmann
Copy link
Collaborator

Problem

The existing eat-api does not provide any information about the quality of the cafeterias and the individual dishes. Therefore, I suggest a new functionality of the API here in the campus backend.

Suggested Feature ✨

As well-known from other websites, a rating on a scale (e.g. 4 out of 5) for the quality of the food should be possible. In addition to a simple "star" rating, it should also be possible to include a small (text) comment (e.g "It was too crowded at around 1PM!").

In order to create the frame for such a rating system, the existing API must be extended and in order to persistently store the ratings and use them when needed, the database must be extended.

Accordingly, two primary API calls need to be added:

  • Create a new rating for a refectory or dish - provide cafeteria id.
  • Query all ratings for a cafeterias/dish. - using an id of the refectory and the potentially the name of the dish.

To store the data for ratings, two new tables need to be inserted: One for canteen ratings, one for dish ratings:

  • Database schema for the table with ratings per refectory:
    • Points (numbers from 1 to 5)
    • Perceived price (numbers from 1 to 5)
    • ID of the refectory - number
    • Comments (limited to 200 characters) - string
  • Database schema for the table with ratings per dish:
    • Points (values from 1 to 5)
    • Perceived price (values from 1 to 5)
    • ID of the canteen - number
    • Name of the dish - string
    • Comments (limited to 200 characters) - string

The average rating is calculated separately for each refectory/dish and can be added to the eat-api as additional information, just like the allergies.

The following three topics are still unresolved and I will specify them in more detail in the near future:

  • Preventing spamming vs. user anonymity was/not collecting user data.
  • Editing own comments/reviews vs preventing unique identification. - (Most likely: generate a token that is returned for a rating. This token can then be used to edit the message. If a user loses the token, it cannot be recovered. Any tokens could be stored in campus apps, for example).
  • A way to efficiently delete individual, unhelpful and unwanted reviews by authorized individuals.

I will expand this issue over time, clarify the open issues and then implement it. As a second step, I plan to integrate this assessment option into the Campus App (Android). Further ideas, improvements or criticism are always welcome! :-)

@barisconur
Copy link

I am going to work on this issue in the following weeks.

@tobiasjungmann
Copy link
Collaborator Author

Hey Baris,
As stated in the isssue, "I will expand this issue over time, clarify the open issues and then implement it." I already started planning and designing a more detailed solution than stated in this issue. It would be great if you would choose another issue or we have to meet up, discuss the current ideas and ideally split it in individual sub parts.

@barisconur
Copy link

@tobiasjungmann We can discuss and split into smaller pieces. I am actually new in the repository and it is a good opportunity for me to discuss the issue with you.

@tobiasjungmann
Copy link
Collaborator Author

@barisconur I wrote you a message on Zulip.

@tobiasjungmann tobiasjungmann mentioned this issue Jun 12, 2022
5 tasks
@CommanderStorm
Copy link
Member

@tobiasjungmann is this issue resolved, given that #70 is merged? (can I close this?)

@CommanderStorm
Copy link
Member

I am going to close this as I think this is resolved and we just forgot to close it in #70.
Feel free to ping me if this was a mistake ^^

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

No branches or pull requests

3 participants