Skip to content

Commit

Permalink
enable_extended_info works for checkers
Browse files Browse the repository at this point in the history
  • Loading branch information
hseosgit committed Sep 22, 2020
1 parent 092e2fa commit deb1385
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/run_common.c
Expand Up @@ -2112,6 +2112,19 @@ invoke_checker(
task_SetEnv(tsk, "EJUDGE_USER_SCORE", "1");
user_score_mode = 1;
}
if (srpp->enable_extended_info > 0) {
unsigned char buf[64];
snprintf(buf, sizeof(buf), "%d", srgp->user_id);
task_SetEnv(tsk, "EJUDGE_USER_ID", buf);
snprintf(buf, sizeof(buf), "%d", srgp->contest_id);
task_SetEnv(tsk, "EJUDGE_CONTEST_ID", buf);
snprintf(buf, sizeof(buf), "%d", srgp->run_id);
task_SetEnv(tsk, "EJUDGE_RUN_ID", buf);
snprintf(buf, sizeof(buf), "%d", cur_test);
task_SetEnv(tsk, "EJUDGE_TEST_NUM", buf);
task_SetEnv(tsk, "EJUDGE_USER_LOGIN", srgp->user_login);
task_SetEnv(tsk, "EJUDGE_USER_NAME", srgp->user_name);
}
task_EnableAllSignals(tsk);

task_PrintArgs(tsk);
Expand Down

0 comments on commit deb1385

Please sign in to comment.