Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

attemptId: Should be generated from Hashing HASH(courseId, userId, contentId, batchId, ets)


Code Block
languagejs
themeFadeToGrey
titleAPI Response
linenumberstrue
{
 	   "id": "api.coursecontent.assessmentstate.update",
	    "ver": "1.0v1",
    "etsts":1566974765224,
	 "2019-09-04 12:47:08:954+0000",
    "params": {},
	
        "resmsgid": null,
        "msgid": "bec2defc-ddca-7b37-6a24-1dcbdfb23d48",
        "err": null,
        "status": "success",
        "errmsg": null
    },
    "responseCode": "OK",
    "result": {
        "<contentId>": "SUCCESS"
    }
}



Disadvantages:

  1. Need to validate and de-dup the the events.

...

Code Block
themeFadeToGrey
titleassessment_profile
linenumberstrue
CREATE TABLE assessment_aggregator (
    batch_id text,
    user_id text,
    course_id text,
    content_id text,
    attempt_id text,
    updated_on timestamp,
    created_on timestamp,
    last_attempted_on timestamp,
    total_score int,
    total_max_score int,
    question list<frozen<question>>,
    PRIMARY KEY (content_id, attempt_id, user_id, course_id, batch_id )
)

CREATE INDEX ON assessment_aggregator (last_attempted_on);

CREATE TYPE question(
    id text,
    max_score int,
    score int,
    type text,
    title text,
    resvalues frozen<list<map<textlist<map<text,text>>>text>>,
    params frozen<list<map<textlist<map<text,text>>>text>>,
    description text,
    duration decimal
);


...