diff --git a/app/views/homework_common/_homework_detail_programing_form.html.erb b/app/views/homework_common/_homework_detail_programing_form.html.erb index 5e53c4b15..7c66df057 100644 --- a/app/views/homework_common/_homework_detail_programing_form.html.erb +++ b/app/views/homework_common/_homework_detail_programing_form.html.erb @@ -78,7 +78,7 @@
  • - +
  • @@ -96,7 +96,7 @@
  • - 测试 + 测试
  • @@ -115,7 +115,7 @@
  • - 测试 + 测试
  • @@ -142,4 +142,12 @@ } ); } + + function init_programing_test() + { + $(".programing_test").each(function(){ + $(this).removeClass("green_btn red_btn").addClass("blue_btn").text("测试"); + $(this).next("input").val(""); + }); + } \ No newline at end of file diff --git a/app/views/homework_common/programing_test.js.erb b/app/views/homework_common/programing_test.js.erb index 74ec9439a..8f76642f1 100644 --- a/app/views/homework_common/programing_test.js.erb +++ b/app/views/homework_common/programing_test.js.erb @@ -1,2 +1,2 @@ -$("#test_send_<%= @index%>").replaceWith(" fl ml5 mt1' onclick='programing_test(<%= @index%>)' id='test_send_<%= @index%>'><%= @result == 0 ? '正确' : '错误'%>"); +$("#test_send_<%= @index%>").replaceWith(" fl ml5 mt1 programing_test' onclick='programing_test(<%= @index%>)' id='test_send_<%= @index%>'><%= @result == 0 ? '正确' : '错误'%>"); $("#test_result_<%= @index%>").val("<%= @result%>"); \ No newline at end of file diff --git a/public/javascripts/course.js b/public/javascripts/course.js index c7b01cee1..6ba202b28 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -550,7 +550,7 @@ function add_programing_test(obj) { "
  • " + "
  • " + "" + - "测试" + + "测试" + "" + "
  • "); }