Compare commits

...

2 Commits

Author SHA1 Message Date
0c21b31517
feat: mathjax support on user_self_review page
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-22 10:38:06 +08:00
1b955c5913
feat: allow to use more builtin checkers 2022-09-22 10:26:16 +08:00
2 changed files with 14 additions and 7 deletions

View File

@ -755,10 +755,16 @@ EOD
<label for="use_builtin_checker" class="col-sm-5 control-label">比对函数</label>
<div class="col-sm-7">
<select class="form-control" id="use_builtin_checker" name="use_builtin_checker">
<option value="ncmp">单行整数序列</option>
<option value="wcmp">单行字符串序列</option>
<option value="fcmp">多行数据(不忽略行末空格,但忽略文末回车)</option>
<option value="ownchk">自定义校验器</option>
<option value="ncmp">ncmp: 整数序列</option>
<option value="wcmp">wcmp: 字符串序列</option>
<option value="fcmp">fcmp: 多行数据(不忽略行末空格,但忽略文末回车)</option>
<option value="rcmp4">rcmp4: 浮点数序列(误差不超过 1e-4</option>
<option value="rcmp6">rcmp6: 浮点数序列(误差不超过 1e-6</option>
<option value="rcmp9">rcmp9: 浮点数序列(误差不超过 1e-9</option>
<option value="yesno">yesno: Yes、No不区分大小写</option>
<option value="uncmp">uncmp: 整数集合</option>
<option value="bcmp">bcmp: 二进制文件</option>
<option value="ownchk">自定义校验器chk.cpp</option>
</select>
<!--<input type="hidden" class="form-control" id="use_builtin_checker" name="use_builtin_checker" placeholder="比对函数">-->
</div>

View File

@ -11,6 +11,7 @@
$username = UOJContext::user()['username'];
$REQUIRE_LIB['mathjax'] = '';
?>
<?php echoUOJPageHeader(UOJLocale::get('contests::contest self reviews')) ?>
@ -64,7 +65,7 @@
$result .= '<td><div id="' . $problem_review_id . '"></div></td>';
$esc_problem_self_review = rawurlencode($problem_self_review != null ? $problem_self_review['content'] : '');
$result .= '<script type="text/javascript">'
. "$(function() { $('#$problem_review_id').html(DOMPurify.sanitize(decodeURIComponent(\"{$esc_problem_self_review}\"), $dom_sanitize_config)); });"
. "(function() { $('#$problem_review_id').html(DOMPurify.sanitize(decodeURIComponent(\"{$esc_problem_self_review}\"), $dom_sanitize_config)); })();"
. '</script>';
if ($i == 0) {
@ -73,7 +74,7 @@
$esc_contest_self_review = rawurlencode($contest_self_review != null ? $contest_self_review['content'] : '');
$result .= '<td rowspan="' . $n_contest_problems . '"><div id="' . $contest_review_id . '"></div></td>';
$result .= '<script type="text/javascript">'
. "$(function() { $('#$contest_review_id').html(DOMPurify.sanitize(decodeURIComponent(\"{$esc_contest_self_review}\"), $dom_sanitize_config)); });"
. "(function() { $('#$contest_review_id').html(DOMPurify.sanitize(decodeURIComponent(\"{$esc_contest_self_review}\"), $dom_sanitize_config)); })();"
. '</script>';
}
@ -85,5 +86,5 @@
echoLongTable($col_names, $from, $cond, $tail, $header_row, $print_row, $config);
?>
<script>if (window.MathJax) MathJax.typeset();</script>
<?php echoUOJPageFooter() ?>