feat(tester): integrate pandoc

This commit is contained in:
Vyacheslav1557 2025-03-16 19:16:27 +05:00
parent ffacc9e3ac
commit 94fc50e272
9 changed files with 315 additions and 105 deletions

View file

@ -114,15 +114,22 @@ func (r *ProblemRepository) ListProblems(ctx context.Context, q tester.Querier,
const (
UpdateProblemQuery = `UPDATE problems
SET title = COALESCE(?, title),
legend = COALESCE(?, legend),
input_format = COALESCE(?, input_format),
output_format = COALESCE(?, output_format),
notes = COALESCE(?, notes),
tutorial = COALESCE(?, tutorial),
latex_summary = COALESCE(?, latex_summary),
time_limit = COALESCE(?, time_limit),
memory_limit = COALESCE(?, memory_limit)
SET title = COALESCE(?, title),
time_limit = COALESCE(?, time_limit),
memory_limit = COALESCE(?, memory_limit),
legend = COALESCE(?, legend),
input_format = COALESCE(?, input_format),
output_format = COALESCE(?, output_format),
notes = COALESCE(?, notes),
scoring = COALESCE(?, scoring),
legend_html = COALESCE(?, legend_html),
input_format_html = COALESCE(?, input_format_html),
output_format_html = COALESCE(?, output_format_html),
notes_html = COALESCE(?, notes_html),
scoring_html = COALESCE(?, scoring_html)
WHERE id=?`
)
@ -132,14 +139,21 @@ func (r *ProblemRepository) UpdateProblem(ctx context.Context, q tester.Querier,
query := q.Rebind(UpdateProblemQuery)
_, err := q.ExecContext(ctx, query,
problem.Title,
problem.TimeLimit,
problem.MemoryLimit,
problem.Legend,
problem.InputFormat,
problem.OutputFormat,
problem.Notes,
problem.Tutorial,
problem.LatexSummary,
problem.TimeLimit,
problem.MemoryLimit,
problem.Scoring,
problem.LegendHtml,
problem.InputFormatHtml,
problem.OutputFormatHtml,
problem.NotesHtml,
problem.ScoringHtml,
id,
)
if err != nil {