From a28669d7a34050e2b481d71c2fe664510b323cfd Mon Sep 17 00:00:00 2001 From: "p412319.zxc" <2651231880@qq.com> Date: Mon, 3 Jun 2024 23:16:32 +0800 Subject: [PATCH] commit_07 --- .../SSCM/__pycache__/settings.cpython-312.pyc | Bin 2711 -> 2760 bytes SSCM/SSCM/settings.py | 1 + SSCM/__pycache__/manage.cpython-312.pyc | Bin 0 -> 1031 bytes SSCM/course/__pycache__/cbvs.cpython-312.pyc | Bin 3965 -> 3987 bytes SSCM/course/__pycache__/forms.cpython-312.pyc | Bin 4111 -> 4111 bytes .../course/__pycache__/models.cpython-312.pyc | Bin 6581 -> 6581 bytes SSCM/course/__pycache__/urls.cpython-312.pyc | Bin 1651 -> 1431 bytes SSCM/course/__pycache__/views.cpython-312.pyc | Bin 11870 -> 11807 bytes SSCM/course/cbvs.py | 23 ++-- SSCM/course/urls.py | 26 ++--- SSCM/course/views.py | 29 ++--- SSCM/db.sqlite3 | Bin 180224 -> 180224 bytes SSCM/static/css/nav.css | 4 + SSCM/templates/course/nav.html | 1 + SSCM/templates/course/student/course.html | 104 +++++++---------- SSCM/templates/course/student/home.html | 17 ++- SSCM/templates/course/student/rating.html | 2 + SSCM/templates/course/teacher/course.html | 107 +++++++++--------- .../course/teacher/create_course.html | 2 + .../course/teacher/create_schedule.html | 2 + SSCM/templates/course/teacher/home.html | 18 +-- SSCM/templates/course/teacher/score.html | 2 + 22 files changed, 171 insertions(+), 167 deletions(-) create mode 100644 SSCM/__pycache__/manage.cpython-312.pyc diff --git a/SSCM/SSCM/__pycache__/settings.cpython-312.pyc b/SSCM/SSCM/__pycache__/settings.cpython-312.pyc index 5f1ba6b1cfbc9e858f23a7b72da1d95ddb9c9668..c3d977764cf7b496b4d1243249e6df4319feee8d 100644 GIT binary patch delta 286 zcmbO(dP0=0h)ugakynz@Zle19lyrs^?nR6#Jn4)nymOdR_~x*rGe+^H z@JI2d2&4$6vZn}DaWgQa2+v{4WQ-C>5lIovWCW68U{V}RN@OyovqTA|NJa^zNJR;! zuttdhu_zFWrASAKr^rlJW7HRvUCjitoq+*pzH}v%rrhQ<#>>o;eOY%|S4pL0CFZ5) z>y@PD7UU$Bq?RP67wZ+5B$i|*YckyuO3u$KNv$Y}FDS}SPAx9ZFDkypkyM(QQ<9lC znT@TEk$-b5+a)G01EArIKwNA*IgztS;S&q1GT#Rt1}U=(5@sLyIYhWVa`UmWeP9;g SWoqF3pfdR#=Ta6upn3qLSxs#K delta 237 zcmX>hI$f0aG%qg~0}y214oh1+kynz@YNGo5gcR;{h7_JfjG2rnymMI68Kd}8_@ekz z_)`Q@*;53oxEUBygyt}1GDZoc2&aeuRSBnvf=MwjDW1ug&Jrb@$EMYuk4^Rlvi VVCLs#YT*2!G+CZ&DT^*pDF8;=I}QK< diff --git a/SSCM/SSCM/settings.py b/SSCM/SSCM/settings.py index 2befd98..847cf29 100644 --- a/SSCM/SSCM/settings.py +++ b/SSCM/SSCM/settings.py @@ -66,6 +66,7 @@ TEMPLATES = [ 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], + 'builtins': ['django.templatetags.static'] }, }, ] diff --git a/SSCM/__pycache__/manage.cpython-312.pyc b/SSCM/__pycache__/manage.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..12b8bfe9f3061567707a3c8ed387ac155445c90c GIT binary patch literal 1031 zcmZuv&2JM&6o0cj>yIQ(S|xytDl`&RgAetg7a~L(8JrTL;zT$_B8s${?o6Cbc6XxL zStqs#f~r;fAD~K+D)rXp!jT)w6)r6TRcz=1(MxZJa6svWnT<_3bfkUn&70r*?fZII zDh+`?%?B4&ezO2xn9Jbkdv*?{w7LTfmVhB<1!xIn+FG)h{T(dX95cLr20#`p;P!4m z3_-{0SQV#xw!TKAmY9r*C&G|M?9;%HI7yTr_^Lxzgd~)Oe&okWQsuWfQ8ZqUtN$3H zhS#Ud6xPz#-@!dC?tsdiMyw5zedp0W=ePx_u?UL5Y=#3n#M^+tf*YVl1~F@+ z1M5G%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%FVh zAK_m+kRXU~0pemoAko5bgG;=@^@gy1gYRb+E>?pgjmbHD`$XY-esS33=BJeAq}mm^ uO}6LP&{1M^WSo%og#ko=@nRHVbYq+l^@RaMf6?J%G?tbBT>}8EJD05h diff --git a/SSCM/course/__pycache__/forms.cpython-312.pyc b/SSCM/course/__pycache__/forms.cpython-312.pyc index 850541af7336352a9ac336fbc9b1edbd80f952ec..aede4acc36504949e1c425d16af5e85c49b357fc 100644 GIT binary patch delta 20 acmeBI=vUxA&CAQh00fgbVmETL2mk;vHUuC5 delta 20 acmeBI=vUxA&CAQh00i?*Vm5NK2mk;wlmu7+ diff --git a/SSCM/course/__pycache__/models.cpython-312.pyc b/SSCM/course/__pycache__/models.cpython-312.pyc index 21e03b7e17f7e4c2b53042b6ce5269c5b5e68f53..fa5f565771f167db5b8504731ec2cc9ca49508e3 100644 GIT binary patch delta 20 acmdmLyw#ZdG%qg~0}uoj#BStXB?$mKgav2- delta 20 acmdmLyw#ZdG%qg~0}w=)MQ!9>B?$mK-vxC5 diff --git a/SSCM/course/__pycache__/urls.cpython-312.pyc b/SSCM/course/__pycache__/urls.cpython-312.pyc index aa9acc5b441a3ddd19719abdb798eeb0f759d006..59c34287054baf36d3031a9b52b68fabaaa5b182 100644 GIT binary patch delta 730 zcmZ9J&ubGw6vt>SbY`2ZVZbEV(xRsq%a%YCto(G(u_fl)GM5mqL{+O!Z2o(;$|cH0<4(wQHh90Sa}?teXVTK8rRFpX*cSt* z$K*tW5PkkDs3+xIA%{ffe_a@GZ}=!u_Q?^y2A8b#}VHsdCEq$y?nU6fJTCD|fnc?&>B*m192Lcz^Zq z0YwXb)9u53w^*hK`_?5lm20mLQn_9#*H6uLvlJElvdgZKca8ahk?$G#zH$F(pPhP= N&~@RJYA4vW{sMv;y1@Vd literal 1651 zcmb7^&rcIU6vublX=y2K0r_nqklN5sNyH}2(iv&X_D5#7820AP z|3E#-5rYSg96geF>4qk&n;2s}dDH00lQXkj1KY;LO?GzQo6q~cH*Y5M-s^4U$n#iC zJ-G`w?khFS$6x>XIbq|t7aZguFLDKbhv(_PO|%v4JN5$D0X%2p5D)Fho@Z*NfboUk zt>eUQ{4>r;xVEbdwP1^da}mzhgmYWCR>HM6;XD?ujc}b!IIo5CA&~ECkeis)8=$mC_>R(thFS=t|P2%y7x+e zGAPLvh>CKQt~hG+mo46)jYb%qQ6^2cR7RL|xG@{sp89OsQ1F>%U8LU>K?j0Z`Kv;g z<}zJMz=SUCgOQDJ>yb{~1M@<0uQXo4qJ-%+ft_?9ml1~@WY9sjR6y88Z8sh06@xu= z#-F4OeOQJh_cmFy-Xch8ng@F+L+=huFEQP>Nr+2aZ_;ShGCOuF?Bp;352=D2R~g}= z^oILMV!7WpS7uWihjO-5OqJQEj7xcxkyFX!@`IGoixjPXynOiEHD4&v6BWnTNi0uZ z$w|iVcAn=yae>d=;14I~a6cb<+5LLp)xdGM1|~lOSJgdy)UA!g)REX(vQnHqr1H*yryg41enS_>xB zVB#XUc-~S28*FargWIRM1FAc4l=x-m9Who>)g3+#X=8Kh*xb8YCK^AhXo;knNLC-^ zY9RlG7JB1oOAF1Yp&2c-poSJMLQChZHIQV|qsKrCuc+Y_Eqq@M-@gd2SGQ=L-v`_M Lwr3vPPx|o(nyj;i diff --git a/SSCM/course/__pycache__/views.cpython-312.pyc b/SSCM/course/__pycache__/views.cpython-312.pyc index 0344ef81c9489d57b3d02e33d3a8f57957655155..eaceeee00ff6e10d8af979c9477666ca861f7292 100644 GIT binary patch delta 3208 zcmaJ@U2Gf25$2Mo;~oEhCDIZp*`_UD#n7o7MYd`?@=s)^wwyGQoA~O0p?N2Z7LQc- zPBH9Cr2_Q9XquqT7U*N!r$&hp7!e92d1zWRKnoO2Bv?SugPZsvE#Q~dkn>RVq3z5b ze{9w00sOc(JA1n`^UchDe*S0YLw^hgeJ*&G-+pQ4s~y)vDe}qn!TyHPrFIdQ=F&V> z(eSEXJ{GEyA*(VUcU66cU-cUSHNfA+YS0L&AtS7Yjffh-IWG5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#bKLct z(P}qIyAFO8zB0-CgCb(XEW!vtM^G&{1}(;{B|%$*nSg#9wjX2GKr7{eHpnJA+a-Q^ zj(w-|=q`Mb2S1%hY5{pGg?bb>4k8S(N1e$n#^zmz7v&@#^RUL8-4fe8n7ISS;J|V~ z5#s`2AX99Ew()(o@%g7ViyS?S=R*hs2wa9Ed_wW)^Ocrlk-X)?RY5iAFngmb7UiBe zif5hwjW$1TlP_En?D4F zC|o_65R}Ncou!+ug3$=AZkv-+m=&dX9_l}f`KTg_42x89O=tvV+hfqM)$K(+4J(}cfzNoAaP z88})AuzpdQt%B^`)GvA-ik=(2uY1;3%q_z0faSpQ8{BXw$OW=7 j*h0q0#xRj#r@5Q-ZA_8`d4_BZ4FKn7CW(@#xt0D4;JVsL diff --git a/SSCM/course/cbvs.py b/SSCM/course/cbvs.py index 2635c41..86ea145 100644 --- a/SSCM/course/cbvs.py +++ b/SSCM/course/cbvs.py @@ -15,6 +15,7 @@ class ScoreUpdateView(UpdateView): self.object = self.get_object() title = "给分" + if request.GET.get("update"): title = "修改成绩" @@ -28,7 +29,7 @@ class ScoreUpdateView(UpdateView): "kind": "teacher", } - return_url = reverse("view_detail", kwargs={"course_id": self.object.course_id}) + return_url = reverse("view_detail", kwargs={"course_id": self.object.course.id}) return self.render_to_response(self.get_context_data( info=info, @@ -65,20 +66,18 @@ class RateUpdateView(UpdateView): def get_success_url(self): return reverse("view_course", kwargs={"view_kind": "is_end"}) -class StudentCourseDetailView(DetailView): - model=StudentCourse - template_name= "course/student/course.html" - def get(self,requset,*args,**kwargs): - self.object=self.get_object() - context=self.get_context_data(object=self.object) +class StudentCourseDetailView(DetailView): + model = StudentCourse + template_name = "course/student/course.html" + def get(self, request, *args, **kwargs): + self.object = self.get_object() + context = self.get_context_data(object=self.object) if self.object: - context["info"]={ - "name":self.object.student.name, - "kind":"student" + context["info"] = { + "name": self.object.student.name, + "kind": "student" } return self.render_to_response(context) - - diff --git a/SSCM/course/urls.py b/SSCM/course/urls.py index 922b71e..44c9025 100644 --- a/SSCM/course/urls.py +++ b/SSCM/course/urls.py @@ -1,20 +1,20 @@ from django.urls import path -from course import views,cbvs +from course.views import * +from course.cbvs import ScoreUpdateView,RateUpdateView,StudentCourseDetailView urlpatterns = [ - path('/', views.home, name="course"), - path('teacher/create_course',views.create_course,name="create_course"), - path('teacher/view_detail/', views.view_detail, name="view_detail"), - path('teacher/create_schedule/', views.create_schedule, name="create_schedule"), - path('teacher/delete_schedule/', views.delete_schedule, name="delete_schedule"), - path('teacher/score/', cbvs.ScoreUpdateView.as_view(), name="score"), - path('teacher/handle_course//', - views.handle_course, name="handle_course"), + path('/', home, name="course"), + path('teacher/create_course',create_course,name="create_course"), + path('teacher/view_detail/', view_detail, name="view_detail"), + path('teacher/create_schedule/', create_schedule, name="create_schedule"), + path('teacher/delete_schedule/', delete_schedule, name="delete_schedule"), + path('teacher/score/', ScoreUpdateView.as_view(), name="score"), + path('teacher/handle_course//',handle_course, name="handle_course"), - path('student/view/', views.view_course, name="view_course"), - path("student/operate//",views.operate_course,name="operate_course"), + path('student/view/', view_course, name="view_course"), + path("student/operate//",operate_course,name="operate_course"), - path("student/evaluate/",cbvs.RateUpdateView.as_view(),name="evaluate"), - path("student/view_detail/",cbvs.StudentCourseDetailView.as_view(),name="view_detail") + path("student/evaluate/",RateUpdateView.as_view(),name="evaluate"), + path("student/view_detail/",StudentCourseDetailView.as_view(),name="sview_detail") ] \ No newline at end of file diff --git a/SSCM/course/views.py b/SSCM/course/views.py index 532ebc4..a8bfe9c 100644 --- a/SSCM/course/views.py +++ b/SSCM/course/views.py @@ -1,5 +1,5 @@ from django.http import HttpResponse -from django.shortcuts import redirect, render +from django.shortcuts import redirect, render,reverse from django.db.models import Q from django.utils import timezone @@ -62,7 +62,6 @@ def teacher_home(request): context = { "info": info - } q = Q(teacher=user) @@ -147,6 +146,7 @@ def delete_schedule(request, schedule_id): return redirect("login", kind=kind) schedule = Schedule.objects.get(pk=schedule_id) + course_id = request.GET.get("course_id") or schedule.course_id schedule.delete() @@ -162,13 +162,13 @@ def handle_course(request, course_id, handle_kind): info = { "name": user.name, - "kind": kind + "kind": kind, } course = Course.objects.get(pk=course_id) if course.status == handle_kind and course.status < 5: if course.status == 4: - scs = StudentCourse.objects.filter(Q(course=course)&Q(with_draw=False)) + scs = StudentCourse.objects.filter(course=course) all_given = True res = "" for sc in scs: @@ -179,7 +179,7 @@ def handle_course(request, course_id, handle_kind): if all_given: course.status += 1 course.save() - return redirect("view.detail", course_id=course_id) + return redirect("view_detail", course_id=course_id) else: return HttpResponse(res) @@ -187,13 +187,9 @@ def handle_course(request, course_id, handle_kind): course.status += 1 course.save() - # course_list = Course.objects.filter(teacher=user) - # - # context = {"info": info, - # "course_list": course_list, - # "course_id": course_id} - # print("Context:", context) - return redirect("course", kind="teacher") + course_list = Course.objects.filter(teacher=user) + # return render(request, 'course/teacher/home.html', {'info': info, 'course_list': course_list}) + return redirect("course",kind=kind) def view_detail(request, course_id): @@ -208,17 +204,17 @@ def view_detail(request, course_id): } course = Course.objects.get(pk=course_id) - c_stu_list = StudentCourse.objects.filter(Q(course=course)&Q(with_draw=False)) + c_stu_list = StudentCourse.objects.filter(Q(course=course) & Q(with_draw=False)) sche_list = Schedule.objects.filter(course=course) context = { "info": info, "course": course, - "course_student": c_stu_list, + "course_students": c_stu_list, "schedules": sche_list } if course.status == 5: - sorted_cs_list = sorted(c_stu_list, key=lambda cs: cs.score) + sorted_cs_list = sorted(c_stu_list, key=lambda cs: cs.scores) context["sorted_course_student"] = sorted_cs_list return render(request, "course/teacher/course.html", context) @@ -302,6 +298,5 @@ def operate_course(request, operate_kind, course_id): course.with_draw = True course.with_draw_time = timezone.now() course.save() - print("Course ID:", course_id) - print("Operation Kind:", operate_kind) + return redirect("view_course", view_kind=operate_kind) diff --git a/SSCM/db.sqlite3 b/SSCM/db.sqlite3 index 4d54922d90976e60166989d07da17ce2bd6907b0..8415bec330418c2ef7edbcc47d8b0c607f890696 100644 GIT binary patch delta 1570 zcma)5O>7%Q7~Pq%9k1=(&yJHr)fO9-sB)Z`*GxSLJ}jp+8Xx;*cEL1C=5QM94k42)F@Jtxmv^H_SN3$HNAHh+5eYf`%_NLcr%Q!mI$2DeNKceVmvmER*;;+7NWJK=Er_W>#Nx5_R z!tjagb1&xdFCA46Dx;mfFHMhb{tFIk*bHGWF>O3a;s9gh5Eag{00Xz0AuQhUd|z2D0~=ftKZYbb?qTueu*1zIoE-LZ9O7$#m?}X@G9+rK zdL*tyrKpO>bY1s_u|-CJeD!2%Xi@V5QmSdPd{DRRy0gnZ|4|aRM3f+n8Jc8Xc_kW? zr1-X78dh9g#L~<%4K*aikn~7QRy9f5uBl&faU8dcB{09bqG+TRt+86kP@;yaMq;W) zSwG@>g?Ow}jYQP_0dU8yEmC=6PuP4R=l`X;+nd}Rs=4C-v<;cQ9`jU0SmNLz{0bYe z#@_Nh_y+F6=kO_1;Wm5#ORU`2;eeeWgj+3avCwZ}vxPnjy%vInqJ@Hmp82&)c#qcs z_c{0jeuJN31s=eC=KC2$O@_~5qRVcg+h+BNiB4=Ih7cD7@e72$-*Z4v3TgghQ&1g6a<%*MN48LE!M1sAWciF7f^~}k$_=CK@Jr) zUc4wJE%Ab9;{gqaz4g+gM@_tVQ7<$moZ2)|6CAKTnwOc$yf@$b-ZzZ~-)Qi!PT{TQ zCERXLzse&TB--t;&ECW5bE_Qdo%cxHA@vx{TbD7}l|JM2>01gDb;)#ydjo z{!21Rf8_wdZ#bZSdoXc=!I&c~gRPv6J|l35;13*9@h42Mj1?1xv06vcILUx^8c^{E KfaA#Z==ck@>YuLw diff --git a/SSCM/static/css/nav.css b/SSCM/static/css/nav.css index 0c2e14f..9a68ad8 100644 --- a/SSCM/static/css/nav.css +++ b/SSCM/static/css/nav.css @@ -14,9 +14,13 @@ body { .nav { background: #4a2c98; + position: fixed; width: 100%; + color: #ccc; + z-index: 1; } + .nav a { color: #ccc; text-decoration: unset; diff --git a/SSCM/templates/course/nav.html b/SSCM/templates/course/nav.html index 0fe7633..5e250ac 100644 --- a/SSCM/templates/course/nav.html +++ b/SSCM/templates/course/nav.html @@ -1,6 +1,7 @@ {% load static %} + diff --git a/SSCM/templates/course/student/course.html b/SSCM/templates/course/student/course.html index 9a2914e..40316ce 100644 --- a/SSCM/templates/course/student/course.html +++ b/SSCM/templates/course/student/course.html @@ -1,65 +1,47 @@ {% extends "course/nav.html" %} +{% load static %} {% block title %}课程详情{% endblock %} + {% block content %} -

