Skip to content

Commit

Permalink
Add INT status to problem auto-highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
v3ctor committed Feb 27, 2021
1 parent b3a2725 commit 2c950cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/js/problems.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,14 @@


// Highlighting solved tasks
const STATUS_ERR = 3;
const STATUS_ERR = 4;
const STATUS_INT = 3;
const STATUS_OK = 2;
const STATUS_QUE = 1;
const STATUS_NONE = 1000;
const STATUS_MAP = {
[STATUS_ERR]: 'err',
[STATUS_INT]: 'int',
[STATUS_OK]: 'ok',
[STATUS_QUE]: 'que',
[STATUS_NONE]: 'none',
Expand Down Expand Up @@ -341,6 +343,8 @@
TEST_NUMBER_REGEX.test(status) ||
ACCURACY_REGEX.test(status)) {
statusInt = STATUS_OK;
} else if (status.search('INT') !== -1) {
statusInt = STATUS_INT;
} else {
statusInt = STATUS_ERR;
}
Expand Down
4 changes: 4 additions & 0 deletions ext/scss/problems.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ table.results {
background-color: #FFF2C8;
}

td.satori-enhancements-status-int {
background-color: #94F7FC;
}

td.satori-enhancements-status-err {
background-color: #F8C3D2;
}
Expand Down

0 comments on commit 2c950cd

Please sign in to comment.