cammiida / ProgramvareUtviklingGroup50

BSD 2-Clause "Simplified" License
0 stars 2 forks source link

API: Always chose the first answer, answer for the bot is not updated if teacher updates it. #16

Open helemork opened 7 years ago

helemork commented 7 years ago

When a teacher first answers a question, this is saved to the database. If the same or a similar question is asked again, the Thoth Bot uses a native learning api to reply with the already existing answer.

If however the teacher later changes his answer, this is not updated to the Thoth Bot field in the database, and it still replies with the first answer.

If the same question has been answered several times, the bot always returns the first answer, not the newest or all. This could maybe have been solved differently.

hkgrov commented 7 years ago

Have now solved the problem that the api answer didn't change when a teacher changed his answer. This is a quick fix that relies on that two completely different questions does not have the same answer. To solve the problem so that api could fetch more than one answer the database need changes that would I don't want to focus on now. I don't think this is the major flaw, but is something that can be worked on if we got time later