Skip to content

Conversation

@nickygerritsen
Copy link
Member

Fixes #3024

Part of DOMjudge#3024

# Conflicts:
#	webapp/templates/jury/partials/submission_diff.html.twig
#	webapp/templates/jury/submission_source.html.twig
Part of DOMjudge#3024

� Conflicts:
�	judge/judgedaemon.main.php
private function judgingDirectory(string $workdirpath, array $judgeTask): string
{
if (filter_var($judgeTask['submitid'], FILTER_VALIDATE_INT) === false ||
if (filter_var($judgeTask['submitid'], FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => '/^[a-zA-Z0-9_.-]+$/']]) === false ||
Copy link
Member

Choose a reason for hiding this comment

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

should we define this somewhere more generally?

Copy link
Member

Choose a reason for hiding this comment

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

Also, what do submission URLs look like after this change?

$this->addSql('ALTER TABLE version ADD langid_str VARCHAR(32) DEFAULT NULL AFTER langid');

$this->addSql("UPDATE language SET langid_str = CASE externalid
WHEN 'ada' THEN 'adb'
Copy link
Member

Choose a reason for hiding this comment

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

huh, ada -> adb? Is that what you want?

$data['subjectlink'] = $this->generateUrl('jury_problem', ['probId' => $clar->getProblem()->getExternalid()]);
} elseif ($clar->getCategory()) {
$concernssubject = $contest->getCid() . "-" . $clar->getCategory();
$concernssubject = $contest->getExternalid() . "#" . $clar->getCategory();
Copy link
Member

Choose a reason for hiding this comment

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

why not also use |?


#[IsGranted('ROLE_ADMIN')]
#[Route(path: '/delete-multiple', name: 'jury_team_affiliation_delete_multiple', methods: ['GET', 'POST'])]
#[Route(path: '/delete-multiple', name: 'jury_team_affiliation_delete_multiple', methods: ['GET', 'POST'], priority: 1)]
Copy link
Member

Choose a reason for hiding this comment

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

what does priority: 1 mean/do here?

*
* @return array{previous: string|int|null, next: string|int|null}
*/
protected function getPreviousAndNextObjectIds(
Copy link
Member

Choose a reason for hiding this comment

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

Is it easy to add a few unit tests for this method?

<tbody>
{% for p in problems %}
{% set id=p.probid %}
{% set id=p.externalId %}
Copy link
Member

Choose a reason for hiding this comment

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

looking at all these places, should we just use p.id or p.probid to mean the external id and p.internalId to mean the probid? Could be done separately though

Copy link
Member

Choose a reason for hiding this comment

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

This might deserve a changelog entry :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use external IDs in web interface everywhere

2 participants