File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -282,6 +282,14 @@ public function getSubmissionList(
282
282
->andWhere ($ countQueryExtras ['queued ' ])
283
283
->getQuery ()
284
284
->getSingleScalarResult ();
285
+ $ counts ['inContest ' ] = (clone $ queryBuilder )
286
+ ->select ('COUNT(s.submitid) ' )
287
+ ->join ('s.contest ' , 'c ' )
288
+ ->join ('t.category ' , 'tc ' )
289
+ ->andWhere ('s.submittime BETWEEN c.starttime AND c.endtime ' )
290
+ ->andWhere ('tc.visible = true ' )
291
+ ->getQuery ()
292
+ ->getSingleScalarResult ();
285
293
286
294
return [$ submissions , $ counts ];
287
295
}
Original file line number Diff line number Diff line change 41
41
{% if submissionCounts .queued > 0 %}
42
42
<span class =" badge text-bg-danger" >{{ submissionCounts .queued }} queued (from {{submissionCounts .perteam }} teams)</span >
43
43
{% endif %}
44
+
45
+ {% if submissionCounts .inContest > 0 %}
46
+ <span class =" badge text-bg-secondary" >{{ submissionCounts .inContest }} in contest</span >
47
+ {% endif %}
44
48
</div >
45
49
46
50
<table class =" data-table table table-hover table{% if showExternalResult and showExternalTestcases %}-3{% endif %}-striped table-sm submissions-table table-full-clickable-cell" >
You can’t perform that action at this time.
0 commit comments