编译错误才存储错误信息

This commit is contained in:
sw 2015-08-04 16:16:42 +08:00
parent 0099c99829
commit a7716ed4cb
1 changed files with 3 additions and 1 deletions

View File

@ -3,7 +3,9 @@ $("#test_result_<%= @index%>").val("<%= @result%>");
<% if @err_msg || @result != 0%>
$("#homework_work_test_show").show();
$("#homework_work_test_desc").text("<%= escape_javascript(@err_msg || status_to_err_msg(@result))%>");
<% if @err_msg%>
$("#homework_test_error_msg").val("<%= escape_javascript(@err_msg)%>");
<% end%>
<% else%>
$("#homework_work_test_show").hide();
$("#homework_test_error_msg").val("");