80 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			80 lines
		
	
	
		
			2.8 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/base.css">
 | |
| </head>
 | |
| <body>
 | |
|     <div class="container">
 | |
|         <h1>班级详情</h1>
 | |
|         <a href="{{ url_for('teacher_panel') }}">返回教师面板</a>
 | |
| 
 | |
|         <h2>作业</h2>
 | |
|         <form action="{{ url_for('teacher_add_assignment', class_id=class_id) }}" method="POST">
 | |
|             <div class="form-group">
 | |
|                 <label for="value">作业存储名称:</label>
 | |
|                 <input type="text" id="value" name="value" required>
 | |
|             </div>
 | |
|             <div class="form-group">
 | |
|                 <label for="name">作业显示名称:</label>
 | |
|                 <input type="text" id="name" name="name" required>
 | |
|             </div>
 | |
|             <div class="form-group">
 | |
|                 <label for="deadline">截止日期:</label>
 | |
|                 <input type="date" id="deadline" name="deadline" required>
 | |
|             </div>
 | |
|             <button type="submit">添加作业</button>
 | |
|         </form>
 | |
| 
 | |
|         <h2>现有作业</h2>
 | |
|         <table>
 | |
|             <thead>
 | |
|                 <tr>
 | |
|                     <th>作业存储名称</th>
 | |
|                     <th>作业显示名称</th>
 | |
|                     <th>截止日期</th>
 | |
|                     <th>操作</th>
 | |
|                 </tr>
 | |
|             </thead>
 | |
|             <tbody>
 | |
|                 {% for assignment in assignments %}
 | |
|                     <tr>
 | |
|                         <td>{{ assignment.value }}</td>
 | |
|                         <td>{{ assignment.name }}</td>
 | |
|                         <td>{{ assignment.deadline }}</td>
 | |
|                         <td>
 | |
|                             <button onclick="editAssignment({{ assignment.id }}, '{{ assignment.deadline }}')">修改</button>
 | |
|                             <button onclick="deleteAssignment({{ assignment.id }})">删除</button>
 | |
|                             <button onclick="downloadAssignment('{{ assignment.value }}')">下载</button>
 | |
|                         </td>
 | |
|                     </tr>
 | |
|                 {% endfor %}
 | |
|             </tbody>
 | |
|         </table>
 | |
| 
 | |
|         <h2>学生</h2>
 | |
|         <table>
 | |
|             <thead>
 | |
|                 <tr>
 | |
|                     <th>学生 ID</th>
 | |
|                     <th>学生姓名</th>
 | |
|                     <th>邮箱</th>
 | |
|                 </tr>
 | |
|             </thead>
 | |
|             <tbody>
 | |
|                 {% for student in students %}
 | |
|                     <tr>
 | |
|                         <td>{{ student.id }}</td>
 | |
|                         <td>{{ student.name }}</td>
 | |
|                         <td>{{ student.email }}</td>
 | |
|                     </tr>
 | |
|                 {% endfor %}
 | |
|             </tbody>
 | |
|         </table>
 | |
|     </div>
 | |
|     <!-- JavaScript 文件 -->
 | |
|     <script src="/static/class_detail.js"></script>
 | |
| </body>
 | |
| </html> | 
