Skip to content

Commit 88751e7

Browse files
committed
remove working days
1 parent b796bff commit 88751e7

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

newDay.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
}
4848

4949
foreach ($contestSettings as $key => $value) {
50-
if (!isset($contestSettings[$key]['workingDays']["workingDays"])) {
50+
if (!isset($contestSettings[$key]['workingDays'])) {
5151
$contestSettings[$key]['workingDays'] = "1111111";
5252
}
5353
AllContests::addContest($contestIndex, $key, $contestSettings[$key]['difficulties'], $contestSettings[$key]['workingDays'],
@@ -65,13 +65,15 @@
6565
if (isset($setting["Week" . $contestIndex])) {
6666
$contestSettings = $setting["Week" . $contestIndex][$contest->getContestLevel()];
6767
} else {
68-
echo "week setting not found! using week default setting...\n";
68+
file_put_contents('/data/log.txt', "week setting not found! using week default setting...\n", FILE_APPEND);
6969
$contestSettings = $setting["WeekDefault"][$contest->getContestLevel()];
7070
}
7171
$forbiddenUsers = $api->getActiveParticipates($contest->contestId);
72-
echo "(" . implode(', ', $forbiddenUsers) . ") are active users for contest " . $contest->contestId . "\n";
72+
73+
file_put_contents('/data/log.txt', "(" . implode(', ', $forbiddenUsers) . ") are active users for contest " . $contest->contestId . "\n", FILE_APPEND);
7374
$forbiddenProblemIds = $cfApi->getForbiddenProblemIds($forbiddenUsers);
74-
echo "number of forbidden problem:" . count($forbiddenProblemIds) . "\n";
75+
file_put_contents('/data/log.txt', "number of forbidden problem:" . count($forbiddenProblemIds) . "\n" . $contest->contestId . "\n", FILE_APPEND);
76+
7577
if (isset($contestSettings["hideProblemsEveryDay"]) && $contestSettings["hideProblemsEveryDay"]) {
7678
$api->setVisibilityProblems($contest->contestId, false);
7779
}

test.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
$cfApi = new CodeforcesApi();
1717

1818

19-
foreach (AllContests::$contests[4] as $contest) {
20-
$api->setVisibilityProblems($contest->contestId, true);
21-
}
19+
//foreach (AllContests::$contests[4] as $contest) {
20+
$api->setVisibilityProblems(281384, false);
21+
//}
2222

23-
require "updateUsers.php";
23+
//require "updateUsers.php";

0 commit comments

Comments
 (0)