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

i_946 Preserve problem title if no TEX files #947

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

johnbrvc
Copy link
Collaborator

Description of what the PR does

Add check for existence of problem_statement/problem.en.tex before trying to get the problem name (problemTitle) from it.

Issue which the PR addresses

Fixes #946

Environment in which the PR was developed (OS,IDE, Java version, etc.)

Windows 11
jdk1.8.0_321

Precise steps for testing the PR (i.e., how to demonstrate that it works correctly)

  1. Create contest CDP with a single problem and a problem.yaml file that has a title property giving the name of the problem.
  2. Make sure there are no TEX files in the problem_statement folder.
  3. Load the contest.
  4. It will succeed and use the title provided in theproblem.yamlas the problem name.

NOTE: I did NOT remove all the typecast's throughout the code. That was Eclipse. I even tried putting them back, but it insisted on removing the redundant typecast's. The REAL code changes are at line 1409 and 1411 - so you can skip the rest and go right there. Also, all the space removals at the end of lines, etc. were a result of eclipse "cleaning up" the code. If you want me to turn that option off, I can do that. Personally, I find it extremely annoying, even for me - it makes finding the real change extremely difficult. I guess a case could be made, that whoever did that originally (added all the spaces at the end of lines, etc.) is the culprit. Nevertheless, it's still bothersome.

Add check for existence of problem_statement/problem.en.tex before trying to get the problem name (problemTitle) from it.
@johnbrvc johnbrvc added the One Approval A very low risk and low LOE PR/Change label Mar 23, 2024
@johnbrvc johnbrvc added this to the 9.11.0 milestone Mar 23, 2024
@johnbrvc johnbrvc self-assigned this Mar 23, 2024
Copy link
Contributor

@troy2914 troy2914 left a comment

Choose a reason for hiding this comment

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

need to update the copyright year.

Copy link
Contributor

@troy2914 troy2914 left a comment

Choose a reason for hiding this comment

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

looks good now.

@johnbrvc johnbrvc merged commit 094adf1 into pc2ccs:develop Mar 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
One Approval A very low risk and low LOE PR/Change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem Title is lost if there are no TEX files.
2 participants