Skip to content

Commit

Permalink
fixed bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brethland committed Jul 22, 2019
1 parent e65bbbc commit f3c2656
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Submitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ private function contestSubmit() {
$params=[
'problemid' => $this->post_data['iid'],
'language' => $this->post_data['lang'],
'usercode' => base64_encode($this->post_data["solution"]),
'usercode' => base64_encode(urlencode($this->post_data["solution"])),
// 'submit' => 'Submit',
];

Expand Down
5 changes: 3 additions & 2 deletions Synchronizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private function _loginAndGet($url)
{
$curl = new Curl();
$response=$curl->grab_page([
'site' => 'http://acm.hdu.edu.cn',
'site' => 'http://acm.hdu.edu.cn/contests/contest_show.php?cid='.$this->vcid,
'oj' => 'hdu',
'handle' => $this->selectedJudger["handle"]
]);
Expand All @@ -51,7 +51,7 @@ private function _loginAndGet($url)
'login' => 'Sign In',
];
$curl->login([
'url' => 'http://acm.hdu.edu.cn/userloginex.php?action=login',
'url' => 'http://acm.hdu.edu.cn/userloginex.php?cid='.$this->vcid,
'data' => http_build_query($params),
'oj' => 'hdu',
'handle' => $this->selectedJudger["handle"]
Expand Down Expand Up @@ -290,6 +290,7 @@ public function crawlRank()
}
}
$contestRankRaw = $contestModel->contestRankCache($this->noj_cid);
// Log::debug(json_encode($rank));
$rankFinal = array_merge($rank,$contestRankRaw);
usort($rankFinal, function ($a, $b) {
if ($a["score"]==$b["score"]) {
Expand Down
2 changes: 1 addition & 1 deletion babel.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"description": "HDU Interface for NOJ",
"license": "MIT",
"repository":"https://github.com/NJUPTAAA/NOJ_Extension_HDU",
"version":"0.3.0",
"version":"0.3.1",
"website":"http://acm.hdu.edu.cn/",
"custom":{
"css":"resources/custom.css"
Expand Down

0 comments on commit f3c2656

Please sign in to comment.