...
Technical Design Details:
Step 1 : Introduce new POST method for QuestionSet Hierarchy API.Enable QuestionSetToken in Question Set Hierarchy API (New API). Mark Question and QuestionSet Objects as “evaluable“
QuestionSet Hierarchy API (POST) : A new API method to be introduced for QuestionSet Hierarchy of Exam Question Sets. This API will have payload as follows
...
“serverEvaluable“ attribute at question and questionSet Object
A new attribute in QuestionSet to be introduced to have evaluated response on server. (“serverEvaluable“).
Code Block |
---|
//Question Set Object "questionSet": { "contentIDserverEvaluable": "", "collectionID": "", "userID": "", true //#true for Server Side Valuation Default:#false for client side validation } //Question Object "question" : { "attemptIDserverEvaluable": "" } |
A new attribute in QuestionSet to be introduced to have evaluated response on server. (“evaluable“). Every QuestionSet Hierarchy will attach “QuestionSetToken“ based on encrypted value of user-id, content-id, collection-id,attempt-id+selected_questionid_list recieved as part of hierarchy payload. This token will further be used to validate the request during response processing on server.
Code Block |
---|
"questionSet": {
"timeLimits": "{\"maxTime\":\"3600\"}",
"questionSetToken": "", //#Question Set token to be generated at hierarchy read API with combination of "Question Set ID + userID"
"evaluable": true //#true for Server Side Valuation Default:#false for client side validation
} |
Info |
---|
QuestionSetToken : This key is almost equivalent of jwt token created as follows: “questionSetToken“ = > { |
Step 2: Introduce responseKey(“Encrypted Value of Correct Response“) instead of correctResponse.value
Question Read API : Any Question Associated with evaluable behaviour to trim off response declaration from Question Set. Instead a responseKey to be shared along with responseDeclaration. responseKey is encrypted value of response. This is permenantly persisted as encrypted. Only QuestionRead API with questionCreator access should be able to access the decrypted value on demand.
Code Block |
---|
"evaluable": true, "responseDeclaration": { "response1": { true } |
Question Create API:
It is possible to permanently mark the question to be “serverEvaluable“ in nature. Any serverEvaluable question would automatically qualify for serverEvaluable question Set. These Questions can be part of Evaluable QuestionSet only.
Info |
---|
KeySet (Futuristic): Any Responses on Question Set can be persisted separately to ensure the keyset can be used for administrative purposes. |
There are two modes of accessing questionSet as per design:
a) non-evaluable mode : Player invokes questionSetHierarchy GET API.
b) evaluable mode : Player would invoke questionSetHierarchy POST API (New API). This change would be used to manage requirements like Question Randomization, Question Token generation etc.
Step 2: Introduce new POST method for QuestionSet Hierarchy API.Enable QuestionSetToken in Question Set Hierarchy API (New API). Mark Question and QuestionSet Objects as “serverEvaluable“
QuestionSet Hierarchy API (POST) : A new API method to be introduced for QuestionSet Hierarchy of Exam Question Sets. This API will have payload as follows
Code Block |
---|
"request": {
"contentID": "",
"collectionID": "",
"userID": "",
"attemptID": ""
} |
Every QuestionSet Hierarchy will attach “QuestionSetToken“ based on encrypted value of user-id, content-id, collection-id,attempt-id+selected_questionid_list recieved as part of hierarchy payload. This token will further be used to validate the request during response processing on server.
Code Block |
---|
"questionSet": {
"timeLimits": "{\"maxTime\":\"3600\"}",
"questionSetToken": "", //#Question Set token to be generated at hierarchy read API with combination of "Question Set ID + userID"
"serverEvaluable": true //#true for Server Side Valuation Default:#false for client side validation
} |
Info |
---|
QuestionSetToken : This key is almost equivalent of jwt token created as follows: “questionSetToken“ = > { |
Step 2: Trim Off correctResponse from Question List API
Question Read API : Any Question Associated with serverEvaluable behaviour to trim off response declaration from Question Set.
Code Block |
---|
"serverEvaluable": true, "responseDeclaration": { "response1": { "maxScore": 1, "cardinality": "single", "type": "integer", -- To be Trimmed off ---- "correctResponse": { "value": "0", "outcomes": { "SCORE": 1 } }, -- To be Trimmed off -- #Newly Introduced Attribute "responseKey": ["#Computed Encrypted Value of the correctResponse"] } }, |
There are multiple attributes which persists correct answer in QuML
a) responseDeclaration: (Shown above)
b) answer
c) editorState
Step 3: Validate only Evaluable Questions to be part of Evaluable Question Set
Question Create API:
It is possible to permanently mark the question to be “evaluable“ in nature. Any evaluable question would automatically qualify for evaluable question Set. These Questions can be part of Evaluable QuestionSet only. Question Read of Evaluable Questions should exhibit the behaviour mentioned above.
Question Creation API should accept the response from the Question Creator to generate the encrypted value of the response created. This responseKey will be persisted along with Question metadata. Since the actual response is encrypted there is no effective mechanism to derive the right answer. Any Subsequent question Read API will only generate responses with encryptString without actual result.
Info |
---|
KeySet (Futuristic): Any Responses on Question Set can be persisted separately to ensure the keyset can be used for administrative purposes. |
...
}, |
There are multiple attributes which persists correct answer in QuML
a) responseDeclaration: (Shown above)
b) answer
c) editorState
Step 3: Introduce QuestionReponseValidate API to process user responses to QuestionSet.
...