SMILEConsortium / smile_teacher_android

The SMILE Teacher Android App
http://www.smileconsortium.org
Apache License 2.0
1 stars 2 forks source link

Deletion of a question delete in a group of questions will delete half the questions #100

Closed truedat101 closed 10 years ago

truedat101 commented 10 years ago

From @chrqls :

There is a problem. Here is what I did. A single student added 10 questions : A B C D E F G H I J I chose to delete question 'C' but it deleted 5 questions: A, C, E, G and I (A B C D E F G H I J) Then, I tried to delete question 'D' but it deleted B, F and J ( B D F H J)

truedat101 commented 10 years ago

Most likely this is a bug on the server. We should add enough debug to see what question # is requested for deletion. And then make sure the routine for deletion isn't failing.

truedat101 commented 10 years ago

We can close this if it isn't related to the fix for #91 and #92 and #93.

truedat101 commented 10 years ago

Here's the problem:

/src/main/java/org/smilec/smile/domain/Question.java

Part of the problem is that suddenly, we convert values for the Question into JSON based on class member names. While the choice of the new name is good, we want to be consistent. The code on the server is expecting mSessionID.

truedat101 commented 10 years ago

I like this change, anyway, it's more clean. So I'll fix the JSON on the server.

truedat101 commented 10 years ago

Fixed on server in: https://github.com/SMILEConsortium/node-smile-server/commit/a235fec69f82694a42e2027b6071063009f58fa0

chrqls commented 10 years ago

I am sorry for this mistake. I did not noticed the class was a Wrapper. Thank you for changing server