Skip to content

Commit

Permalink
🎓 problemViewer: ranking table show pending subs
Browse files Browse the repository at this point in the history
  • Loading branch information
Belikhun committed May 13, 2021
1 parent 3519c52 commit 53beab8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions api/contest/problems/rank.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
$subList = $sub -> list();

$userData = (new Account($user)) -> getDetails();
$data = $sub -> getData($id);

if (!$data || !isset($data["header"]))
continue;

$res[$user] = Array(
"username" => $user,
"name" => ($userData && isset($userData["name"]))
Expand All @@ -75,11 +80,6 @@
"lastModify" => null
);

$data = $sub -> getData($id);

if (!$data || !isset($data["header"]))
continue;

$data = $data["header"];
$meta = $sub -> getMeta($id);

Expand Down
2 changes: 1 addition & 1 deletion static/css/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -2636,7 +2636,7 @@ panel > .main > .loadingWrapper.show {
#submitContainer > .queue.queue:empty::before {
content: "\f574";
font-size: 48px;
transform: translate(-50%, calc(-50% - 14px));
transform: translate(-50%, calc(-50% - 18px));
}

#submitContainer > .queue.queue:empty::after {
Expand Down
18 changes: 9 additions & 9 deletions static/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1600,14 +1600,14 @@ const twi = {
}},

bottom: { tag: "span", class: "bottom", child: {
submitNth: { tag: "span", class: ["item", ["green", "yellow"][item.statistic.reSubmit - 1] || "red"], child: {
submitNth: { tag: "span", class: ["item", item.statistic ? ["green", "yellow"][item.statistic.submitNth - 1] || "red" : "gray"], child: {
label: { tag: "t", class: "label", child: {
text: { tag: "content", text: "Thứ Hạng Chấm" },
tip: { tag: "tip", title: "Thứ hạng ghi nhận có kết quả chấm" }
}},

value: { tag: "t", class: "value", child: {
left: { tag: "t", text: item.statistic.submitNth || "" },
left: { tag: "t", text: item.statistic ? (item.statistic.submitNth || "") : "" },
right: {
tag: "t",
text: (item.sp)
Expand All @@ -1617,10 +1617,10 @@ const twi = {
}}
}},

reSubmit: { tag: "span", class: ["item", ["green", "yellow"][item.statistic.reSubmit - 1] || "red"], child: {
reSubmit: { tag: "span", class: ["item", item.statistic ? ["green", "yellow"][item.statistic.reSubmit - 1] || "red" : "gray"], child: {
label: { tag: "t", class: "label", text: "Chấm Lại" },
value: { tag: "t", class: "value", child: {
left: { tag: "t", text: item.statistic.reSubmit || "" },
left: { tag: "t", text: item.statistic ? (item.statistic.reSubmit || "") : "" },
right: {
tag: "t",
text: (item.sp)
Expand Down Expand Up @@ -1651,7 +1651,7 @@ const twi = {
value: { tag: "t", class: "value", child: {
left: {
tag: "t",
text: item.statistic.remainTime
text: (item.statistic && item.statistic.remainTime)
? parseTime(item.statistic.remainTime).str
: ""
},
Expand Down Expand Up @@ -1777,12 +1777,12 @@ const twi = {
}},

uName: { tag: "td", text: item.name || item.username, attribute: { username: item.username } },
submitNth: { tag: "td", text: item.statistic.submitNth || "" },
reSubmit: { tag: "td", text: item.statistic.reSubmit || "" },
submitNth: { tag: "td", text: item.statistic ? (item.statistic.submitNth || "") : "" },
reSubmit: { tag: "td", text: item.statistic ? (item.statistic.reSubmit || "") : "" },

remainTime: {
tag: "td",
text: (item.statistic.remainTime)
text: (item.statistic && item.statistic.remainTime)
? parseTime(item.statistic.remainTime).str
: ""
},
Expand Down Expand Up @@ -4648,7 +4648,7 @@ const twi = {
for (let f of this.changeHandlers[key])
await f(hash);
} else
this.log("DEBG", "Hash Initialized:", { text: hash, color: oscColor("green") });
this.log("DEBG", "Hash Initialized:", { text: key, color: oscColor("blue") });
}
}
},
Expand Down

0 comments on commit 53beab8

Please sign in to comment.