From 92065ce4d43882d4acc408777ee0bf7bf229ea44 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Thu, 30 Jan 2014 17:34:29 +0200 Subject: [PATCH] Add problem_mark_open handler --- lib/Gruntmaster/Handlers.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/Gruntmaster/Handlers.pm b/lib/Gruntmaster/Handlers.pm index 7b6bddc..5415b80 100644 --- a/lib/Gruntmaster/Handlers.pm +++ b/lib/Gruntmaster/Handlers.pm @@ -19,7 +19,7 @@ use Cwd qw/cwd/; use File::Basename qw/fileparse/; use File::Temp qw/tempdir/; use File::Copy qw/move/; -use Gruntmaster::Data qw/contest_start contest_end push_job set_job_inmeta insert_user PUBLISH/; +use Gruntmaster::Data; use constant FORMAT_EXTENSION => { C => 'c', @@ -114,6 +114,15 @@ sub passwd{ aputs $r, 'Password changed successfully'; } +sub problem_mark_open{ + my $r = shift; + $r->uri =~ m,/ct/([^/]*)/pb/([^.]*),; + $r->log_error("Marking open for contest $1 problem $2 and user " . $r->user); + local $Gruntmaster::Data::contest = $1; + my $problem = $2; + mark_open $problem, $r->user; +} + =begin comment sub private{ -- 2.39.2