课程详情

-
    -
  • - 课程编号 - {{ object.course.id }} -
  • -
  • - 课程名 - {{ object.course.name }} -
  • -
  • - 学分 - {{ object.course.credit }} -
  • -
  • - 课程人数/最大人数 - {{ object.course.get_current_count }}/{{ object.course.max_number }} -
  • -
  • - 年份 - {{ object.course.year }} -
  • -
  • - 学期 - {{ object.course.get_semester_display }} -
  • -
  • - 教师 - {{ object.course.teacher.name }} -
  • -
  • - 上课时间 - - {% for schedule in object.course.get_schedules %} -
    {{ schedule }}
    - {% endfor %} -
    -
  • -
  • - 得分 - {% if object.scores != None %}{{ object.scores }} - {% else %} - {% endif %} -
  • -
  • - 评语 - {% if object.comments != None %}{{ object.comments }} - {% else %} - {% endif %} -
  • -
  • - 学生评分 - {% if object.rating != None %}{{ object.rating }} - {% else %} - {% endif %} -
  • -
  • - 学生评价 - {% if object.assessment != None %}{{ object.assessment }} - {% else %} - {% endif %} -
  • -
- +

课程详情

+
    +
  • 课程编号{{ object.course.id }}
  • +
  • 课程名{{ object.course.name }}
  • +
  • 学分{{ object.course.credit }}
  • +
  • 课程人数/最大人数 + {{ object.course.get_current_count }}/{{ object.course.max_number }}
  • +
  • 年份{{ object.course.year }}
  • +
  • 学期{{ object.course.get_semester_display }}
  • + +
  • 教师{{ object.course.teacher.name }}
  • +
  • 上课时间 + + {% for schedule in object.course.get_schedules %} +
    {{ schedule }}
    + {% endfor %} +
    +
  • +
  • + 得分 + {% if object.scores != None %}{{ object.scores }} + {% else %} - {% endif %} +
  • +
  • + 评语 + {% if object.comments != None %}{{ object.comments }} + {% else %} - {% endif %} +
  • +
  • + 学生评分 + {% if object.rating != None %}{{ object.rating }} + {% else %} - {% endif %} +
  • +
  • + 学生评价 + {% if object.assessment != None %}{{ object.assessment }} + {% else %} - {% endif %} +
  • +
