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

Assessment: Manual unreferenced feedback shows outdated long text #10094

Open
chrisknedl opened this issue Jan 2, 2025 · 3 comments
Open

Assessment: Manual unreferenced feedback shows outdated long text #10094

chrisknedl opened this issue Jan 2, 2025 · 3 comments
Labels
assessment Pull requests that affect the corresponding module bug buildagent Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module

Comments

@chrisknedl
Copy link
Contributor

chrisknedl commented Jan 2, 2025

Describe the bug

When an assessment with an unreferenced manual feedback has been saved, and then changes are made to the text of the unreferenced feedback, expanding the feedback item in the result component shows the long text from the server, not the current state in the client. The collapsed text shows the current version however.

To Reproduce

  1. Create a programming exercise with manual assessment and due date, make a submission before the due date passes
  2. Go to the assessment dashboard, assess the submission
  3. Scroll down to the bottom, create an unreferenced feedback by clicking on the green 'Add new Feedback' button.
  4. Put a long feedback text into the feedback item, e.g. run
System.out.println("abc".repeat(5000));

in your IDE and copy the console output into the text area.
5. Save the assessment.
6. Add a number to the beginning of the text.
7. Expand the Info tab in the build result, it should contain the unreferenced feedback. When the feedback item is still collapsed, it shows the number in front. When expanded, it shows the previous version of the long text, without the number (see screenshots, in my case, the old version starts with '8' and the current one with '12').

Expected behavior

The expanded feedback item in the result component should always show the current version of the feedback.

Screenshots

Current text in the client
Unreferenced Feedback

Collapsed preview of feedback text
Collapsed Feedback Item

Expanded feedback with long text, shows old version
Expaneded Feedback Item

Which version of Artemis are you seeing the problem on?

7.8.1

What browsers are you seeing the problem on?

Chrome, Safari

Additional context

No response

Relevant log output

No response

@chrisknedl chrisknedl added bug assessment Pull requests that affect the corresponding module labels Jan 2, 2025
@github-actions github-actions bot added buildagent Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module labels Jan 2, 2025
@b-fein
Copy link
Contributor

b-fein commented Jan 4, 2025

Will this be fixed by #10090, or is there a separate client-side issue?

@chrisknedl
Copy link
Contributor Author

@b-fein That's a separate issue. Seemed pretty complicated to fix, that's why I didn't look for a fix right away and created this issue instead.

@b-fein
Copy link
Contributor

b-fein commented Jan 6, 2025

👍

If the implementation is still as I did it originally, the responses in the long-feedback-text.service are cached to avoid re-loading the feedback repeatedly whenever a user un-folds a long feedback in the feedback list. This works fine for automatic feedbacks that can only change whenever the ID of the feedback itself changes (i.e. we have a guaranteed cache miss whenever the feedback changes), but not for long manual (i.e. updatable while retaining the same ID) feedbacks.

The save/submit assessment endpoint in the client-side service for the REST API should probably also trigger a cache eviction for all relevant feedbacks.
If I remember correctly, the used caching library had the option to implement some custom cache eviction code (rather than the now-used default time-based one). It might be enough to implement something like that.


Edit: misread the steps for reproduction. Saving it not required for the actual issue to occur. So possibly the unfolding in the list tries to load from the cache rather than using the long feedback already in the feedback object on the client-side?

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 bug buildagent Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module
Projects
None yet
Development

No branches or pull requests

2 participants