From 8c72df74d682643d3eb16ccfa73ff0279b2fc91a Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 21 May 2015 17:17:54 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E9=A1=B6=E9=83=A8=E5=8A=9F=E8=83=BD=202=E3=80=81=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E4=BD=9C=E5=93=81=E5=90=8D=E7=A7=B0=EF=BC=8C=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E8=AF=A6=E7=BB=86=E4=BF=A1=E6=81=AF=203=E3=80=81?= =?UTF-8?q?=E4=BD=9C=E5=93=81=E5=88=97=E8=A1=A8=E4=BF=A1=E6=81=AF=E7=94=9F?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 5 +- app/views/student_work/_show.html.erb | 172 ++++++++++----------- app/views/student_work/index.html.erb | 140 +++++++++-------- app/views/student_work/show.js.erb | 7 + public/javascripts/course.js | 53 ++++++- public/stylesheets/courses.css | 4 +- 6 files changed, 228 insertions(+), 153 deletions(-) create mode 100644 app/views/student_work/show.js.erb diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 896e29053..df2513782 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -6,6 +6,7 @@ class StudentWorkController < ApplicationController before_filter :author_of_work, :only => [:edit, :update, :destroy] def index + @stundet_works = @homework.student_works.order("final_score desc") respond_to do |format| format.html end @@ -55,7 +56,9 @@ class StudentWorkController < ApplicationController end def show - + respond_to do |format| + format.js + end end def destroy diff --git a/app/views/student_work/_show.html.erb b/app/views/student_work/_show.html.erb index 747cfecf8..cb3f0181a 100644 --- a/app/views/student_work/_show.html.erb +++ b/app/views/student_work/_show.html.erb @@ -1,96 +1,94 @@ -
-
-
- -
- 收起 +
- - \ No newline at end of file + + +收起 +
+ \ No newline at end of file diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 44ac58bf7..258d26cf9 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -13,6 +13,12 @@ + + +
+