Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
huang 2016-10-16 16:16:30 +08:00
commit 2b2af428eb
7 changed files with 70 additions and 50 deletions

View File

@ -18,5 +18,6 @@ $('#ajax-modal').parent().addClass("popbox_polls");
//与更新版本弹窗js冲突新增样式代码
$('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"});
$('#ajax-modal').css("padding","");
$('#ajax-modal').parent().removeClass(" popbox resourceUploadPopup shareDP");

View File

@ -23,6 +23,8 @@
$('#ajax-modal').parent().css("top","50%").css("left","50%");
$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
//与更新版本弹窗js冲突新增样式代码
$('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"});
var val = $("#search_course_input").val();
$("#search_course_input").val("").focus().val(val);
<% else %>

View File

@ -12,6 +12,8 @@ $('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' sty
$('#ajax-modal').parent().css("top","50%").css("left","50%");
$('#ajax-modal').parent().addClass("popbox").addClass("shareDP");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
//与更新版本弹窗js冲突新增样式代码
$('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"});
var val = $("#search_org_input").val();
$("#search_org_input").val("").focus().val(val);
<% else %>

View File

@ -12,6 +12,8 @@ $('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' sty
$('#ajax-modal').parent().css("top","50%").css("left","50%");
$('#ajax-modal').parent().addClass("resourceUploadPopup").addClass("popbox")
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
//与更新版本弹窗js冲突新增样式代码
$('#ajax-modal').parent().css({"border":"3px solid #269ac9", "padding":"4px"});
//$("#search_project_input").focus();
var val = $("#search_project_input").val();
$("#search_project_input").val("").focus().val(val);

View File

@ -3,6 +3,8 @@
namespace :exercise_publish do
desc "publish exercise and end exercise"
task :publish => :environment do
Rails.logger.info("log--------------------------------exercise_publish start")
puts "--------------------------------exercise_publish start"
exercises = Exercise.where("publish_time is not null and exercise_status = 1 and publish_time <=?",Time.now)
exercises.each do |exercise|
exercise.update_column('exercise_status', 2)
@ -11,6 +13,8 @@ namespace :exercise_publish do
exercise.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 2)
end
end
Rails.logger.info("log--------------------------------exercise_publish end")
puts "--------------------------------exercise_publish end"
end
task :end => :environment do

View File

@ -8,6 +8,8 @@ namespace :homework_evaluation do
end
#自动开启匿评的任务
task :start_evaluation => :environment do
Rails.logger.info("log--------------------------------start_evaluation start")
puts "--------------------------------start_evaluation start"
homework_detail_manuals = HomeworkDetailManual.where("evaluation_start = '#{Date.today}'")
homework_detail_manuals.each do |homework_detail_manual|
homework_common = homework_detail_manual.homework_common
@ -67,6 +69,9 @@ namespace :homework_evaluation do
end
end
end
Rails.logger.info("log--------------------------------start_evaluation end")
puts "--------------------------------start_evaluation end"
end
#自动关闭匿评的任务

View File

@ -42,6 +42,8 @@ namespace :homework_publishtime do
end
task :end => :environment do
puts "--------------------------------homework_publish_end start"
Rails.logger.info("log--------------------------------homework_publish_end start")
homework_commons = HomeworkCommon.where("end_time = '#{Date.today}'")
homework_commons.each do |homework|
if homework.anonymous_comment == 1
@ -51,5 +53,7 @@ namespace :homework_publishtime do
end
end
end
Rails.logger.info("log--------------------------------homework_publish_end end")
puts "--------------------------------homework_publish_end end"
end
end