Skip to content

Rubric Grading: context UI improvements and minor fixes#8490

Merged
adi-herwana-nus merged 3 commits into
masterfrom
adi/rubric-grading-context-ui-updates
Jul 20, 2026
Merged

Rubric Grading: context UI improvements and minor fixes#8490
adi-herwana-nus merged 3 commits into
masterfrom
adi/rubric-grading-context-ui-updates

Conversation

@adi-herwana-nus

@adi-herwana-nus adi-herwana-nus commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Migration contains database changes for adding ratings to AI generated replies (coming in next PR).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the rubric grading playground and grading-context UX by introducing dedicated mock-answer management (including renameable mock answers), adding a read-only “view answer” flow that resolves grading contexts against a submission, and fixing/covering grading-context duplication semantics when duplicating questions. It also adds a migration + schema changes for rubric answer-evaluation feedback ratings and updates related translations/UI polish.

Changes:

  • Add renameable, editable mock answers with full CRUD support (API, controller, serializers, reducer/types) and new playground prompts for create/edit + view-answer.
  • Add an endpoint + client wiring to fetch grading contexts resolved for a specific real answer’s submission.
  • Fix grading-context duplication behavior for rubric-gradable questions and expand specs/docs/migration/schema for related rubric grading enhancements.

Reviewed changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
spec/models/course/assessment/question/grading_context_spec.rb Adds duplication specs for grading-context copying and source re-pointing.
spec/controllers/course/assessment/rubrics_controller_spec.rb Adds controller coverage for deleting mock-answer evaluations and resolving answer contexts.
spec/controllers/course/assessment/mock_answers_controller_spec.rb New specs covering mock answer create/update/destroy/index JSON behavior.
docs/rubric_ai_feedback_rating_plan.md Design plan for rating LLM-generated rubric feedback (new table + lifecycle).
docs/mock_answer_management_prompt_plan.md Design plan for dedicated mock-answer prompt and renameable mock answers.
db/schema.rb Updates schema for mock answer name and new ratings table + FKs/indexes.
db/migrate/20260701100000_create_rubric_evaluation_rating_table.rb Creates course_rubric_answer_evaluation_ratings and adds mock-answer name column.
config/routes.rb Adds answer grading-contexts route and enables mock_answers update.
client/tailwind.config.ts Adds .field-sizing-content utility used by new prompt textarea sizing.
client/locales/zh.json Updates/adds rubric-playground strings (labels, prompts, context headings).
client/locales/ko.json Updates/adds rubric-playground strings (labels, prompts, context headings).
client/locales/en.json Updates/adds rubric-playground strings (labels, prompts, context headings).
client/app/types/course/rubrics.ts Adds RubricMockAnswerData + grading-context join-row typing.
client/app/bundles/course/assessment/translations.ts Improves grading-context hint copy for clarity.
client/app/bundles/course/assessment/submission/containers/RubricModerationRow.tsx Makes moderation field tolerate intermediate numeric inputs (e.g. “-”, “1.”).
client/app/bundles/course/assessment/submission/containers/QuestionGrade.tsx Adjusts reevaluate button visibility logic for rubric/AI grading UI.
client/app/bundles/course/assessment/question/rubric-playground/ViewAnswerPrompt.tsx New read-only prompt to view a real answer + resolved grading-context content.
client/app/bundles/course/assessment/question/rubric-playground/translations.ts Adds/updates playground translation keys for new prompts/actions and rubric info copy.
client/app/bundles/course/assessment/question/rubric-playground/RubricPlaygroundPage.tsx Wires new MockAnswerPrompt and ViewAnswerPrompt with shared page state.
client/app/bundles/course/assessment/question/rubric-playground/RubricHeader/index.tsx Uses translations for active/inactive rubric info alert text.
client/app/bundles/course/assessment/question/rubric-playground/operations/mockAnswers.ts Adds update path and returns full mock-answer payloads from API.
client/app/bundles/course/assessment/question/rubric-playground/operations/answers.ts Adds fetchAnswerGradingContexts operation for resolved contexts.
client/app/bundles/course/assessment/question/rubric-playground/MockAnswerPrompt.tsx New create/edit prompt for mock answers + per-context content editing.
client/app/bundles/course/assessment/question/rubric-playground/ContextHeading.tsx New shared context heading renderer for mock/view prompts.
client/app/bundles/course/assessment/question/rubric-playground/AnswerEvaluationsTableHeader.tsx Removes custom-answer flow from add-answers prompt; adds “Add Mock Answer” button.
client/app/bundles/course/assessment/question/rubric-playground/AnswerEvaluationsTable/index.tsx Adds view/edit action buttons and improves layout for answer rows.
client/app/bundles/course/assessment/question/rubric-playground/AddAnswersPrompt.tsx Simplifies prompt to “specific answers” / “random student” + shared “current only” toggle.
client/app/bundles/course/assessment/question/rubric-based-responses/components/AIGradingFields.tsx Removes unused useParams usage.
client/app/bundles/course/assessment/question/reducers/rubrics.ts Stores mock answers as RubricMockAnswerData and adds update action.
client/app/api/course/Assessment/Question/Rubrics.ts Adds answerGradingContexts API method.
client/app/api/course/Assessment/Question/MockAnswers.ts Adds typed payload builder and PATCH update API for mock answers.
app/views/course/assessment/rubrics/answer_grading_contexts.json.jbuilder New JSON view for resolved grading contexts per answer.
app/views/course/assessment/mock_answers/show.json.jbuilder New show view rendering the mock answer partial.
app/views/course/assessment/mock_answers/index.json.jbuilder Switches index to render shared partial with preloaded grading contexts.
app/views/course/assessment/mock_answers/_mock_answer.json.jbuilder New partial serializing mock answer + per-context join rows.
app/models/course/assessment/question/rubric_based_response.rb Ensures grading contexts duplicate for rubric-based response questions.
app/models/course/assessment/question/grading_context.rb Adds duplication hook to re-point consumer/source linkages.
app/models/course/assessment/question/forum_post_response.rb Ensures grading contexts duplicate for forum-post response questions.
app/models/course/assessment/question.rb Adds helper to duplicate contexts and fix up source links regardless of duplication order.
app/controllers/course/assessment/rubrics_controller.rb Adds answer_grading_contexts and keeps mock answers when dismissing evaluations.
app/controllers/course/assessment/mock_answers_controller.rb Adds update/destroy and returns full mock-answer payload on create/update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 43 changed files in this pull request and generated 2 comments.

Comment thread db/migrate/20260701100000_create_rubric_evaluation_rating_table.rb
Comment thread db/migrate/20260701100000_create_rubric_evaluation_rating_table.rb
…ng context

- add name column to mock_answers table
- add update route to mock_answers
- refactor out mock answer + context config into a separate prompt
- implemented missing destroy route for mock answers
- fixed duplicate "Re-evaluate Answer" button rendering for rubric forum posts
- fixed handling of negative moderation values in RubricPanel grading view
- fixed duplication behavior for grading context links
- fixed unused variable nags in AIGradingFields
…ui overhaul

- add route to fetch all grading contexts for a given answer
- wording pass
- rework add existing answers prompt
- make table row top-aligned
@adi-herwana-nus
adi-herwana-nus force-pushed the adi/rubric-grading-context-ui-updates branch from 3f4b8dd to 9e4e75b Compare July 20, 2026 11:59
@adi-herwana-nus
adi-herwana-nus merged commit 640c1dd into master Jul 20, 2026
13 of 14 checks passed
@adi-herwana-nus
adi-herwana-nus deleted the adi/rubric-grading-context-ui-updates branch July 20, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants