41 lines
1.3 KiB
HTML
41 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>教师面板</title>
|
|
<link rel="stylesheet" href="/static/teacher.css">
|
|
<link rel="stylesheet" href="/static/base.css">
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>教师面板</h1>
|
|
<a href="{{ url_for('teacher_logout') }}" class="logout-btn">登出</a>
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category }}">{{ message }}</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
<h2>选择班级</h2>
|
|
<select id="class_select" onchange="navigateToClass(this.value)">
|
|
<option value="">选择一个班级</option>
|
|
{% for class in classes %}
|
|
<option value="{{ class.id }}">{{ class.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
|
|
<!-- 额外内容如班级作业和学生提交将在这里显示。 -->
|
|
</div>
|
|
<script>
|
|
function navigateToClass(classId) {
|
|
if (classId) {
|
|
window.location.href = `/teacher/class/${classId}`;
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|