Refactor ExportUtil#301
Open
ZnPdCo wants to merge 10 commits into
Open
Conversation
- Removed the HTML generation logic from ExportUtil::exportHtml and replaced it with JSON output. - Introduced a new method, ExportUtil::buildExportJson, to construct a JSON representation of contest results. - Updated the exportHtml method to read from an HTML template and insert the generated JSON data. - Cleaned up unused methods and includes related to HTML generation. - Enhanced the structure of the JSON output to include contestant details, task scores, and additional metadata.
…monLime into rewrite-export
- Remove redundant "what" comments from buildExportJson - Simplify updateHeaderIndicators by reducing nesting - Unify DOM construction in template (innerHTML -> DOM API) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Use C++-side info string for status text instead of template-side file/no_source check - Add compile_message field for compile error details - AnswersOnly without info no longer shows spurious text Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
alphagocc
reviewed
Jun 2, 2026
| info = tr("Cannot find valid source file"); | ||
| break; | ||
| case CompileTimeLimitExceeded: | ||
| info = tr("Source file: ") + contestant->getSourceFile(j) + QString(", ") + |
Member
There was a problem hiding this comment.
这边改成 tr("Source file: %1, Compile time limit exceeded").arg(xxx) 是不是会好一点,做翻译也比较容易调整语序,下同。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这个 pr 做了什么
buildExportJson()构建数据 JSON,嵌入export_template.html的%%DATA%%占位符,由浏览器端 JS 完成渲染测试了 CSP 2025 J,并添加了一个题答题作为测试:result.html
感觉,打开会慢一点,不过还可以接受。