Skip to content

Commit

Permalink
fix description in the dojos and contents about course
Browse files Browse the repository at this point in the history
  • Loading branch information
mudongliang committed May 15, 2024
1 parent 3f47c33 commit 3493df5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 39 deletions.
12 changes: 0 additions & 12 deletions dojo_plugin/pages/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,22 +236,10 @@ def view_course(dojo, resource=None):
identity = dict(identity_name=dojo.course.get("student_id", "Identity"),
identity_value=student.token if student else None)

setup = {}
setup["create_account"] = "complete" if user else "incomplete"
setup["link_student"] = (
"incomplete" if not student else
"unknown" if not student.official else
"complete"
)

setup_complete = all(status == "complete" for status in setup.values())

return render_template("course.html",
name=name,
**grades,
**identity,
**setup,
setup_complete=setup_complete,
user=user,
dojo=dojo)

Expand Down
33 changes: 10 additions & 23 deletions dojo_theme/templates/course.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,17 @@
{% block content %}
<div class="jumbotron">
<div class="container">
<h1>Course</h1>
<h1>课程</h1>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-2 offset-md-1">
<div class="nav flex-column nav-pills" role="tablist">
<a class="nav-link active" id="course-syllabus-tab" data-toggle="pill" href="#syllabus" role="tab">Syllabus</a>
<a class="nav-link active" id="course-syllabus-tab" data-toggle="pill" href="#syllabus" role="tab">教学大纲</a>
{% if user %}
<a class="nav-link" id="course-grades-tab" data-toggle="pill" href="#grades" role="tab">Grades</a>
<a class="nav-link" id="course-identity-tab" data-toggle="pill" href="#identity" role="tab">Identity</a>
<a class="nav-link" id="course-setup-tab" data-toggle="pill" href="#setup" role="tab">Setup</a>
<a class="nav-link" id="course-grades-tab" data-toggle="pill" href="#grades" role="tab">成绩</a>
<a class="nav-link" id="course-identity-tab" data-toggle="pill" href="#identity" role="tab">身份信息</a>
{% endif %}
</div>
</div>
Expand All @@ -62,11 +61,11 @@ <h3>{{ name }} current grade in the class: <code style="font-size: 2em">{{ lette
<table class="table table-striped">
<thead>
<tr>
<td scope="col"><b>Name</b></td>
<td scope="col"><b>Date</b></td>
<td scope="col"><b>Weight</b></td>
<td scope="col"><b>Progress</b></td>
<td scope="col"><b>Credit</b></td>
<td scope="col"><b>姓名</b></td>
<td scope="col"><b>日期</b></td>
<td scope="col"><b>权重</b></td>
<td scope="col"><b>进度</b></td>
<td scope="col"><b>学分</b></td>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -94,7 +93,7 @@ <h3>{{ name }} current grade in the class: <code style="font-size: 2em">{{ lette
<form method="post" id="identity-form" autocomplete="off">
<div class="form-group">
<b><label for="enter-name">{{ identity_name }}</label></b>
<small class="form-text text-muted">This will be shared with the admins of this dojo.</small>
<small class="form-text text-muted">这将共享给本道馆的所有管理员。</small>
<br>
<input class="form-control" id="identity" name="identity" type="text" value="{{ identity_value or '' }}">
</div>
Expand All @@ -108,18 +107,6 @@ <h3>{{ name }} current grade in the class: <code style="font-size: 2em">{{ lette
</form>
</div>
{% endif %}
<div class="tab-pane fade" id="setup" role="tabpanel">
<ol>
<li class="setup-{{ create_account }}">Create a pwn.hust.college account <a href="/register">here</a>. You can use an existing account, or create a new one specifically for the course. The username <strong>will be visible publicly</strong>: if you want to be anonymous, do not use your real name.</li>
<li class="setup-{{ link_student }}">Link your pwn.hust.college account with your {{ identity_name }} <a href="identity">here</a>. This is how we will be able to give you your official course grade, and how we will be able to verify your student status for an official course role in Discord.</li>
</ol>
{% if setup_complete %}
<p>Setup complete!</p>
{% else %}
<p>Setup incomplete.</p>
{% endif %}
<p></p>
</div>
</div>
</div>
</div>
Expand Down
9 changes: 5 additions & 4 deletions dojo_theme/templates/dojos.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<div class="container">
<h1>神奇宝贝道馆</h1>
<p>
为了获得神奇宝贝联盟大会的参赛资格,同学们需要在 pwn.hust.college 上挑战各个城市的神奇宝贝道馆,只有战胜馆主大家才能获得相应的道馆徽章
怀揣着成为神奇宝贝大师的梦想,新手训练家们将要开展自己的旅程,在 pwn.hust.college 平台上挑战各个城市的神奇宝贝道馆,战胜馆主后获得 8 枚道馆徽章,并获得神奇宝贝联盟大会的参赛资格
</p>
</div>
</div>
<div class="container">
{% for type, dojos in typed_dojos.items() %}
{% if type == "Start Here" %}
<h2>入门篇</h2>
<p>在开展神奇宝贝道馆挑战前,神奇宝贝需要在真新镇的大木博士研究所获得初始神奇宝贝,神奇宝贝图鉴,神奇宝贝球</p>
<p>在开展神奇宝贝道馆挑战前,新手训练家们需要在真新镇的大木博士研究所获得初始神奇宝贝,神奇宝贝图鉴,神奇宝贝球等物资</p>
{% elif type == "Elementary" %}
<h2>初级篇</h2>
<p>深灰道馆,华蓝道馆构成了 pwn.hust.college 平台初级篇的主要课程内容,完成关卡后你可以获得<a href="{{ url_for("pwncollege_belts.view_belts") }}">徽章</a>奖励。建议按照顺序进行学习,祝你好运!</p>
Expand All @@ -25,8 +25,9 @@ <h2>中级篇</h2>
{% elif type == "Advanced" %}
<h2>高级篇</h2>
<p> 神奇宝贝联盟大会 </p>
<!-- <h2>课程</h2>
<p>在此平台,我们开展了众多课程。这些课程大多采纳上文提及的教材,然而部分课程将引入崭新的观点与挑战。</p> -->
{% elif type == "Course" %}
<h2>课程</h2>
<p>我们在平台上提供了众多课程,包含软件安全。</p>
{% endif %}
<ul class="card-list">
{% for dojo in dojos %}
Expand Down

0 comments on commit 3493df5

Please sign in to comment.