Introduction:
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.
Solution -1: Assessment Samza job and Data product
Diagram:
As per the above diagram, Router job should route all ASSESS
events into Assessment Samza Job
which compute and update the RDBMS table.The assessment data product which read and joins the data from multiple tables and will generates the assessment report per batch and uploads to azure cloud storage.
Disadvantages:
- When pipeline is having huge lag,Then report will be wrong
Solution - 2: API and Data product
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.
API:
METHOD: POST URI: action/data/v3/assess/telemetry BODY: { "id": "sunbird.telemetry", "ver": "3.0", "ets": 1566884714550, "events": [] // Only ASSESS Events }
Disadvantages:
- Need to
validate
andde-dup
the the events.
Table Schema:
CREATE TABLE assessment_histroy( batch_id: text // Batch identifier. user_id: text, // User Identifier. attempt_id: index, // Question Attempt identifier, To track the number of attempts on that question. course_id: text, // Course Identifier. assessment_id: text // Identifier of the assessment/content/worksheet assessment_name: text // Name of the assessment/content/worksheet question: jsonb // array[objects] // Question details spec object date_time: timestamp // Time stamp, To know last updated time. PRIMARY KEY (batch_id, user_id, course_id, assessment_id) )
Question object :
question:{ "qid": "do_957399094343", "max_score": 5, "score": 2, "type" :"mcq/mmcq/ftb/mtf", "title": "Choose valid odd number" "pass": "Yes"/"No", "desc":"Description of the question", "duration": 5 }
Challenges:
- How to capture the
attempts? i.e. Number of times the particular user is attempted particular question.
- How to capture the
batch-id
andcourse-id