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

Report viewer refuses reports with unknown language #1641

Closed
Alberth289346 opened this issue Mar 6, 2024 · 6 comments · Fixed by #1648
Closed

Report viewer refuses reports with unknown language #1641

Alberth289346 opened this issue Mar 6, 2024 · 6 comments · Fixed by #1648
Labels
enhancement Issue/PR that involves features, improvements and other changes language PR / Issue deals (partly) with new and/or existing languages for JPlag minor Minor issue/feature/contribution/change report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies

Comments

@Alberth289346
Copy link
Contributor

Alberth289346 commented Mar 6, 2024

I maintain a private version of JPlag with our own CIF language in it.

Today I found a bug report by a teacher that the report viewer of 5.0.0 does not accept our result file.

  • Reported report viewer version. Note that it states that it supports JPlag 4.2 and higher.
    PastedGraphic-1

  • Report viewer feedback when feeding a file with results from the CIF language
    PastedGraphic-2

  • git log of the build that I created:
    Screenshot from 2024-03-06 13-31-08

As you can see, I used JPlag 4.3.0 for the build, which seems newer than 4.2.0 to me.

Now, what to do?

@davbeek ping!

@Kr0nox
Copy link
Member

Kr0nox commented Mar 6, 2024

For the report viewer to be able to extract the language from the overview.json file, please add the language to the coresponding enum here: https://github.com/jplag/JPlag/blob/main/report-viewer/src/model/Language.ts

If you want to have custom code highlighting for your language you can add it to the getHighlightLanguage method here: https://github.com/jplag/JPlag/blob/main/report-viewer/src/utils/CodeHighlighter.ts

@Alberth289346
Copy link
Contributor Author

I can write a PR for that, but how does that work from there?

We're running a 4.3 Jplag program, and use your report viewer, as far as I know.

  • Will you make the adapted reportviewer available for us?
  • Is it a good idea to add random additional languages there for which you don't have a jplag front-end?
  • Wouldn't it be simpler to simply accept the results with a default value there like "unknown language", or (in our case) "CIF language" (since it seems to know the word CIF) ?

@Alberth289346
Copy link
Contributor Author

Note that this is a regression, it used to work before. I am not sure why it now suddenly needs a known language.

@tsaglam
Copy link
Member

tsaglam commented Mar 11, 2024

Hi @Alberth289346, thanks for the feedback. We will discuss this issue and try to find a suitable solution.

@tsaglam tsaglam added enhancement Issue/PR that involves features, improvements and other changes minor Minor issue/feature/contribution/change language PR / Issue deals (partly) with new and/or existing languages for JPlag report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies labels Mar 11, 2024
@tsaglam tsaglam linked a pull request Mar 13, 2024 that will close this issue
@tsaglam
Copy link
Member

tsaglam commented Mar 13, 2024

@Alberth289346, with #1648, this should be resolved. With the next minor release, it will be part of the hosted report viewer. As a workaround, using the develop version works right now: https://jplag.github.io/JPlag-Dev/
However, this version is obviously less stable than the main one.

@tsaglam tsaglam closed this as completed Mar 13, 2024
@Alberth289346
Copy link
Contributor Author

Thanks for the quick response!

Hopefully it is in time for the teacher to check for plagiarism now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR that involves features, improvements and other changes language PR / Issue deals (partly) with new and/or existing languages for JPlag minor Minor issue/feature/contribution/change report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants