diff --git a/bin/ej-polygon.c b/bin/ej-polygon.c
index 600ba341e..fab08a71f 100644
--- a/bin/ej-polygon.c
+++ b/bin/ej-polygon.c
@@ -3552,6 +3552,9 @@ process_polygon_zip(
if (full_user_score > 0) {
prob_cfg->full_user_score = full_user_score;
}
+ if (pkt->enable_group_merge > 0) {
+ prob_cfg->enable_group_merge = 1;
+ }
cfg_file = open_memstream(&cfg_text, &cfg_size);
problem_config_section_unparse_cfg(cfg_file, prob_cfg);
diff --git a/csp/super-server/import_contest_from_polygon_page.csp b/csp/super-server/import_contest_from_polygon_page.csp
index 7f7fdfede..cac067526 100644
--- a/csp/super-server/import_contest_from_polygon_page.csp
+++ b/csp/super-server/import_contest_from_polygon_page.csp
@@ -106,6 +106,8 @@
Use RSS memory limit instead of VM: | |
+ Enable test group merging: | |
+
Verbose importer output: | |
|
diff --git a/csp/super-server/import_from_polygon_page.csp b/csp/super-server/import_from_polygon_page.csp
index 43ee52a1c..486ae66e8 100644
--- a/csp/super-server/import_from_polygon_page.csp
+++ b/csp/super-server/import_from_polygon_page.csp
@@ -114,6 +114,8 @@
Use RSS memory limit instead of VM: | |
+ Enable test group merging: | |
+
Verbose importer output: | |
|
diff --git a/csp/super-server/update_from_polygon_page.csp b/csp/super-server/update_from_polygon_page.csp
index d70255ec7..a73903859 100644
--- a/csp/super-server/update_from_polygon_page.csp
+++ b/csp/super-server/update_from_polygon_page.csp
@@ -78,6 +78,7 @@
Tests are binary data: | |
Embed statement in IFRAME: | |
Use RSS memory limit instead of VM: | |
+ Enable test group merging: | |
Verbose importer output: | |
|
diff --git a/gen/polygon_packet_meta.c b/gen/polygon_packet_meta.c
index 0831bc083..52c550453 100644
--- a/gen/polygon_packet_meta.c
+++ b/gen/polygon_packet_meta.c
@@ -26,6 +26,7 @@ static struct meta_info_item meta_info_polygon_packet_data[] =
[META_POLYGON_PACKET_verbose] = { META_POLYGON_PACKET_verbose, 'B', XSIZE(struct polygon_packet, verbose), "verbose", XOFFSET(struct polygon_packet, verbose) },
[META_POLYGON_PACKET_ignore_main_solution] = { META_POLYGON_PACKET_ignore_main_solution, 'B', XSIZE(struct polygon_packet, ignore_main_solution), "ignore_main_solution", XOFFSET(struct polygon_packet, ignore_main_solution) },
[META_POLYGON_PACKET_enable_rss_limit] = { META_POLYGON_PACKET_enable_rss_limit, 'B', XSIZE(struct polygon_packet, enable_rss_limit), "enable_rss_limit", XOFFSET(struct polygon_packet, enable_rss_limit) },
+ [META_POLYGON_PACKET_enable_group_merge] = { META_POLYGON_PACKET_enable_group_merge, 'B', XSIZE(struct polygon_packet, enable_group_merge), "enable_group_merge", XOFFSET(struct polygon_packet, enable_group_merge) },
[META_POLYGON_PACKET_polygon_url] = { META_POLYGON_PACKET_polygon_url, 's', XSIZE(struct polygon_packet, polygon_url), "polygon_url", XOFFSET(struct polygon_packet, polygon_url) },
[META_POLYGON_PACKET_login] = { META_POLYGON_PACKET_login, 's', XSIZE(struct polygon_packet, login), "login", XOFFSET(struct polygon_packet, login) },
[META_POLYGON_PACKET_password] = { META_POLYGON_PACKET_password, 's', XSIZE(struct polygon_packet, password), "password", XOFFSET(struct polygon_packet, password) },
@@ -106,6 +107,7 @@ void meta_polygon_packet_copy(struct polygon_packet *dst, const struct polygon_p
dst->verbose = src->verbose;
dst->ignore_main_solution = src->ignore_main_solution;
dst->enable_rss_limit = src->enable_rss_limit;
+ dst->enable_group_merge = src->enable_group_merge;
if (src->polygon_url) {
dst->polygon_url = strdup(src->polygon_url);
}
diff --git a/include/ejudge/meta/polygon_packet_meta.h b/include/ejudge/meta/polygon_packet_meta.h
index bcec35806..d6e0a5a48 100644
--- a/include/ejudge/meta/polygon_packet_meta.h
+++ b/include/ejudge/meta/polygon_packet_meta.h
@@ -19,6 +19,7 @@ enum
META_POLYGON_PACKET_verbose,
META_POLYGON_PACKET_ignore_main_solution,
META_POLYGON_PACKET_enable_rss_limit,
+ META_POLYGON_PACKET_enable_group_merge,
META_POLYGON_PACKET_polygon_url,
META_POLYGON_PACKET_login,
META_POLYGON_PACKET_password,
diff --git a/include/ejudge/polygon_packet.h b/include/ejudge/polygon_packet.h
index b7a9530c5..c876be437 100644
--- a/include/ejudge/polygon_packet.h
+++ b/include/ejudge/polygon_packet.h
@@ -46,6 +46,7 @@ struct polygon_packet
ejintbool_t verbose;
ejintbool_t ignore_main_solution;
ejintbool_t enable_rss_limit;
+ ejintbool_t enable_group_merge;
unsigned char *polygon_url;
unsigned char *login;
diff --git a/lib/super_html_6.c b/lib/super_html_6.c
index 269dc444d..bb183f9da 100644
--- a/lib/super_html_6.c
+++ b/lib/super_html_6.c
@@ -4483,6 +4483,7 @@ super_serve_op_IMPORT_FROM_POLYGON_ACTION(
int verbose_flag = 0;
int ignore_main_solution_flag = 0;
int enable_rss_limit_flag = 0;
+ int enable_group_merge_flag = 0;
if (!ss->edited_cnts || !ss->global) {
FAIL(SSERV_ERR_NO_EDITED_CNTS);
@@ -4640,6 +4641,7 @@ super_serve_op_IMPORT_FROM_POLYGON_ACTION(
if (hr_cgi_param(phr, "binary_input", &s) > 0) binary_input_flag = 1;
if (hr_cgi_param(phr, "enable_iframe_statement", &s) > 0) enable_iframe_statement_flag = 1;
if (hr_cgi_param(phr, "enable_rss_limit", &s) > 0) enable_rss_limit_flag = 1;
+ if (hr_cgi_param(phr, "enable_group_merge", &s) > 0) enable_group_merge_flag = 1;
if (hr_cgi_param(phr, "language_priority", &s) > 0 && *s) {
if (!strcmp(s, "ru,en")
@@ -4732,6 +4734,7 @@ super_serve_op_IMPORT_FROM_POLYGON_ACTION(
pp->binary_input = binary_input_flag;
pp->enable_iframe_statement = enable_iframe_statement_flag;
pp->enable_rss_limit = enable_rss_limit_flag;
+ pp->enable_group_merge = enable_group_merge_flag;
pp->verbose = verbose_flag;
pp->create_mode = 1;
if (upload_mode <= 0) {
@@ -5318,6 +5321,7 @@ super_serve_op_UPDATE_FROM_POLYGON_ACTION(
int binary_input_flag = 0;
int enable_iframe_statement_flag = 0;
int enable_rss_limit_flag = 0;
+ int enable_group_merge_flag = 0;
if (hr_cgi_param(phr, "verbose", &s) > 0) verbose_flag = 1;
@@ -5424,7 +5428,8 @@ super_serve_op_UPDATE_FROM_POLYGON_ACTION(
if (hr_cgi_param(phr, "fetch_latest_available", &s) > 0) fetch_latest_available_flag = 1;
if (hr_cgi_param(phr, "binary_input", &s) > 0) binary_input_flag = 1;
if (hr_cgi_param(phr, "enable_iframe_statement", &s) > 0) enable_iframe_statement_flag = 1;
- if (hr_cgi_param(phr, "enable_rss_limit_flag", &s) > 0) enable_rss_limit_flag = 1;
+ if (hr_cgi_param(phr, "enable_rss_limit", &s) > 0) enable_rss_limit_flag = 1;
+ if (hr_cgi_param(phr, "enable_group_merge", &s) > 0) enable_group_merge_flag = 1;
if ((r = hr_cgi_param(phr, "polygon_url", &s)) < 0) {
fprintf(log_f, "polygon url is invalid\n");
@@ -5511,6 +5516,7 @@ super_serve_op_UPDATE_FROM_POLYGON_ACTION(
pp->binary_input = binary_input_flag;
pp->enable_iframe_statement = enable_iframe_statement_flag;
pp->enable_rss_limit = enable_rss_limit_flag;
+ pp->enable_group_merge = enable_group_merge_flag;
XCALLOC(pp->id, polygon_count + 1);
for (int prob_id = 1, ind = 0; prob_id < ss->prob_a; ++prob_id) {
const struct section_problem_data *prob = ss->probs[prob_id];