自动查重
This commit is contained in:
@@ -395,9 +395,14 @@ class PlagiarismService
|
||||
$resp = $tii->getViewerUrl($submissionId);
|
||||
$url = '';
|
||||
if (isset($resp['viewer_url'])) {
|
||||
$url = (string)$resp['viewer_url'];
|
||||
$url = (string) $resp['viewer_url'];
|
||||
} elseif (isset($resp['url'])) {
|
||||
$url = (string)$resp['url'];
|
||||
$url = (string) $resp['url'];
|
||||
} elseif (isset($resp['launch_url'])) {
|
||||
$url = (string) $resp['launch_url'];
|
||||
}
|
||||
if ($url === '') {
|
||||
throw new Exception('viewer-url response has no url: ' . json_encode($resp, JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
// 默认 2 小时过期,保守起见
|
||||
return ['url' => $url, 'expire' => time() + 7200];
|
||||
|
||||
Reference in New Issue
Block a user