Repository navigation
feat(Grading Tool): Teacher Reflection Questions - #364
Merged
Merged
Conversation
19 tasks
Member
Author
|
🎉 This PR is included in version 1.26.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces the backend support for Teacher Reflection Questions. It allows teachers to retrieve reflection questions configured for a step component in a run/period and submit answers associated with their teacher workgroup.
Changes
1. Database Migration
V3__create_teacher_reflections_table.sql):teacher_reflectionstable to persist reflection questions and answers.id,runId,periodId,nodeId,componentId,componentType,questionId,questionText,answerText,answeredByWorkgroupId,createdAt,updatedAt.teacherReflectionsUniqueKeyon(runId, periodId, nodeId, componentId, questionId).runs(id),groups(id), andworkgroups(id).runId.2. Domain & Data Access
Run,Group(period), andWorkgroup.getQuestions(Run, Group, String nodeId, String componentId): Retrieves all reflection entries for a given component in a run period.getQuestion(Run, Group, String nodeId, String componentId, String questionId): Retrieves a specific reflection question entry.3. Service Layer
saveAnswer).4. REST API Controller
/api/teacher/reflectionsecured with@PreAuthorize("hasRole('ROLE_TEACHER')").GET /api/teacher/reflection: Fetches reflection entries for a run, period, node, and component. Requires permission to view student work.PUT /api/teacher/reflection/answer: Saves/updates a reflection question answer. Requires grading permissions, validates that the period and workgroup belong to the run, and verifies the workgroup is a teacher workgroup.5. Automated Tests
400 Bad Request), and successful request/response mapping.Test
Note: Test with WISE-Community/WISE-Client#2352. Follow the testing instruction there.
mvn test -Dtest=TeacherReflectionAPIControllerTest,TeacherReflectionServiceImplTest,HibernateTeacherReflectionDaoTest