The Activity Engine is responsible for managing data generated by student interactions, such as attempts, answers, metrics, and grading results. It works in conjunction with the Core Engine, which is the source of truth for courses, users, and assessments metadata.
- Core Engine (Django API): This is the source of truth for courses, users, and assessments metadata. It knows what assessments exist, what questions they contain, and which students are enrolled.
- Activity Engine (Express API): This manages data generated by student interactions, including attempts, answers, metrics, and grading results.
In the Activity Engine, endpoints are designed around the primary entities that this service owns:
- Assessment Attempts: Representing a student’s interaction with an assessment.
- Answers: Student’s responses submitted during an attempt.
- Metrics: Student’s activity metrics (video views, violations, etc.).
- Grading: Processes and results associated with attempts.
All references to students, courses, and assessments can rely on IDs that originate from the Core Engine. The Activity Engine doesn't need to manage the details of those entities—it just stores relationships and user-generated content tied to those IDs.
Since the Core Engine holds the master data, the Activity Engine may need to:
- Validate references (like
courseInstanceId,assessmentId,studentId) by calling the Core Engine or trusting that the front-end only provides valid references. - Potentially call the Core Engine if it needs confirmation about assessment structure or other metadata, or keep a local cache if performance is a concern.
To access the API documentation for the Activity Engine, follow these steps:
- Navigate to the root directory of the Activity Engine project.
- Open in Dev Container
- Once the container starts run the following commands-
npm install npx prisma migrate dev --name init
- Open your web browser and go to
http://localhost:9000/referenceto view the API documentation.
The Activity Engine is designed to manage and store data generated by student interactions, while the Core Engine maintains the master data for courses, users, and assessments. By following the guiding principles and utilizing the provided API endpoints, you can effectively integrate and manage student activity data within your application.