SMILEConsortium / node-smile-server

3 stars 4 forks source link

Allow session to use questions from students not in session IF we loaded the questions from an iqset #62

Closed truedat101 closed 10 years ago

truedat101 commented 10 years ago

Right now we throw an error if we load any question sets from any student not in the session. If we are loading from IQSet, then we should be able to ignore this rule.

truedat101 commented 10 years ago

Error is: Error handling: PUT /smile/question, Details: [Error: The question provided refers to nonexistent student: 127.0.0.1, name=gfqyicke2956]

truedat101 commented 10 years ago

The right way to fix this is to not check to see if the user is a teacher submitting the message, but to check for a sessionID in the request. The thought is that only the teacher would have the ability to generate a valid sessionID. Presumably we'd want to validate the sessionID (has one been created, does this one exist?).

truedat101 commented 10 years ago

Verified this works.