<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => homework_common.attachments} %>
@@ -156,7 +174,7 @@
<% end %>
<% time=project.updated_on %>
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
-
项目名称:<%=project.name %>
diff --git a/db/schema.rb b/db/schema.rb
index 8dbd9813c..3728e8da0 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,8 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-
-ActiveRecord::Schema.define(:version => 20151102090519) do
+ActiveRecord::Schema.define(:version => 20151231023610) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -67,6 +66,41 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
t.datetime "updated_at", :null => false
end
+ create_table "at_messages", :force => true do |t|
+ t.integer "user_id"
+ t.integer "at_message_id"
+ t.string "at_message_type"
+ t.boolean "viewed", :default => false
+ t.string "container_type"
+ t.integer "container_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "sender_id"
+ end
+
+ add_index "at_messages", ["user_id"], :name => "index_at_messages_on_user_id"
+
+ create_table "attachment_histories", :force => true do |t|
+ t.integer "container_id"
+ t.string "container_type"
+ t.string "filename", :default => ""
+ t.string "disk_filename", :default => ""
+ t.integer "filesize", :default => 0
+ t.string "content_type", :default => ""
+ t.string "digest", :limit => 40, :default => ""
+ t.integer "downloads", :default => 0
+ t.integer "author_id"
+ t.datetime "created_on"
+ t.string "description"
+ t.string "disk_directory"
+ t.integer "attachtype"
+ t.integer "is_public"
+ t.integer "copy_from"
+ t.integer "quotes"
+ t.integer "version"
+ t.integer "attachment_id"
+ end
+
create_table "attachments", :force => true do |t|
t.integer "container_id"
t.string "container_type", :limit => 30
@@ -384,6 +418,20 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
t.integer "container_id", :default => 0
end
+ create_table "course_contributor_scores", :force => true do |t|
+ t.integer "course_id"
+ t.integer "user_id"
+ t.integer "message_num"
+ t.integer "message_reply_num"
+ t.integer "news_reply_num"
+ t.integer "resource_num"
+ t.integer "journal_num"
+ t.integer "journal_reply_num"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "total_score"
+ end
+
create_table "course_groups", :force => true do |t|
t.string "name"
t.integer "course_id"
@@ -427,8 +475,8 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
t.string "code"
t.integer "time"
t.string "extra"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.string "location"
t.string "term"
t.string "string"
@@ -438,14 +486,16 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
t.string "class_period"
t.integer "school_id"
t.text "description"
- t.integer "status", :default => 1
- t.integer "attachmenttype", :default => 2
+ t.integer "status", :default => 1
+ t.integer "attachmenttype", :default => 2
t.integer "lft"
t.integer "rgt"
- t.integer "is_public", :limit => 1, :default => 1
- t.integer "inherit_members", :limit => 1, :default => 1
- t.integer "open_student", :default => 0
- t.integer "outline", :default => 0
+ t.integer "is_public", :limit => 1, :default => 1
+ t.integer "inherit_members", :limit => 1, :default => 1
+ t.integer "open_student", :default => 0
+ t.integer "outline", :default => 0
+ t.integer "publish_resource", :default => 0
+ t.integer "is_delete", :default => 0
t.integer "end_time"
t.string "end_term"
end
@@ -532,23 +582,32 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
add_index "documents", ["project_id"], :name => "documents_project_id"
- create_table "dts", :force => true do |t|
- t.string "IPLineCode"
- t.string "Description"
- t.string "Num"
- t.string "Variable"
- t.string "TraceInfo"
- t.string "Method"
+ create_table "dts", :primary_key => "Num", :force => true do |t|
+ t.string "Defect", :limit => 50
+ t.string "Category", :limit => 50
t.string "File"
- t.string "IPLine"
- t.string "Review"
- t.string "Category"
- t.string "Defect"
- t.string "PreConditions"
- t.string "StartLine"
+ t.string "Method"
+ t.string "Module", :limit => 20
+ t.string "Variable", :limit => 50
+ t.integer "StartLine"
+ t.integer "IPLine"
+ 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.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.integer "id", :null => false
+ end
+
+ create_table "editor_of_documents", :force => true do |t|
+ t.integer "editor_id"
+ t.integer "org_document_comment_id"
+ t.datetime "created_at"
end
create_table "enabled_modules", :force => true do |t|
@@ -573,6 +632,66 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type"
add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id"
+ create_table "exercise_answers", :force => true do |t|
+ t.integer "user_id"
+ t.integer "exercise_question_id"
+ t.integer "exercise_choice_id"
+ t.text "answer_text"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "exercise_choices", :force => true do |t|
+ t.integer "exercise_question_id"
+ t.text "choice_text"
+ t.integer "choice_position"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "exercise_questions", :force => true do |t|
+ t.text "question_title"
+ t.integer "question_type"
+ t.integer "question_number"
+ t.integer "exercise_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "question_score"
+ end
+
+ create_table "exercise_standard_answers", :force => true do |t|
+ t.integer "exercise_question_id"
+ t.integer "exercise_choice_id"
+ t.text "answer_text"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "exercise_users", :force => true do |t|
+ t.integer "user_id"
+ t.integer "exercise_id"
+ t.integer "score"
+ t.datetime "start_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.datetime "end_at"
+ t.integer "status"
+ end
+
+ create_table "exercises", :force => true do |t|
+ t.text "exercise_name"
+ t.text "exercise_description"
+ t.integer "course_id"
+ t.integer "exercise_status"
+ t.integer "user_id"
+ t.integer "time"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.datetime "publish_time"
+ t.datetime "end_time"
+ t.integer "show_result"
+ end
+
create_table "first_pages", :force => true do |t|
t.string "web_title"
t.string "title"
@@ -662,6 +781,19 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
t.integer "anonymous_comment", :default => 0
end
+ add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id"
+
+ create_table "homework_detail_groups", :force => true do |t|
+ t.integer "homework_common_id"
+ t.integer "min_num"
+ t.integer "max_num"
+ t.integer "base_on_project"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "homework_detail_groups", ["homework_common_id"], :name => "index_homework_detail_groups_on_homework_common_id"
+
create_table "homework_detail_manuals", :force => true do |t|
t.float "ta_proportion"
t.integer "comment_status"
@@ -818,16 +950,6 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
- create_table "journal_details_copy", :force => true do |t|
- t.integer "journal_id", :default => 0, :null => false
- t.string "property", :limit => 30, :default => "", :null => false
- t.string "prop_key", :limit => 30, :default => "", :null => false
- t.text "old_value"
- t.text "value"
- end
-
- add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id"
-
create_table "journal_replies", :id => false, :force => true do |t|
t.integer "journal_id"
t.integer "user_id"
@@ -947,6 +1069,7 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
t.boolean "locked", :default => false
t.integer "sticky", :default => 0
t.integer "reply_id"
+ t.integer "quotes"
end
add_index "messages", ["author_id"], :name => "index_messages_on_author_id"
@@ -964,6 +1087,7 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
t.datetime "created_on"
t.integer "comments_count", :default => 0, :null => false
t.integer "course_id"
+ t.integer "sticky", :default => 0
end
add_index "news", ["author_id"], :name => "index_news_on_author_id"
@@ -1049,10 +1173,46 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
t.integer "project_id"
end
+ create_table "org_activities", :force => true do |t|
+ t.integer "user_id"
+ t.integer "org_act_id"
+ t.string "org_act_type"
+ t.integer "container_id"
+ t.string "container_type"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "org_courses", :force => true do |t|
+ t.integer "organization_id"
+ t.integer "course_id"
+ t.datetime "created_at"
+ end
+
+ create_table "org_document_comments", :force => true do |t|
+ t.text "title"
+ t.text "content"
+ t.integer "organization_id"
+ t.integer "creator_id"
+ t.integer "parent_id"
+ t.integer "reply_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.boolean "locked", :default => false
+ t.integer "sticky", :default => 0
+ t.integer "org_subfield_id"
+ end
+
+ create_table "org_member_roles", :force => true do |t|
+ t.integer "org_member_id"
+ t.integer "role_id"
+ end
+
create_table "org_members", :force => true do |t|
- t.integer "user_id"
- t.integer "organization_id"
- t.string "role"
+ t.integer "user_id"
+ t.integer "organization_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "org_projects", :force => true do |t|
@@ -1212,27 +1372,30 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
end
create_table "projects", :force => true do |t|
- t.string "name", :default => "", :null => false
+ t.string "name", :default => "", :null => false
t.text "description"
- t.string "homepage", :default => ""
- t.boolean "is_public", :default => true, :null => false
+ t.string "homepage", :default => ""
+ t.boolean "is_public", :default => true, :null => false
t.integer "parent_id"
t.datetime "created_on"
t.datetime "updated_on"
t.string "identifier"
- t.integer "status", :default => 1, :null => false
+ t.integer "status", :default => 1, :null => false
t.integer "lft"
t.integer "rgt"
- t.boolean "inherit_members", :default => false, :null => false
+ t.boolean "inherit_members", :default => false, :null => false
t.integer "project_type"
- t.boolean "hidden_repo", :default => false, :null => false
- t.integer "attachmenttype", :default => 1
+ t.boolean "hidden_repo", :default => false, :null => false
+ t.integer "attachmenttype", :default => 1
t.integer "user_id"
- t.integer "dts_test", :default => 0
+ t.integer "dts_test", :default => 0
t.string "enterprise_name"
t.integer "organization_id"
t.integer "project_new_type"
t.integer "gpid"
+ t.integer "forked_from_project_id"
+ t.integer "forked_count"
+ t.integer "commits_count", :default => 0
end
add_index "projects", ["lft"], :name => "index_projects_on_lft"
@@ -1397,6 +1560,21 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
t.integer "project_id"
end
+ create_table "student_work_projects", :force => true do |t|
+ t.integer "homework_common_id"
+ t.integer "student_work_id"
+ t.integer "project_id"
+ t.integer "user_id"
+ t.integer "is_leader"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "student_work_projects", ["homework_common_id"], :name => "index_student_work_projects_on_homework_common_id"
+ add_index "student_work_projects", ["project_id"], :name => "index_student_work_projects_on_project_id"
+ add_index "student_work_projects", ["student_work_id"], :name => "index_student_work_projects_on_student_work_id"
+ add_index "student_work_projects", ["user_id"], :name => "index_student_work_projects_on_user_id"
+
create_table "student_work_tests", :force => true do |t|
t.integer "student_work_id"
t.datetime "created_at", :null => false
@@ -1424,6 +1602,8 @@ ActiveRecord::Schema.define(:version => 20151102090519) do
t.boolean "is_test", :default => false
end
+ add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"
+
create_table "student_works_evaluation_distributions", :force => true do |t|
t.integer "student_work_id"
t.integer "user_id"
diff --git a/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb b/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb
index a2fef6174..50fc50b38 100644
--- a/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb
+++ b/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb
@@ -14,7 +14,7 @@ module RailsKindeditor
output = ActiveSupport::SafeBuffer.new
output << text_area_tag(name, content, input_html)
output << javascript_tag(js_replace(id, options.merge(window_onload: 'true',
- :autoHeightMode=>true,
+ :autoHeightMode=>false,
afterCreate: eval_str(at_id, at_type),
emotionsBasePath: 'http://' + Setting.host_name
)))
@@ -29,7 +29,7 @@ module RailsKindeditor
output_buffer = ActiveSupport::SafeBuffer.new
output_buffer << build_text_area_tag(name, method, self, options, input_html)
output_buffer << javascript_tag(js_replace(input_html['id'],options.merge(window_onload: 'true',
- :autoHeightMode=>true,
+ :autoHeightMode=>false,
afterCreate: eval_str(at_id, at_type),
emotionsBasePath: 'http://' + Setting.host_name
)))
diff --git a/public/assets/kindeditor/at/config.js b/public/assets/kindeditor/at/config.js
index 2bab7eb67..651f33464 100644
--- a/public/assets/kindeditor/at/config.js
+++ b/public/assets/kindeditor/at/config.js
@@ -35,7 +35,7 @@ var enableAt = function(_editor) {
var at_config = {
at: "@",
data: names,
- insertTpl: '
@${name}(${login})',
+ insertTpl: '
@${name}(${login})',
displayTpl: "
${name} ${login}",
searchKey: 'searchKey',
limit: 200
diff --git a/public/assets/kindeditor/at/jquery.atwho.css b/public/assets/kindeditor/at/jquery.atwho.css
index df3ff9d94..13ca0265a 100644
--- a/public/assets/kindeditor/at/jquery.atwho.css
+++ b/public/assets/kindeditor/at/jquery.atwho.css
@@ -49,4 +49,5 @@
}
/* @功能 定义 */
-span.at {color:#269ac9;}
\ No newline at end of file
+span.at {color:#269ac9;}
+span.at a{color:#269ac9;text-decoration: none;}
\ No newline at end of file
diff --git a/public/assets/kindeditor/plugins/code/previewcode.css b/public/assets/kindeditor/plugins/code/previewcode.css
index c106a72f3..c8e5df4e1 100644
--- a/public/assets/kindeditor/plugins/code/previewcode.css
+++ b/public/assets/kindeditor/plugins/code/previewcode.css
@@ -45,4 +45,5 @@
.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;background:#f4f5f7 url('../img/blockquote.gif') no-repeat left top;color:#060;font-size:9pt;}
-span.at {color:#269ac9;}
\ No newline at end of file
+span.at {color:#269ac9;}
+span.at a{color:#269ac9;text-decoration: none;}
\ No newline at end of file
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 8932f98a3..a0edf85c1 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -1000,14 +1000,3 @@ function showNormalImage(id) {
}
}
-
-$(function(){
- //at 加链接
- $("span.at").hover(function(){
- $(this).css('cursor', 'pointer');
- });
- $("span.at").live('click', function(){
- var userId = $(this).attr('data-user-id');
- $(window.location).attr('href', '/users/'+userId);
- });
-});
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 2e8133172..1b94a0c50 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -1220,6 +1220,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
.hworkPrName {width:110px; max-width:110px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:18px; line-height:18px; font-size:12px; color:#888888; text-align:center;}
.mr150 {margin-right:150px;}
.relatePInfo {text-align: left; position:absolute; background-color:#ffffff; padding:3px 8px; white-space:nowrap; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); z-index:999; color:#585858; cursor:pointer; display:none;}
+.captainName {max-width:40px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: inline-block;}
/*上传资源弹窗*/
.resourceUploadPopup {width:400px; height:auto; border:3px solid #269ac9 !important; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-200px; z-index:1000;}
@@ -1259,3 +1260,5 @@ div.disable_link {background-color: #c1c1c1 !important;}
.fileTagWrap{ width:710px;}
.boxShadow {box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
+
+.fn {font-weight:normal}
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 0e387f5ef..814ea3915 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -1387,6 +1387,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
/* @功能 定义 */
span.at {color:#269ac9;}
+span.at a{color:#269ac9;text-decoration: none;}
.relatePInfo {text-align: left; position:absolute; background-color:#ffffff; padding:3px 8px; white-space:nowrap; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); z-index:999; color:#585858; cursor:pointer; display:none;}
/*问题状态图片*/
diff --git a/public/stylesheets/org.css b/public/stylesheets/org.css
index b37a38da0..2279f0fe5 100644
--- a/public/stylesheets/org.css
+++ b/public/stylesheets/org.css
@@ -103,4 +103,8 @@ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }
.sectionContent span {width:175px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:inline-block; height:18px; vertical-align:middle;}.popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px;
background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.org_login_list a {color:#269ac9;}
-div.flash {margin-top :0px !important}
\ No newline at end of file
+div.flash {margin-top :0px !important}
+
+.w80{ width:80px;}
+.relatePInfo {text-align: left; position:absolute; background-color:#ffffff; padding:3px 8px; white-space:nowrap; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); z-index:999; color:#585858; cursor:pointer; display:none;}
+.captainName {max-width:40px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: inline-block;}
\ No newline at end of file
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index e898db13e..2509128ed 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -934,6 +934,7 @@ a.resourcesTypeUser {background:url(images/homepage_icon.png) -178px -453px no-r
/* @功能 定义 */
span.at {color:#269ac9;}
+span.at a{color:#269ac9;text-decoration: none;}
/*20151217资源库Tim*/
.preview {background:url(../images/hwork_icon.png) -75px -120px no-repeat; width:20px; height:20px; display:inline-block;}
@@ -956,4 +957,4 @@ span.at {color:#269ac9;}
.sectionContent li:hover {background-color:#cccccc;}
.sectionContent span {width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:inline-block; height:20px; vertical-align:top;}
.orgDirection {width:392px; background-color:#f1f1f1; height:30px; vertical-align:middle; line-height:30px; color:#585858; padding-left:10px;}
-.orgSendSearch {border:1px solid #dddddd; outline:none; width:262px; height:22px; padding-left:10px; float:left;}
\ No newline at end of file
+.orgSendSearch {border:1px solid #dddddd; outline:none; width:262px; height:22px; padding-left:10px; float:left;}