Skip to content
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

Let teacher request ai eval #54375

Merged
merged 11 commits into from
Oct 25, 2023
Merged

Let teacher request ai eval #54375

merged 11 commits into from
Oct 25, 2023

Conversation

davidsbailey
Copy link
Member

@davidsbailey davidsbailey commented Oct 20, 2023

Finishes https://codedotorg.atlassian.net/browse/AITT-101. This PR does the following:

  • adds a new /rubrics/1/ai_evaluation_status_for_user endpoint, which returns boolean status variables for whether the student has attempted the current level, and whether that attempt has been evaluated (lastAttemptEvaluated).
    • attempted is computed by looking for presence of a UserLevel
    • lastAttemptEvaluated is computed by comparing user_level.updated_at to the update_at timestamp on the most recent LearningGoalAIEvaluation
  • updates /rubrics/1/run_ai_evaluation_for_user to reject the request unless the level has been attempted but not yet evaluated
  • updates the UI to display a message according to this status, following the state transition diagram below
  • adds unit tests for ruby and JS

Kudos to Bethany for adding the UI messages and writing the JS tests!

state transition diagram

Here is how the client state behaves in response to the AI evaluation status and user clicks (apologies, I left out EVALUATION PENDING which happens after the run ai button is clicked):

PXL_20231024_223640855 MP

demo

this screen capture shows the following states: INITIAL_LOAD (very brief) --> NOT_ATTEMPTED --> student attempts --> teacher refreshes --> INITIAL_LOAD --> READY --> teacher clicks run --> EVALUATION_PENDING --> SUCCESS

run-ai-button-720p.mov

Testing story

  • new js tests
  • new and updated ruby tests

Copy link
Member Author

Choose a reason for hiding this comment

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

These tests look great Bethany, thank you so much for pitching in! LGTM on changes to this file

Copy link
Member Author

Choose a reason for hiding this comment

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

LGTM on Bethany's changes to this file

@davidsbailey davidsbailey marked this pull request as ready for review October 24, 2023 23:08
@davidsbailey davidsbailey requested a review from a team as a code owner October 24, 2023 23:08
@davidsbailey davidsbailey requested review from a team and removed request for a team October 24, 2023 23:08
Copy link
Contributor

@wilkie wilkie left a comment

Choose a reason for hiding this comment

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

Looks good and I'm definitely appreciative of these good tests!

Copy link
Contributor

@bethanyaconnor bethanyaconnor left a comment

Choose a reason for hiding this comment

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

Thanks for thinking through this so deeply!

@davidsbailey davidsbailey merged commit 184a853 into staging Oct 25, 2023
2 checks passed
@davidsbailey davidsbailey deleted the let-teacher-request-ai-eval branch October 25, 2023 13:01
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.

None yet

3 participants