Repository navigation
Rubric AI feedback delivery modes #8602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
da01631
feat(rubric-grading): add support for auto-publish AI feedback
adi-herwana-nus aefc4ae
refactor(rubric-grading): remove auto_gradable status mask and refine…
adi-herwana-nus c586eec
style(submissions): rename javascript -> typescript converted files
adi-herwana-nus f43a775
refactor(submissions): convert posts and topics reducers to TypeScript
adi-herwana-nus 73d2caa
refactor(comments): refactor comment UI to TypeScript
adi-herwana-nus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
15 changes: 15 additions & 0 deletions
15
app/views/course/assessment/answer/_ai_generated_comment.json.jbuilder
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # frozen_string_literal: true | ||
| # The latest AI feedback comment on this answer's question, so the client can show it as soon as grading | ||
| # finishes rather than on the next full page load. Which state that is depends on the course's feedback | ||
| # workflow: a draft for staff to review, or already published to the student. Visibility follows the | ||
| # submission's own comment rules (see _topics.json.jbuilder): staff see every state, students only what has | ||
| # been published. | ||
| posts = answer.submission.submission_questions.find_by(question_id: answer.question_id)&.discussion_topic&.posts | ||
| ai_generated_comment = posts&.select do |post| | ||
| post.is_ai_generated && (can_grade || post.published?) | ||
| end&.last | ||
| if ai_generated_comment | ||
| json.aiGeneratedComment do | ||
| json.partial! ai_generated_comment | ||
| end | ||
| end |
13 changes: 13 additions & 0 deletions
13
app/views/course/assessment/answer/_rubric_explanation.json.jbuilder
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # frozen_string_literal: true | ||
| # The step-by-step gate for a rubric-graded answer: the Continue and Finalise buttons read +correct+, as does the | ||
| # server's maxStep (see Course::Assessment::QuestionsConcern#correctly_answered_question_ids). Rubric grading has | ||
| # no notion of a wrong answer, so +correct+ means "submitted at least once" -- the student may move on as soon as | ||
| # they have submitted, however long grading takes or whether it succeeds. Null until then, which hides the panel. | ||
| # | ||
| # Unlike other answer types this is not gated on can_read_grade?: it carries no grade, only whether the student | ||
| # has submitted, which they already know. | ||
| submitted = last_attempt.present? && !last_attempt.attempting? | ||
| json.explanation do | ||
| json.correct submitted ? true : nil | ||
| json.explanations [] | ||
| end |
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
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
2 changes: 1 addition & 1 deletion
2
...ws/course/assessment/question/rubric_based_responses/_rubric_based_response.json.jbuilder
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.