From 2311ae03e14e74fe4073d914567deded23868b13 Mon Sep 17 00:00:00 2001 From: Kevin Jilissen Date: Sat, 29 Nov 2025 13:37:17 +0100 Subject: [PATCH] Remove some more unused code --- webapp/src/Twig/TwigExtension.php | 37 ------------------------------- 1 file changed, 37 deletions(-) diff --git a/webapp/src/Twig/TwigExtension.php b/webapp/src/Twig/TwigExtension.php index f233757237..07fd305a48 100644 --- a/webapp/src/Twig/TwigExtension.php +++ b/webapp/src/Twig/TwigExtension.php @@ -44,9 +44,6 @@ class TwigExtension extends AbstractExtension implements GlobalsInterface { - /** - * @param array $renderedSources - */ public function __construct( protected readonly DOMJudgeService $dj, protected readonly ConfigurationService $config, @@ -61,7 +58,6 @@ public function __construct( protected readonly SerializerInterface $serializer, #[Autowire('%kernel.project_dir%')] protected readonly string $projectDir, - protected array $renderedSources = [] ) {} public function getFunctions(): array @@ -933,39 +929,6 @@ public function codeEditor( )); } - /** - * Gets the JavaScript to get a Monaco model instance for the submission file. - * Renders the source code of the file as Monaco model, if not already rendered. - * @return string The JavaScript source assignable to a model variable. - */ - public function getMonacoModel(SubmissionFile $file): string - { - if (array_key_exists($file->getSubmitfileid(), $this->renderedSources)) { - return sprintf( - <<getSubmitfileid(), - $file->getFilename(), - ); - } - $this->renderedSources[$file->getSubmitfileid()] = true; - - $source = Utils::reencodeUtf8($file->getSourcecode()); - return sprintf( - <<serializer->serialize($source, 'json'), - $file->getSubmitfileid(), - $file->getFilename(), - ); - } - /** @param array