准备合并main
This commit is contained in:
@@ -44,6 +44,8 @@ def realtime_response(config: dict, realtime_action: dict) -> None:
|
|||||||
bb.pasted_content = realtime_action.get("content")
|
bb.pasted_content = realtime_action.get("content")
|
||||||
with open(os.path.join(bb.root_path, bb.active_file_path), "r", encoding="utf-8") as f:
|
with open(os.path.join(bb.root_path, bb.active_file_path), "r", encoding="utf-8") as f:
|
||||||
bb.active_file_content = f.read()
|
bb.active_file_content = f.read()
|
||||||
|
# TODO: 让大模型检查当前这个文件和用户paste的代码,基于此判断是否需要打断学生写代码并询问其理解
|
||||||
|
# chatmanager.ase_client.send("check_code", {"file_path": file_path, "content": bb.pasted_content})
|
||||||
|
|
||||||
elif rtype == "fileEdit":
|
elif rtype == "fileEdit":
|
||||||
file_path = realtime_action.get("filePath")
|
file_path = realtime_action.get("filePath")
|
||||||
|
|||||||
@@ -391,7 +391,6 @@ def _default_markdowns(lesson_name: str):
|
|||||||
"""三份占位 Markdown 文本。可按需调整模板内容。"""
|
"""三份占位 Markdown 文本。可按需调整模板内容。"""
|
||||||
ts = datetime.now().strftime('%Y-%m-%d %H:%M')
|
ts = datetime.now().strftime('%Y-%m-%d %H:%M')
|
||||||
lesson_md = f"""# {lesson_name}
|
lesson_md = f"""# {lesson_name}
|
||||||
> Auto-generated at {ts}
|
|
||||||
|
|
||||||
## 阶段一:示例阶段
|
## 阶段一:示例阶段
|
||||||
### 步骤A
|
### 步骤A
|
||||||
@@ -402,7 +401,6 @@ def _default_markdowns(lesson_name: str):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
prompt_md = f"""# {lesson_name}
|
prompt_md = f"""# {lesson_name}
|
||||||
> Prompt for LLM (auto-generated at {ts})
|
|
||||||
|
|
||||||
## 阶段一:示例阶段
|
## 阶段一:示例阶段
|
||||||
### 步骤A
|
### 步骤A
|
||||||
@@ -413,7 +411,6 @@ def _default_markdowns(lesson_name: str):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
score_prompt_md = f"""# {lesson_name}
|
score_prompt_md = f"""# {lesson_name}
|
||||||
> Scoring Prompt for LLM (auto-generated at {ts})
|
|
||||||
|
|
||||||
## 评分准则
|
## 评分准则
|
||||||
- 正确性、完整性、可读性、效率(按需调整权重)
|
- 正确性、完整性、可读性、效率(按需调整权重)
|
||||||
|
|||||||
85
Html/apps/static/css/footer.css
Normal file
85
Html/apps/static/css/footer.css
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
/* === 同款页脚 === */
|
||||||
|
.hs-footer {
|
||||||
|
background: #ffffff;
|
||||||
|
border-top: 1px solid #e5e7eb;
|
||||||
|
color: #4b5563;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.8;
|
||||||
|
padding: 48px 20px 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-main {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 48px;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-col {
|
||||||
|
flex: 1 1 240px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-col h4 {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #111827;
|
||||||
|
margin: 0 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-col ul {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-col li {
|
||||||
|
margin: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-col a {
|
||||||
|
color: #4b5563;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-col a:hover {
|
||||||
|
color: #2563eb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-bottom {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 12px;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 40px auto 0;
|
||||||
|
border-top: 1px solid #e5e7eb;
|
||||||
|
padding-top: 24px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #9ca3af;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-bottom-left a,
|
||||||
|
.footer-bottom-right a {
|
||||||
|
color: #9ca3af;
|
||||||
|
margin-right: 12px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-bottom-left a:hover,
|
||||||
|
.footer-bottom-right a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 移动端 */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.footer-main {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 32px;
|
||||||
|
}
|
||||||
|
.footer-bottom {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -46,6 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% include 'foot.html' %}
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
var course_id = "{{course_id}}";
|
var course_id = "{{course_id}}";
|
||||||
|
|||||||
@@ -79,6 +79,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% include 'foot.html' %}
|
||||||
|
|
||||||
<script src="/static/js/dashboard.js"></script>
|
<script src="/static/js/dashboard.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// 解析用户数据和课程数据
|
// 解析用户数据和课程数据
|
||||||
|
|||||||
50
Html/apps/templates/foot.html
Normal file
50
Html/apps/templates/foot.html
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<link rel="stylesheet" href="/static/css/footer.css">
|
||||||
|
<footer class="hs-footer">
|
||||||
|
<div class="footer-main">
|
||||||
|
<div class="footer-col">
|
||||||
|
<h4>华实学伴</h4>
|
||||||
|
<ul>
|
||||||
|
<li><a href="/">首页</a></li>
|
||||||
|
<li><a href="/guide">学习指南</a></li>
|
||||||
|
<li><a href="/about">关于华实</a></li>
|
||||||
|
<li><a href="/contact">联系我们</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="footer-col">
|
||||||
|
<h4>课程分类</h4>
|
||||||
|
<ul>
|
||||||
|
<li><a href="/courses/popular">热门课程</a></li>
|
||||||
|
<li><a href="/courses/latest">最新课程</a></li>
|
||||||
|
<li><a href="/resources">学习资源库</a></li>
|
||||||
|
<li><a href="/faq">常见问题</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="footer-col">
|
||||||
|
<h4>联系我们</h4>
|
||||||
|
<p>邮箱:huashi@ecnu.com</p>
|
||||||
|
<p>致力于为全球学习者提供高质量的在线教育资源和学习体验,帮助每个人实现自我提升和职业发展。</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="footer-col">
|
||||||
|
<h4>华东师范大学</h4>
|
||||||
|
<p>热门课程</p>
|
||||||
|
<p>学习社区</p>
|
||||||
|
<p>联系我们</p>
|
||||||
|
<p>最新课程</p>
|
||||||
|
<p>学习资源库</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="footer-bottom">
|
||||||
|
<div class="footer-bottom-left">
|
||||||
|
<a href="/privacy">隐私政策</a>
|
||||||
|
<a href="/terms">使用条款</a>
|
||||||
|
</div>
|
||||||
|
<div class="footer-bottom-right">
|
||||||
|
<span>© 2025 华实学伴. 保留所有权利</span>
|
||||||
|
<a href="https://beian.miit.gov.cn" target="_blank">沪ICP备2025142149号</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
@@ -1,49 +1,22 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh">
|
<html lang="zh">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<title>课程选择主页</title>
|
||||||
<title>课程选择主页</title>
|
<link rel="stylesheet" href="/static/css/navbar.css">
|
||||||
<link rel="stylesheet" href="/static/css/index.css">
|
<link rel="stylesheet" href="/static/css/footer.css">
|
||||||
</head>
|
</head>
|
||||||
<body >
|
<body>
|
||||||
{% include 'navbar.html' %} <!-- 引入navbar.html -->
|
<header class="navbar">
|
||||||
<main>
|
<!-- 原有导航内容保留 -->
|
||||||
<div class="course-selection">
|
{% include 'navbar.html' %}
|
||||||
<h2>课程列表</h2>
|
</header>
|
||||||
<div class="course-list">
|
|
||||||
{% for course in courses_data %}
|
|
||||||
<div class="course-card" onclick="show_course_details('{{ course._id }}')">
|
|
||||||
<img src="{{ course.image_url }}" alt="{{ course.course_name }}">
|
|
||||||
<h3>{{ course.name }}</h3>
|
|
||||||
<p>{{ course.description }}</p>
|
|
||||||
{% if course._id in selected_courses %}
|
|
||||||
<button class="selected-button">已选择</button>
|
|
||||||
{% else %}
|
|
||||||
<button class="select-button" data-course-id="{{course._id}}">选择课程</button>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
</div>
|
<main>
|
||||||
</div>
|
<!-- 原有主体内容保留 -->
|
||||||
</main>
|
{% block content %}{% endblock %}
|
||||||
|
</main>
|
||||||
<footer>
|
|
||||||
<p>版权所有 © 2024 “华实伴学君”——教学练评一体的虚拟编码助教</p>
|
|
||||||
<p>
|
|
||||||
<a href="https://beian.miit.gov.cn" target="_blank" rel="noopener noreferrer">
|
|
||||||
沪ICP备2025142149号
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
|
{% include 'foot.html' %}
|
||||||
</body>
|
</body>
|
||||||
<script>
|
|
||||||
window.appData = {
|
|
||||||
user_selected_courses: JSON.parse(`{{selected_courses}}`.replace(/"/g, "\""))
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<script src="/static/js/index.js"></script>
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -120,6 +120,6 @@
|
|||||||
<script src="/static/js/course_current.js"></script>
|
<script src="/static/js/course_current.js"></script>
|
||||||
<script src="/static/js/teacherboard.js"></script>
|
<script src="/static/js/teacherboard.js"></script>
|
||||||
<script src="/static/js/teacher_course_setting.js"></script>
|
<script src="/static/js/teacher_course_setting.js"></script>
|
||||||
|
{% include 'foot.html' %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
1
Html/db/data/user/test1020.json
Normal file
1
Html/db/data/user/test1020.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"username": "test1020"}
|
||||||
Reference in New Issue
Block a user