+ {% endblock %} \ No newline at end of file diff --git a/SSCM/templates/course/student/home.html b/SSCM/templates/course/student/home.html index cc69114..9c3b20e 100644 --- a/SSCM/templates/course/student/home.html +++ b/SSCM/templates/course/student/home.html @@ -1,5 +1,7 @@ {% extends "course/nav.html" %} +{% load static %} {% block title %}主页{% endblock %} + {% block content %}
@@ -67,8 +69,13 @@ {{ sc.course.credit }} {{ sc.course.year }}{{ sc.get_semester_display }} {{ sc.course.teacher.name }} - {{ sc.scores }} - {{ sc.comments }} + {% if sc.scores == None %} + - + - + {% else %} + {{ sc.scores }} + {{ sc.comments }} + {% endif %} {% if sc.rating == None %} - - @@ -76,7 +83,7 @@ + onclick='window.open("{% url 'evaluate' sc.id %}")' /> {% else %} {{ sc.rating }} @@ -107,11 +114,11 @@ {% if view_kind == "select" %} + onclick="location.href='{% url 'operate_course' course.id 'select' %}'"> {% endif %} {% if view_kind == "withdraw" %} + onclick="location.href='{% url 'operate_course' course.id 'withdraw' %}'"> {% endif %} {% if view_kind == "current" %}-{% endif %} diff --git a/SSCM/templates/course/student/rating.html b/SSCM/templates/course/student/rating.html index 4fb73d2..a641918 100644 --- a/SSCM/templates/course/student/rating.html +++ b/SSCM/templates/course/student/rating.html @@ -1,5 +1,7 @@ {% extends "course/nav.html" %} +{% load static %} {% block title %}评教{% endblock %} + {% block content %}

