Versions Compared

Key

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

...

This documentation describes about the generation of the batch wise assessment report within the course. The report should generate with below fields. For more detail refer this PRD.


Code Block
languagejs
themeFadeToGrey
titleReport fields
linenumberstrue
collapsetrue
External ID //  External ID is the state ID provided by state for a teacher
User ID // User Identifier
User Name 
Email ID
Mobile Number
Organisation Name
District Name
School name 
Assessment Name // Name of the assessment/worksheet/content 
Total Score // Total score of the all assessment in a course( Eg: 2/3+3/4+2/3=7/10 )

...

As per the above diagram, End user will sync the assess events through api, which will update the database with computed values. The assessment data product which read data from the database and will generate the reports per batch and uploads to azure cloud storage.


Assessment update API:


Code Block
languagejs
themeFadeToGrey
titleAPI Request
linenumberstrue
METHOD: POSTPATCH 
URI: /coursev1/v1content/assessmentstate/update // End point
REQUEST: {
    "idrequest": "api.course.assessment.update"{
        "contents": [ ],
  "ver": "1.0",
  "ets": 1566884714550      "assessments": [
            {
 				"assessmentTs": 1567591211000, //TimeAssessment stamptime in ms epoch
              "request": [{ 		"batchId":"", // Batch Identifier - required
				"courseId":"", // Course Identifier - required
	  			"userId":"",  // User Identifier - required
	  			"attemptId":"", // Attempt Identifier - required
	  			"contentId": "", // Content Identifier
		 - required
                "events": [{} ]	 //ONLY ASSESS Events - required
           	},
	...], }
        ]
    }

}}


Request Structure:

Events related to particular to batchId, courseId, userId, attemptId, contentId should be grouped together while calling this API.

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


Code Block
languagejs
themeFadeToGrey
titleAPI Response
linenumberstrue
{
    "id": "api.coursecontent.assessmentstate.update",
    "ver": "1.0v1","ets":1566974765224,
    "ts": "2019-09-04 12:47:08:954+0000",
    "params": {
        "resmsgid": null,
        "msgid": "bec2defc-ddca-7b37-6a24-1dcbdfb23d48",
        "err: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
);


...