Introduction:
This documentation describes about the generation of the batch wise assessment report within the course. 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 from the table 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:
API Request
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:
History 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 assessment_name: text // Name of the assessment/content question: jsonb // array[objects] // Question details spec object datetime: timestamp // Time stamp, To know last updated time. PRIMARY KEY (batch_id, user_id, course_id, assessment_id) )
Question object :
Question object structure
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