dev_local
jingquan huang 6 years ago
parent ac193b5603
commit 5c826a8e54

@ -98,7 +98,7 @@
<div style="clear: both;"></div>
<li class="fl clearfix mb20 shixunsboxs">
<p class="mr40">
<a href="javascript:void(0)" class="fr task-btn task-btn-orange" id="add_new_shixun_question">保存</a>
<a href="javascript:void(0)" class="fr task-btn task-btn-orange" id="add_new_shixun_question" onclick="add_shixun_question()">保存</a>
<a href="<%= delete_choose_shixun_exercise_path(@exercise) %>" data-remote="true" data-method="delete" class="fr task-btn mr30">取消</a>
<span class=" fr font-12 color-grey mt5 mr25" style="display: block;">
<span class="color-orange-tip ">温馨提示:</span>[实训题]属于客观题将由系统自动评分
@ -113,12 +113,12 @@
</div>
<% end %>
<script type="text/javascript">
$(function(){
//保存
$("#add_new_shixun_question").one('click', function(){
add_shixun_question();
});
});
// $(function(){
// //保存
// $("#add_new_shixun_question").one('click', function(){
// add_shixun_question();
// });
// });
function add_shixun_question(){
var result = true;
@ -184,9 +184,10 @@
if(result){
$("#new_shixun_question").submit();
} else{
$("#add_new_shixun_question").one('click', function(){
add_shixun_question();
});
// $("#add_new_shixun_question").one('click', function(){
//
// });
add_shixun_question();
}
}

@ -0,0 +1,12 @@
class AddLocalStatusToShixuns < ActiveRecord::Migration
def change
add_column :shixuns, :local_status, :integer, :limit => 1
Shixun.find_each do |shixun|
begin
shixun.local_status = shixun.status.to_i
shixun.save!
rescue Exception => e
end
end
end
end
Loading…
Cancel
Save