-
Notifications
You must be signed in to change notification settings - Fork 305
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
Exam mode
: Fix problems with highlighting of the differences in the problem statement
#8461
Exam mode
: Fix problems with highlighting of the differences in the problem statement
#8461
Conversation
WalkthroughThe recent updates primarily focus on enhancing the way problem statements are processed and displayed across various exam exercise components. The significant change involves using the Changes
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (3)
Additional context usedPath-based instructions (3)
Additional comments not posted (6)
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on TS2 - can you double check the code block (```) functionality?
@@ -59,4 +68,19 @@ export class ArtemisMarkdownService { | |||
convertedString = convertedString.slice(0, paragraphPosition) + convertedString.slice(paragraphPosition).replace('<p>', '<p class="inline-paragraph">'); | |||
return this.sanitizer.bypassSecurityTrustHtml(convertedString); | |||
} | |||
|
|||
/** | |||
* Unescapes html tags that are placed inside <code> tags (single backtick operator). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if escaping is a good solution here. There will always be difficulties for special syntax. Would it not make more sense to use some kind of html diff? |
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions. |
85d4409
to
6f7fadb
Compare
Checklist
General
Client
Motivation and Context
Currently there is an issue that differences in a problem statement are not properly highlighted when a change occurs inside of code tag (single backtick operator) or in the task that gets injected into the markdown.
This pull requests resolves this issue and ensures that differences are rendered correctly, regardless of their location in the markdown.
Description
Previously, differences between two problem statements were calculated at the markdown level and then markdown with highlighted differences was rendered. This occasionally led to errors, especially when changes occurred within special syntax such as code blocks or URLs. With the new approach, the problem statement markdowns are first converted into HTML. Then, differences between rendered problem statements are calculated using an HTML diff library.
The logic to remove tasks and inject them back into the document was moved to
ProgrammingExerciseInstructionComponent
to enable calculating tasks from the markdown with differences.Steps for Testing
Prerequisites:
There is already an exam called 'problem-statement-updates' in 'Test Course Michal Kawka' on ts2. Test users 1-7 are registered for the exam.
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Performance Review
Code Review
Manual Tests
Exam Mode Test
Screenshots
Differences inside single backticks


Before:
After:
Differences in the tasks


Before:
After:
Summary by CodeRabbit
New Features
Updates