From 2a8cf2885aaa6a0fa4a7df38498e0cae4c66a5d5 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 19 Sep 2015 16:23:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B8=83=E7=BD=AE=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=97=B6=E9=80=89=E6=8B=A9=E8=AF=AD=E8=A8=80=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/homework.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js index 3589a0728..9984761c1 100644 --- a/public/javascripts/homework.js +++ b/public/javascripts/homework.js @@ -145,7 +145,14 @@ $(function(){ test_numbers += 1; }); - var language = $('select.language_type').val() == 1 ? 'C语言' : 'C++语言'; + var language = ''; + if($('select.language_type').val() == 1){ + language = 'C'; + }else if($('select.language_type').val() == 2){ + language = 'C++'; + }else if($('select.language_type').val() == 3){ + language = 'Python'; + } if (valid) { $("input[name=homework_type]").val(2); From df41414cf7be3f141ded36659476ab87fd3caf29 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 19 Sep 2015 16:29:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1=E3=80=81=E4=B8=AA=E4=BA=BA=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E3=80=81=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8=E3=80=81?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=86=85=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=BC=96=E7=A8=8B=E8=AF=AD=E8=A8=80=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_common/index.html.erb | 6 +----- app/views/users/_course_homework.html.erb | 6 +----- app/views/users/_user_homework_list.html.erb | 6 +----- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index 693ddba65..2e680d6ea 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -78,11 +78,7 @@