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 authored and wumingzhilian committed May 15, 2024
1 parent 5167780 commit 61f92a5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 40 deletions.
5 changes: 2 additions & 3 deletions challenge/Dockerfile_amd64
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,8 @@ COPY --link --from=builder-code-server / /
################################################################################

FROM challenge-micro as challenge-mini
COPY --link --from=builder-desktop-base / /
COPY --link --from=builder-desktop-base-yes / /
COPY --link --from=builder-desktop-xfce-yes / /

################################################################################

Expand All @@ -624,7 +625,6 @@ COPY --link --from=builder-geckodriver / /
COPY --link --from=builder-burpsuite / /
COPY --link --from=builder-busybox / /
COPY --link --from=builder-glow / /
COPY --link --from=builder-desktop-xfce / /
COPY --link --from=builder-virtiofsd /opt/virtiofsd /opt/virtiofsd
COPY --link --from=builder-desktop-ida-free / /
COPY --link --from=builder-desktop-binja-free / /
Expand Down Expand Up @@ -656,7 +656,6 @@ COPY --link --from=builder-geckodriver-yes / /
COPY --link --from=builder-burpsuite-yes / /
COPY --link --from=builder-busybox-yes / /
COPY --link --from=builder-glow-yes / /
COPY --link --from=builder-desktop-xfce-yes / /
COPY --link --from=builder-virtiofsd-yes /opt/virtiofsd /opt/virtiofsd
COPY --link --from=builder-desktop-ida-free / /
COPY --link --from=builder-desktop-binja-free / /
Expand Down
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
7 changes: 5 additions & 2 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,6 +25,9 @@ <h2>中级篇</h2>
{% elif type == "Advanced" %}
<h2>高级篇</h2>
<p> 神奇宝贝联盟大会 </p>
{% elif type == "Course" %}
<h2>课程</h2>
<p>我们在平台上提供了众多课程,包含软件安全。</p>
{% elif type == "Archive" %}
<h2>归档</h2>
<p>历史课程</p>
Expand Down

0 comments on commit 61f92a5

Please sign in to comment.