评教

diff --git a/SSCM/templates/course/teacher/course.html b/SSCM/templates/course/teacher/course.html index fc233dd..0a7b6f1 100644 --- a/SSCM/templates/course/teacher/course.html +++ b/SSCM/templates/course/teacher/course.html @@ -1,7 +1,7 @@ {% extends "course/nav.html" %} -{% block title %} - 课程详情 -{% endblock %} +{% load static %} +{% block title %}课程详情{% endblock %} + {% block content %}

课程详情

@@ -27,8 +27,9 @@ -

上课时间

+ +

上课时间

@@ -38,73 +39,75 @@ - {% for schedule in schedules %} - - - - - - {% endfor %} + {% for schedule in schedules %} + + + + + + {% endfor %}
{{ schedule.id }}{{ schedule }} - -
{{ schedule.id }}{{ schedule }} + +

学生列表 {% if course.status == 4 %} - + + {{ course.status }} {% endif %}

- - - - - - - - + + + + + + + + - {% for cs in course_students %} - - - - - - - + + + + + + - - {% endfor %} + + + {% endfor %} -
学生学号学生姓名学生邮箱得分评语操作
学生学号学生姓名学生邮箱得分评语操作
{{ cs.student.get_id }}{{ cs.student.name }}{{ cs.student.email }}{% if cs.scores == None %} - {% else %} {{ cs.scores }} {% endif %} {% if cs.scores == None %} - {% else %} {{ cs.comments }} {% endif %} - {% if course.status == 4 %} - {% if sc.scores == None %} - + {% for cs in course_students %} +
{{ cs.student.get_id }}{{ cs.student.name }}{{ cs.student.email }}{% if cs.scores == None %} - {% else %} {{ cs.scores }} {% endif %} {% if cs.scores == None %} - {% else %} {{ cs.comments }} {% endif %} + {% if course.status == 4 %} + {% if sc.scores == None %} + + {% else %} + + + {% endif %} {% else %} - - + - {% endif %} - {% else %} - - {% endif %} -
+ + {% if course.status == 5 %}

