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

Plagiarism check: Fix display of escaped characters #6123

Merged
merged 15 commits into from
Feb 3, 2023

Conversation

Strohgelaender
Copy link
Contributor

@Strohgelaender Strohgelaender commented Jan 20, 2023

Checklist

General

Client

Motivation and Context

  1. Closes Plagiarism check: Some characters are presented differently in the code comparison.  #6120
  2. The Distribution chart gets displayed in reverse:
    grafik

Description

  1. Plagiarism checks: Fix submission view for submissions with unescaped characters #5991 introduced escaping for the plagiarism view. However, this makes the resulting text longer, and the provided start and end indices of JPlag were no longer valid. In some cases, this leads to a highlighted text starting in between an escaped character as seen in the issue.

  2. JPlag 4.1.0 fixed this bug and now returns the correct order. Our workaround code is no longer needed. See Fix similarity distribution in JPlagResult jplag/JPlag#794

Steps for Testing

  1. This is a bit tricky to reproduce since you need a JPlag match stating directly after an > character.

  2. Run a new plagiarism check and see that the chart displays the results correctly.

Test Coverage

unchanged

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Jan 20, 2023
krusche
krusche previously approved these changes Jan 21, 2023
Copy link
Member

@krusche krusche left a comment

Choose a reason for hiding this comment

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

Code changes look good 👍

@krusche krusche added this to the 6.0.0 milestone Jan 21, 2023
@github-actions github-actions bot added the server Pull requests that update Java code. (Added Automatically!) label Jan 21, 2023
simon-hng
simon-hng previously approved these changes Jan 21, 2023
Copy link
Contributor

@simon-hng simon-hng 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 previously approved these changes Jan 21, 2023
Copy link
Member

@krusche krusche left a comment

Choose a reason for hiding this comment

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

code looks good 👍

@krusche krusche modified the milestones: 6.0.0, 6.0.1 Jan 21, 2023
rriyaldhi
rriyaldhi previously approved these changes Jan 23, 2023
Copy link
Contributor

@rriyaldhi rriyaldhi left a comment

Choose a reason for hiding this comment

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

@stefanwaldhauser stefanwaldhauser self-requested a review January 23, 2023 22:05
Copy link
Contributor

@stefanwaldhauser stefanwaldhauser left a comment

Choose a reason for hiding this comment

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

LGTM!

@krusche krusche modified the milestones: 6.0.1, 6.0.2 Jan 27, 2023
Copy link
Member

@bassner bassner left a comment

Choose a reason for hiding this comment

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

Hey I have a few questions regarding insertMatchTokens :)

Copy link
Member

@bassner bassner 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 addressing my comments. The code looks good now ✅

@krusche krusche merged commit 607194f into develop Feb 3, 2023
@krusche krusche deleted the bugfix/plagiarism-escpaed-matches branch February 3, 2023 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) server Pull requests that update Java code. (Added Automatically!) tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plagiarism check: Some characters are presented differently in the code comparison.
6 participants