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

Modeling exercises: Fix submission error and redundant tooltip for AI feedback #9437

Merged

Conversation

LeonWehrhahn
Copy link
Contributor

@LeonWehrhahn LeonWehrhahn commented Oct 7, 2024

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) and too complex database calls.
  • I strictly followed the principle of data economy for all database calls.
  • I strictly followed the server coding and design guidelines.
  • I added multiple integration tests (Spring) related to the features (with a high test coverage).
  • I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
  • I documented the Java code using JavaDoc style.

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data (e.g. using paging).
  • I strictly followed the principle of data economy for all client-server REST calls.
  • I strictly followed the client coding and design guidelines.
  • Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
  • I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

Changes affecting Programming Exercises

  • High priority: I tested all changes and their related features with all corresponding user types on a test server configured with the integrated lifecycle setup (LocalVC and LocalCI).
  • I tested all changes and their related features with all corresponding user types on a test server configured with Gitlab and Jenkins.

Motivation and Context

Prerequisites:

  • The user is working on a modeling exercise with AI feedback generation enabled.

The Problem:

  • When a user submits an updated model after the first AI feedback generation request has been processed, and is still in the modeling editor when the feedback result is returned, submitting the updated model can result in a server error on the first attempt.
  • Additionally, when a user opens the modeling editor and an AI feedback result is present, the editor always displays a tooltip indicating that a new assessment is available.

Description

The submission issue occurs because the new AI feedback result is not correctly associated with the modelingSubmission object on the client-side. This causes the server to assume that no result is linked to the current submission, leading to errors. The PR ensures that the server-side checks for results associated with the modelingSubmission before proceeding, preventing errors.

The PR also prevents the tooltip indicating "New Assessment Available" from appearing unnecessarily for AI-generated preliminary feedback results, improving the user experience by removing the redundant notification.

Steps for Testing

Only Deploy to TS1

Instructor Setup:

  • Create a new modeling exercise with the AI feedback option enabled.
  • Optionally, include grading instructions to guide the assessment.

Student Participation:

  • Log in as a student, submit a solution for the modeling exercise, and request AI feedback. To request AI feedback, click on the "Request AI feedback" button.
  • Go directly back into the modeling editor and wait for the feedback to be completed.

Check:

  • Edit the existing UML diagram and click on submit again. Check if the submission works without getting a server error.

Exam Mode Testing

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.







Review Progress

Performance Review

  • I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance even for very large courses with more than 2000 students.
  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance even for very large courses with more than 2000 students.

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Exam Mode Test

  • Test 1
  • Test 2

Performance Tests

  • Test 1
  • Test 2

Test Coverage

Screenshots

Summary by CodeRabbit

  • New Features

    • Introduced a method to check for existing results by submission ID.
    • Enhanced filtering logic for results based on exercise types, including modeling exercises.
    • Added support for feedback requests for both text and modeling exercises.
    • Improved handling of submission results to ensure only relevant results are included.
    • Expanded functionality to support file upload exercises and modeling exercises.
  • Bug Fixes

    • Improved handling of submission results to exclude null values.
    • Refined logic for displaying assessment notifications based on assessment types.
  • Documentation

    • Updated method documentation to reflect changes in functionality and return values.
  • Tests

    • Expanded test coverage for modeling submissions and feedback requests, including success and failure scenarios.
  • Style

    • Improved code readability and maintainability through refined comments and streamlined logic.

= Enea_Gore and others added 30 commits August 4, 2024 20:33
Copy link
Contributor

@EneaGore EneaGore left a comment

Choose a reason for hiding this comment

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

Tested on ts1. Code also lgtm.

@MaximilianAnzinger MaximilianAnzinger changed the title Modeling Exercises: Fix Server-Side Submission Error and Redundant Tooltip for AI Feedback Modeling exercises: Fix server-side submission error and redundant tooltip for ai feedback Oct 9, 2024
Copy link
Contributor

@ole-ve ole-ve left a comment

Choose a reason for hiding this comment

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

code

@krusche krusche changed the title Modeling exercises: Fix server-side submission error and redundant tooltip for ai feedback Modeling exercises: Fix submission error and redundant tooltip for AI feedback Oct 12, 2024
@krusche krusche added this to the 7.6.0 milestone Oct 12, 2024
@krusche krusche merged commit d8c99a2 into develop Oct 12, 2024
22 of 29 checks passed
@krusche krusche deleted the feature/modeling-exercises/preliminary-feedback-submission branch October 12, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assessment Pull requests that affect the corresponding module client Pull requests that update TypeScript code. (Added Automatically!) modeling Pull requests that affect the corresponding module ready for review server Pull requests that update Java code. (Added Automatically!)
Projects
Archived in project
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants