From 2fb76458b6016e1effb16b3fd928489cac945fa2 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 8 Jul 2015 16:33:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E7=A8=8B=E4=BD=9C=E5=93=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=9D=99=E6=80=81=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_programing_work_show.html.erb | 72 +++++++++++++++++++ app/views/student_work/show.js.erb | 6 +- 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 app/views/student_work/_programing_work_show.html.erb diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb new file mode 100644 index 000000000..c231ab94b --- /dev/null +++ b/app/views/student_work/_programing_work_show.html.erb @@ -0,0 +1,72 @@ +
+
+ +
+ + + +
+ 收起 +
+
\ No newline at end of file diff --git a/app/views/student_work/show.js.erb b/app/views/student_work/show.js.erb index fa12e097d..1c8874c2f 100644 --- a/app/views/student_work/show.js.erb +++ b/app/views/student_work/show.js.erb @@ -2,6 +2,10 @@ if($("#about_hwork_<%= @work.id%>").children().length > 0) {$("#about_hwork_<%= @work.id%>").html("");} else { - $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show') %>"); + <% if @homework.homework_type == 2%> + $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show') %>"); + <% else%> + $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show') %>"); + <% end%> $('#score_<%= @work.id%>').peSlider({range: 'min'}); } \ No newline at end of file