学生评价

- - - - + + + + - {% for cs in sorted_course_students %} + {% for cs in sorted_course_student %} {% if cs.rating != None %} diff --git a/SSCM/templates/course/teacher/create_course.html b/SSCM/templates/course/teacher/create_course.html index 6f8f872..c6d16fc 100644 --- a/SSCM/templates/course/teacher/create_course.html +++ b/SSCM/templates/course/teacher/create_course.html @@ -1,5 +1,7 @@ {% extends "course/nav.html" %} +{% load static %} {% block title %}创建课程{% endblock %} + {% block content %}

创建课程

diff --git a/SSCM/templates/course/teacher/create_schedule.html b/SSCM/templates/course/teacher/create_schedule.html index bdb72da..1f86fc8 100644 --- a/SSCM/templates/course/teacher/create_schedule.html +++ b/SSCM/templates/course/teacher/create_schedule.html @@ -1,5 +1,7 @@ {% extends "course/nav.html" %} +{% load static %} {% block title %}创建时刻表{% endblock %} + {% block content %}

创建时刻表:    [{{ course.id }}]{{ course.name }}

diff --git a/SSCM/templates/course/teacher/home.html b/SSCM/templates/course/teacher/home.html index b901981..8d7e288 100644 --- a/SSCM/templates/course/teacher/home.html +++ b/SSCM/templates/course/teacher/home.html @@ -1,7 +1,7 @@ {% extends "course/nav.html" %} -{% block title %} - 主页 -{% endblock %} +{% load static %} +{% block title %}主页{% endblock %} + {% block content %}
@@ -43,11 +43,15 @@ + + {% endif %} + {% if course.status == 4 %} + + {% else %} + {% endif %} -
{% endfor %} diff --git a/SSCM/templates/course/teacher/score.html b/SSCM/templates/course/teacher/score.html index 6f9b003..3d5eccc 100644 --- a/SSCM/templates/course/teacher/score.html +++ b/SSCM/templates/course/teacher/score.html @@ -1,7 +1,9 @@ {% extends "course/nav.html" %} +{% load static %} {% block title %} {{ title }} {% endblock %} + {% block content %}

{{ title }}

学生评分学生评价
学生评分学生评价ss
{{ cs.rating }}