Skip to content

Commit

Permalink
chore: 更新文字,个人中心 → 历史成绩
Browse files Browse the repository at this point in the history
  • Loading branch information
YDX-2147483647 committed Aug 23, 2024
1 parent 256b5c7 commit be12e4b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion contest/quiz/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ConstantsNamespace:
ROUTES = {
"quiz:index": PageMeta(title="主页", login_required=False),
"quiz:contest": PageMeta(title="答题", login_required=True, reluctant=True),
"quiz:info": PageMeta(title="个人中心", login_required=True),
"quiz:info": PageMeta(title="历史成绩", login_required=True),
"quiz:contest_review": PageMeta(title="回顾", login_required=True, reluctant=True),
}

Expand Down
17 changes: 11 additions & 6 deletions contest/quiz/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,22 @@
</defs>
</svg>
{# Left/top: Texts #}
<div class="mx-auto max-w-md px-6 text-center lg:mx-0 lg:flex-auto lg:py-16 lg:text-left">
<h1 class="text-3xl font-bold tracking-tight sm:text-4xl">
<div class="mx-auto max-w-md px-6 lg:mx-0 lg:flex-auto lg:py-16">
<p class="text-lg leading-8 text-gray-600 text-center lg:text-left">
欢迎各位新同学参与
</p>
<h1 class="text-3xl font-bold tracking-tight sm:text-4xl text-center lg:text-left">
<span class="text-2xl sm:text-3xl">北京理工大学</span>
<br>
国防知识竞赛
</h1>
<p class="mt-6 text-lg leading-8 text-gray-600">
系统随机抽取{{ constants.n_questions_per_response_total }}道题,限时{{ constants.DEADLINE_DURATION | natural_delta }}。每人限答{{ constants.MAX_TRIES }}次,取<span class="text-red-700 font-bold">最高成绩</span>为学生个人成绩。
<strong>规则:</strong>系统随机抽取{{ constants.n_questions_per_response_total }}道题,限时{{ constants.DEADLINE_DURATION | natural_delta }}。每人限答{{ constants.MAX_TRIES }}次,取最高成绩为最终个人成绩。
</p>
<p class="text-lg leading-8 text-gray-600">
<strong>作答注意事项:</strong>由于系统与网络原因,请尽量<strong class="text-red-700">在时间截止前手动交卷</strong><strong class="text-red-700">切勿同时打开多个答题页面</strong>,否则只有某一页面答卷有效,影响成绩计算。
</p>
<p class="text-lg leading-8 text-red-700 font-bold">由于系统与网络原因,请尽量在时间截止前手动交卷。另外建议不要多开答题页面,否则只有某一页面的答卷有效,可能出现随机性。</p>
<p class="text-lg leading-8 text-gray-600">希望同学们掌握好答题时间,并做好充分的答题准备,预祝同学们考个好成绩!</p>
<p class="text-lg leading-8 text-gray-600">预祝同学们答题顺利,取得好成绩!</p>
<div class="mt-10 flex items-center justify-center gap-x-6 lg:justify-start">
{% if not user.is_authenticated or status == 'taking contest' or user.student and user.student.n_left_tries > 0 %}
{# 不确定 or 正在答题 or 还能发卷 ⇒ 显示 #}
Expand Down Expand Up @@ -72,7 +77,7 @@ <h1 class="text-3xl font-bold tracking-tight sm:text-4xl">
</p>
{% endif %}
<a class="text-sm font-semibold leading-6 hover:text-gray-500"
href="{% url 'quiz:info' %}">个人中心 <span aria-hidden="true"></span></a>
href="{% url 'quiz:info' %}">历史成绩 <span aria-hidden="true"></span></a>
</div>
</div>
{# Right/bottom: Image #}
Expand Down
2 changes: 1 addition & 1 deletion contest/quiz/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def setUp(self):
self.student = Student.objects.create(user=self.user)

def test_info_view(self):
"""访问个人中心"""
"""访问历史成绩"""
self.client.force_login(self.user)

response = self.client.get(reverse("quiz:info"))
Expand Down
2 changes: 1 addition & 1 deletion contest/quiz/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def get_context_data(self, **kwargs) -> dict[str, Any]:

@method_decorator(student_only, name="dispatch")
class InfoView(LoginRequiredMixin, IndexView):
"""个人中心"""
"""历史成绩"""

template_name = "info.html"

Expand Down

0 comments on commit be12e4b

Please sign in to comment.