Navigation Menu

Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

User feedback per question #102

Closed
maxsv0 opened this issue Dec 29, 2019 · 8 comments
Closed

User feedback per question #102

maxsv0 opened this issue Dec 29, 2019 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@maxsv0
Copy link
Owner

maxsv0 commented Dec 29, 2019

Provide a possibility for the user to vote for the quality of questions of a test that he has passed.

  • classroom seems the most appropriate place for this feature
  • allow a user to vote with a star in range 1-5
  • after the user voted, provide a possibility to write a text comment and submit it together with a rating.

I don't think there is a need to display this rating on the website right now, it's mostly to determine questions quality and to change questions database accordingly.

@maxsv0 maxsv0 added the enhancement New feature or request label Dec 29, 2019
@maxsv0 maxsv0 added this to To do in Milestone 3. Improvements via automation Dec 29, 2019
@Aisangon
Copy link
Collaborator

@maxsv0 look at this, i could build this as a custom component https://www.cssscript.com/demo/simple-5-star-rating-system-with-css-and-html-radios/, it works with fontawesome. Do we need a new endpoint for this or how do you imagine this working for the backend?

@Aisangon Aisangon moved this from To do to In progress in Milestone 3. Improvements Apr 21, 2020
@Aisangon Aisangon self-assigned this Apr 21, 2020
@Aisangon
Copy link
Collaborator

I created the basic rating component for test result, when you can, you can create the api endpoint for it: this would be my request body, what do you think?

id: Answer["id"]; score: number; comment: string; rated: boolean;

if user has already rated the question, rated would just be true and couldn't submit rating again

Aisangon pushed a commit that referenced this issue Apr 25, 2020
@maxsv0
Copy link
Owner Author

maxsv0 commented Apr 26, 2020

API is not ready yet, I'll update when available.
Endpoint URL would be
https://www.mega-iq.com/api/v1/user/feedback

method POST, Content-Type: application/json, user token is required.

example body:

{
  test: "dff26adf-1d7e-4d3e-9c36-b668612eb49a",
  question: 1,
  score: 5,
  comment: "simple comment"
}

rated: boolean; is redundant cause we could allow users to vote as many times as they want.
id should be a question id, in fact not an id but a question number.
answerId API would extract from a DB having a test code and question number.

@Aisangon
Copy link
Collaborator

@maxsv0 okay i understand, so a user should be able to rate the same question again even when he might have already. how would the successful API response look like?

@maxsv0
Copy link
Owner Author

maxsv0 commented Apr 28, 2020

I think status code 200 is enough.
No response body, just a status code 200 in the header.

@Aisangon
Copy link
Collaborator

Aisangon commented May 1, 2020

@maxsv0 great, let me know when it's ready 👍 I have the frontend pretty much ready to go

Aisangon pushed a commit that referenced this issue May 1, 2020
@maxsv0
Copy link
Owner Author

maxsv0 commented May 3, 2020

@Aisangon API updated, please try

@Aisangon
Copy link
Collaborator

Aisangon commented May 3, 2020

@maxsv0
1
2

maxsv0 pushed a commit that referenced this issue May 3, 2020
* add star rating, comment section and submit directive - #102

* add rating model - #102

* add post user feedback post request - #102 

* fix fontawesome bug, minor refactoring - #102

* remove redundant user token and header from user service - #102
@Aisangon Aisangon closed this as completed May 3, 2020
Milestone 3. Improvements automation moved this from In progress to Done May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants