Display all languages in the contest in teaminterface#3178
Display all languages in the contest in teaminterface#3178vmcj wants to merge 6 commits intoDOMjudge:mainfrom
Conversation
|
I like the idea, but I would not do
|
Yes
I didn't try that but thought it would be overcrowded, but I can try it. |
Also limit the languages in case the problem has different languages.
d6dd982 to
903bff3
Compare
|
I like adding this info in general, wonder if we need something special for too many problems (e.g. > 15) like online judges where this different languages per problem are more likely |
So also if there are no specific languages per problem? I think I disagree
Let me play around with such a situation. |
I think we are on the same page, I just worded it confusingly. I meant, I think the change is an improvement, but there might be the edge case that I pointed out |
|
I don't like the 'not for' variant, since it seems to draw you towards a colored box while the color is exactly what you don't want to know. |
I agree, but I also don't like the alternatives. Basically we can:
|
|
@meisterT I prefer to get this merged at one point, we can think about the edge case some more later. |
|
|
||
| /** | ||
| * @param Language[] $languages | ||
| * @return Language[] |
There was a problem hiding this comment.
This is not the return type that we actually return, is it?
There was a problem hiding this comment.
I assume it is something complex like
array<string, array{problems: ContestProblem[], limitedProblems: ContestProblem[], language: Language}>
| return $this->render('team/languages.html.twig', ['languages' => $languages]); | ||
| $limited = false; | ||
| $allLanguages = []; | ||
| foreach($this->dj->getAllowedLanguagesForContest($currentContest) as $language) { |
| */ | ||
| private function addLanguage(array $languages, Language $language, ContestProblem $problem, bool $inverted = false): array | ||
| { | ||
| $langId = $language->getName(); |
There was a problem hiding this comment.
is it intentional here to use ->getName() and not ->getLandId()?



Also limit the languages in case the problem has different languages.
I don't really like the
[All]as it is not really true butrestis also not that good. Found this when playing around with something and needed the info so added it.@nickygerritsen suggested this as alternative:


Or this: