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

add Paste code to submit feature #2712

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/autoconf-check-different-distro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
image: ${{ matrix.os }}:${{ matrix.version }}
steps:
- name: Install git so we get the .github directory
run: dnf install -y git
run: dnf install -y git composer
- uses: actions/checkout@v4
- name: Setup image and run bats tests
run: .github/jobs/configure-checks/setup_configure_image.sh
2 changes: 1 addition & 1 deletion .github/workflows/autoconf-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
image: ${{ matrix.os }}:${{ matrix.version }}
steps:
- name: Install git so we get the .github directory
run: apt-get update; apt-get install -y git
run: apt-get update; apt-get install -y git composer
- uses: actions/checkout@v4
- name: Setup image and run bats tests
run: .github/jobs/configure-checks/setup_configure_image.sh
93 changes: 0 additions & 93 deletions .github/workflows/mayhem-api-template.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/mayhem-daily.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/mayhem-weekly.yml

This file was deleted.

5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
DOMjudge Programming Contest Judging System

Version 8.3.1 - 13 September 2024
---------------------------------
- Create autoload_runtime.php as normal user to prevent a composer warning.
- Fix saving new problems with problem statement from web UI.

Version 8.3.0 - 31 May 2024
---------------------------
- [security] Close metadata file descriptor for the child in runguard.
Expand Down
14 changes: 4 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ endif
domserver: domserver-configure paths.mk config
judgehost: judgehost-configure paths.mk config
docs: paths.mk config
install-domserver: domserver composer-dump-autoload domserver-create-dirs
install-domserver: domserver domserver-create-dirs
install-judgehost: judgehost judgehost-create-dirs
install-docs: docs-create-dirs
dist: configure composer-dependencies
Expand Down Expand Up @@ -76,12 +76,6 @@ endif
composer-dependencies-dev:
composer $(subst 1,-q,$(QUIET)) install --prefer-dist --no-scripts --no-plugins

# Dump autoload dependencies (including plugins)
# This is needed since symfony/runtime is a Composer plugin that runs while dumping
# the autoload file
composer-dump-autoload:
composer $(subst 1,-q,$(QUIET)) dump-autoload -o -a

composer-dump-autoload-dev:
composer $(subst 1,-q,$(QUIET)) dump-autoload

Expand All @@ -101,7 +95,7 @@ build-scripts:

# List of SUBDIRS for recursive targets:
build: SUBDIRS= lib misc-tools
domserver: SUBDIRS=etc sql misc-tools webapp
domserver: SUBDIRS=etc lib sql misc-tools webapp
install-domserver: SUBDIRS=etc lib sql misc-tools webapp example_problems
judgehost: SUBDIRS=etc judge misc-tools
install-judgehost: SUBDIRS=etc lib judge misc-tools
Expand Down Expand Up @@ -222,7 +216,7 @@ webapp/.env.local:
# symlinks where necessary to let it work from the source tree.
# This stuff is a hack!
maintainer-install: inplace-install composer-dump-autoload-dev
inplace-install: build composer-dump-autoload domserver-create-dirs judgehost-create-dirs
inplace-install: build domserver-create-dirs judgehost-create-dirs
inplace-install-l:
# Replace libjudgedir with symlink to prevent lots of symlinks:
-rmdir $(judgehost_libjudgedir)
Expand Down Expand Up @@ -341,5 +335,5 @@ clean-autoconf:
$(addprefix inplace-,conf conf-common install uninstall) \
$(addprefix maintainer-,conf install) clean-autoconf config distdocs \
composer-dependencies composer-dependencies-dev \
composer-dump-autoload composer-dump-autoload-dev \
composer-dump-autoload-dev \
coverity-conf coverity-build
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DOMjudge
[![Coverity Scan Status](https://img.shields.io/coverity/scan/671.svg)](https://scan.coverity.com/projects/domjudge)
[![CodeQL alerts](https://github.com/DOMjudge/domjudge/actions/workflows/codeql-analysis.yml/badge.svg?branch=main&event=push)](https://github.com/DOMjudge/domjudge/actions/workflows/codeql-analysis.yml)

This is the Programming Contest Jury System "DOMjudge" version 8.3.0
This is the Programming Contest Jury System "DOMjudge" version 8.3.1

DOMjudge is a system for running a programming contest, like the
ICPC regional and world championship programming contests.
Expand Down
8 changes: 8 additions & 0 deletions etc/db-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@
- category: Display
description: Options related to the DOMjudge user interface.
items:
- name: default_submission_code_mode
type: int
default_value: 0
public: true
description: Select the default submission method for the team
options:
0: Paste
1: Upload
- name: output_display_limit
type: int
default_value: 2000
Expand Down
1 change: 0 additions & 1 deletion gitlab/ci/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
- /bin/true
services:
- name: mysql
command: ["--mysql-native-password", "--authentication_policy=mysql_native_password"]
alias: sqlserver

.mariadb_job:
Expand Down
5 changes: 5 additions & 0 deletions lib/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
ifndef TOPDIR
TOPDIR=..
endif

REC_TARGETS = domserver

include $(TOPDIR)/Makefile.global

OBJECTS = $(addsuffix $(OBJEXT),lib.error lib.misc)
Expand Down Expand Up @@ -31,3 +34,5 @@ install-domserver:
install-judgehost:
$(INSTALL_DATA) -t $(DESTDIR)$(judgehost_libdir) *.php *.sh
$(INSTALL_PROG) -t $(DESTDIR)$(judgehost_libdir) alert

domserver: SUBDIRS=vendor
12 changes: 12 additions & 0 deletions lib/vendor/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ifndef TOPDIR
TOPDIR=../..
endif
include $(TOPDIR)/Makefile.global

clean-l:
rm -f autoload_runtime.php

autoload_runtime.php:
composer $(subst 1,-q,$(QUIET)) dump-autoload -o -a -d $(TOPDIR)

domserver: autoload_runtime.php
4 changes: 2 additions & 2 deletions misc-tools/import-contest.in
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ if import_file('organizations', ['organizations.json']):
# Also import logos if we have any
# We prefer the 64x64 logo. If it doesn't exist, accept a generic logo (which might be a SVG)
# We also prefer PNG/SVG before JPG
import_images('organizations', 'logo', ['^logo\.64x\d+\.png$', '^logo\.(png|svg)$', '^logo\.64x\d+\.jpg$', '^logo\.jpg$'])
import_images('organizations', 'logo', ['^logo\\.64x\\d+\\.png$', '^logo\\.(png|svg)$', '^logo\\.64x\\d+\\.jpg$', '^logo\\.jpg$'])
if import_file('teams', ['teams.json', 'teams2.tsv']):
# Also import photos if we have any, but prefer JPG over SVG and PNG
import_images('teams', 'photo', ['^photo\.jpg$', '^photo\.(png|svg)$'])
import_images('teams', 'photo', ['^photo\\.jpg$', '^photo\\.(png|svg)$'])
import_file('accounts', ['accounts.json', 'accounts.yaml', 'accounts.tsv'])

problems_imported = False
Expand Down
1 change: 0 additions & 1 deletion webapp/src/Controller/Jury/ProblemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,6 @@ public function addAction(Request $request): Response
$form->handleRequest($request);

if ($form->isSubmitted() && $form->isValid()) {
$this->em->persist($problem);
$this->saveEntity($this->em, $this->eventLogService, $this->dj, $problem, null, true);
return $this->redirectToRoute('jury_problem', ['probId' => $problem->getProbid()]);
}
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/Controller/Jury/TeamCategoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function requestRemainingRunsWholeTeamCategoryAction(string $categoryId):
->join('t.category', 'tc')
->andWhere('j.valid = true')
->andWhere('j.result != :compiler_error')
->andWhere('tc.category = :categoryId')
->andWhere('tc.categoryid = :categoryId')
->setParameter('compiler_error', 'compiler-error')
->setParameter('categoryId', $categoryId);
if ($contestId > -1) {
Expand Down
8 changes: 2 additions & 6 deletions webapp/src/Controller/Team/MiscController.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,10 @@ public function homeAction(Request $request): Response
$clarifications = $this->em->createQueryBuilder()
->from(Clarification::class, 'c')
->leftJoin('c.problem', 'p')
->leftJoin('p.contest_problems', 'cp')
->leftJoin('c.sender', 's')
->leftJoin('c.recipient', 'r')
->select('c', 'cp', 'p')
->select('c', 'p')
->andWhere('c.contest = :contest')
->andWhere('cp.contest = :contest')
->andWhere('c.sender IS NULL')
->andWhere('c.recipient = :team OR c.recipient IS NULL')
->setParameter('contest', $contest)
Expand All @@ -114,12 +112,10 @@ public function homeAction(Request $request): Response
$clarificationRequests = $this->em->createQueryBuilder()
->from(Clarification::class, 'c')
->leftJoin('c.problem', 'p')
->leftJoin('p.contest_problems', 'cp')
->leftJoin('c.sender', 's')
->leftJoin('c.recipient', 'r')
->select('c', 'cp', 'p')
->select('c', 'p')
->andWhere('c.contest = :contest')
->andWhere('cp.contest = :contest')
->andWhere('c.sender = :team')
->setParameter('contest', $contest)
->setParameter('team', $team)
Expand Down
Loading
Loading