parent
7cc5ce92c6
commit
5bdb1cd461
|
@ -381,7 +381,7 @@ class StudentWorkController < ApplicationController
|
||||||
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
|
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
|
||||||
@homework.student_works.each do |student_work|
|
@homework.student_works.each do |student_work|
|
||||||
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
|
||||||
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
|
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
|
||||||
student_work.save
|
student_work.save
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,4 +3,4 @@ showModal('ajax-modal', '500px');
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').siblings().remove();
|
||||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||||
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||||
$('#ajax-modal').parent().css("top","30%").css("left","30%");
|
$('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed");
|
90
db/schema.rb
90
db/schema.rb
|
@ -236,6 +236,13 @@ ActiveRecord::Schema.define(:version => 20150917022239) do
|
||||||
t.boolean "tracker_in_review_dialog", :default => false
|
t.boolean "tracker_in_review_dialog", :default => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "code_review_user_settings", :force => true do |t|
|
||||||
|
t.integer "user_id", :default => 0, :null => false
|
||||||
|
t.integer "mail_notification", :default => 0, :null => false
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "code_reviews", :force => true do |t|
|
create_table "code_reviews", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.integer "change_id"
|
t.integer "change_id"
|
||||||
|
@ -469,6 +476,13 @@ ActiveRecord::Schema.define(:version => 20150917022239) do
|
||||||
|
|
||||||
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
||||||
|
|
||||||
|
create_table "discuss_demos", :force => true do |t|
|
||||||
|
t.string "title"
|
||||||
|
t.text "body"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "documents", :force => true do |t|
|
create_table "documents", :force => true do |t|
|
||||||
t.integer "project_id", :default => 0, :null => false
|
t.integer "project_id", :default => 0, :null => false
|
||||||
t.integer "category_id", :default => 0, :null => false
|
t.integer "category_id", :default => 0, :null => false
|
||||||
|
@ -483,23 +497,26 @@ ActiveRecord::Schema.define(:version => 20150917022239) do
|
||||||
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
|
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
|
||||||
add_index "documents", ["project_id"], :name => "documents_project_id"
|
add_index "documents", ["project_id"], :name => "documents_project_id"
|
||||||
|
|
||||||
create_table "dts", :force => true do |t|
|
create_table "dts", :primary_key => "Num", :force => true do |t|
|
||||||
t.string "IPLineCode"
|
t.string "Defect", :limit => 50
|
||||||
t.string "Description"
|
t.string "Category", :limit => 50
|
||||||
t.string "Num"
|
|
||||||
t.string "Variable"
|
|
||||||
t.string "TraceInfo"
|
|
||||||
t.string "Method"
|
|
||||||
t.string "File"
|
t.string "File"
|
||||||
t.string "IPLine"
|
t.string "Method"
|
||||||
t.string "Review"
|
t.string "Module", :limit => 20
|
||||||
t.string "Category"
|
t.string "Variable", :limit => 50
|
||||||
t.string "Defect"
|
t.integer "StartLine"
|
||||||
t.string "PreConditions"
|
t.integer "IPLine"
|
||||||
t.string "StartLine"
|
t.string "IPLineCode", :limit => 200
|
||||||
|
t.string "Judge", :limit => 15
|
||||||
|
t.integer "Review", :limit => 1
|
||||||
|
t.string "Description"
|
||||||
|
t.text "PreConditions", :limit => 2147483647
|
||||||
|
t.text "TraceInfo", :limit => 2147483647
|
||||||
|
t.text "Code", :limit => 2147483647
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at"
|
||||||
|
t.integer "id", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "enabled_modules", :force => true do |t|
|
create_table "enabled_modules", :force => true do |t|
|
||||||
|
@ -1163,18 +1180,18 @@ ActiveRecord::Schema.define(:version => 20150917022239) do
|
||||||
create_table "relative_memos", :force => true do |t|
|
create_table "relative_memos", :force => true do |t|
|
||||||
t.integer "osp_id"
|
t.integer "osp_id"
|
||||||
t.integer "parent_id"
|
t.integer "parent_id"
|
||||||
t.string "subject", :null => false
|
t.string "subject", :null => false
|
||||||
t.text "content", :null => false
|
t.text "content", :limit => 16777215, :null => false
|
||||||
t.integer "author_id"
|
t.integer "author_id"
|
||||||
t.integer "replies_count", :default => 0
|
t.integer "replies_count", :default => 0
|
||||||
t.integer "last_reply_id"
|
t.integer "last_reply_id"
|
||||||
t.boolean "lock", :default => false
|
t.boolean "lock", :default => false
|
||||||
t.boolean "sticky", :default => false
|
t.boolean "sticky", :default => false
|
||||||
t.boolean "is_quote", :default => false
|
t.boolean "is_quote", :default => false
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "viewed_count_crawl", :default => 0
|
t.integer "viewed_count_crawl", :default => 0
|
||||||
t.integer "viewed_count_local", :default => 0
|
t.integer "viewed_count_local", :default => 0
|
||||||
t.string "url"
|
t.string "url"
|
||||||
t.string "username"
|
t.string "username"
|
||||||
t.string "userhomeurl"
|
t.string "userhomeurl"
|
||||||
|
@ -1199,6 +1216,19 @@ ActiveRecord::Schema.define(:version => 20150917022239) do
|
||||||
|
|
||||||
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
|
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
|
||||||
|
|
||||||
|
create_table "rich_rich_files", :force => true do |t|
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
t.string "rich_file_file_name"
|
||||||
|
t.string "rich_file_content_type"
|
||||||
|
t.integer "rich_file_file_size"
|
||||||
|
t.datetime "rich_file_updated_at"
|
||||||
|
t.string "owner_type"
|
||||||
|
t.integer "owner_id"
|
||||||
|
t.text "uri_cache"
|
||||||
|
t.string "simplified_type", :default => "file"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "roles", :force => true do |t|
|
create_table "roles", :force => true do |t|
|
||||||
t.string "name", :limit => 30, :default => "", :null => false
|
t.string "name", :limit => 30, :default => "", :null => false
|
||||||
t.integer "position", :default => 1
|
t.integer "position", :default => 1
|
||||||
|
@ -1250,10 +1280,11 @@ ActiveRecord::Schema.define(:version => 20150917022239) do
|
||||||
t.string "url"
|
t.string "url"
|
||||||
t.string "title"
|
t.string "title"
|
||||||
t.integer "share_type"
|
t.integer "share_type"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
t.string "description"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "softapplications", :force => true do |t|
|
create_table "softapplications", :force => true do |t|
|
||||||
|
@ -1423,8 +1454,8 @@ ActiveRecord::Schema.define(:version => 20150917022239) do
|
||||||
t.integer "zip_code"
|
t.integer "zip_code"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "identity"
|
|
||||||
t.string "technical_title"
|
t.string "technical_title"
|
||||||
|
t.integer "identity"
|
||||||
t.string "student_id"
|
t.string "student_id"
|
||||||
t.string "teacher_realname"
|
t.string "teacher_realname"
|
||||||
t.string "student_realname"
|
t.string "student_realname"
|
||||||
|
@ -1492,9 +1523,6 @@ ActiveRecord::Schema.define(:version => 20150917022239) do
|
||||||
t.integer "active"
|
t.integer "active"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "level"
|
|
||||||
t.integer "file"
|
|
||||||
t.integer "issue"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "user_statuses", :force => true do |t|
|
create_table "user_statuses", :force => true do |t|
|
||||||
|
|
Loading…
Reference in New Issue