|
|
@ -15,15 +15,17 @@ const getSubmissionInfo = (s, displayConfig) => ({ |
|
|
|
const getRoughResult = (x, displayConfig, roughOnly) => { |
|
|
|
const getRoughResult = (x, displayConfig, roughOnly) => { |
|
|
|
if (displayConfig.showResult) { |
|
|
|
if (displayConfig.showResult) { |
|
|
|
if (x.pending) { |
|
|
|
if (x.pending) { |
|
|
|
let res = getCachedJudgeState(x.task_id) || null |
|
|
|
let res = getCachedJudgeState(x.task_id) || null; |
|
|
|
if (!res) return null; |
|
|
|
if (!res) return null; |
|
|
|
|
|
|
|
|
|
|
|
if (roughOnly) { |
|
|
|
if (roughOnly) { |
|
|
|
res.result = 'Judging'; |
|
|
|
return Object.assign({}, res, { |
|
|
|
res.time = res.memory = res.score = 0; |
|
|
|
result: 'Judging', |
|
|
|
} |
|
|
|
time: 0, |
|
|
|
|
|
|
|
memory: 0, |
|
|
|
return res; |
|
|
|
score: 0 |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else return res; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return { |
|
|
|
return { |
|
|
|
result: x.status, |
|
|
|
result: x.status, |
|
|
|