隐藏非项目的信息

This commit is contained in:
daiao 2017-08-07 10:46:17 +08:00
parent 64ccb03c9e
commit 3178e344b1
2 changed files with 3215 additions and 2955 deletions

View File

@ -81,9 +81,11 @@
<li>
<%= link_to '我的项目', {:controller => "users", :action => "user_projectlist", :id => User.current}, :class => "menuGrey" %>
</li>
<% if hidden_unproject_infos %>
<li>
<%= link_to "我的组织", user_organizations_user_path(:id => User.current), :class => "menuGrey"%>
</li>
<% end %>
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
<li>
<%= link_to "退出",logout_url_without_domain,:class => "menuGrey",:method => "post", :id => "logout_trustie" %>

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20170425030242) do
ActiveRecord::Schema.define(:version => 20170802012507) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -84,6 +84,17 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "role", :default => 0
end
create_table "apply_actions", :force => true do |t|
t.integer "user_id"
t.string "reason"
t.integer "container_id"
t.string "container_type"
t.integer "dealer_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "status", :limit => 1, :default => 0
end
create_table "apply_add_departments", :force => true do |t|
t.string "name"
t.integer "department_id"
@ -144,6 +155,19 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "apply_user_id"
end
create_table "apply_user_authentications", :force => true do |t|
t.integer "user_id"
t.integer "status"
t.integer "auth_type"
t.string "remarks"
t.integer "dealer"
t.datetime "deal_time"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "apply_user_authentications", ["user_id"], :name => "index_apply_user_authentications_on_user_id"
create_table "article_homepages", :force => true do |t|
t.string "title"
t.text "content"
@ -244,6 +268,16 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type"
create_table "authentications", :force => true do |t|
t.integer "level", :limit => 1
t.text "permissions"
end
create_table "authentications_users", :force => true do |t|
t.integer "user_id"
t.integer "authentication_id"
end
create_table "biding_projects", :force => true do |t|
t.integer "project_id"
t.integer "bid_id"
@ -346,6 +380,15 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.datetime "updated_at", :null => false
end
create_table "challenge_questions", :force => true do |t|
t.text "option_name"
t.integer "challenge_id"
t.boolean "right_key"
t.integer "position", :limit => 1
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "challenge_samples", :force => true do |t|
t.string "input"
t.string "output"
@ -371,7 +414,7 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "position", :limit => 1, :default => 1
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.text "ready_knowledge"
t.text "ready_knowledge", :limit => 2147483647
t.text "task_pass", :limit => 2147483647
t.text "answer", :limit => 2147483647
t.integer "score"
@ -380,6 +423,9 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "evaluation_way", :default => 0
t.integer "difficulty", :default => 1
t.text "pipeline_script"
t.string "exec_path"
t.integer "code_line"
t.integer "st", :limit => 1, :default => 0
end
create_table "changes", :force => true do |t|
@ -574,13 +620,6 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
add_index "contest_messages", ["contest_id"], :name => "index_contest_messages_on_contest_id"
add_index "contest_messages", ["user_id"], :name => "index_contest_messages_on_user_id"
create_table "contest_notifications", :force => true do |t|
t.text "title"
t.text "content"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "contestant_for_contests", :force => true do |t|
t.integer "student_id"
t.integer "contest_id"
@ -648,37 +687,6 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
add_index "contestant_works", ["user_id"], :name => "index_contestant_works_on_user_id"
add_index "contestant_works", ["work_id"], :name => "index_contestant_works_on_work_id"
create_table "contesting_projects", :force => true do |t|
t.integer "project_id"
t.string "contest_id"
t.integer "user_id"
t.string "description"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "reward"
end
create_table "contesting_softapplications", :force => true do |t|
t.integer "softapplication_id"
t.integer "contest_id"
t.integer "user_id"
t.string "description"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "reward"
end
create_table "contestnotifications", :force => true do |t|
t.integer "contest_id"
t.string "title"
t.string "summary"
t.text "description"
t.integer "author_id"
t.integer "notificationcomments_count"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "contests", :force => true do |t|
t.integer "user_id"
t.string "name"
@ -770,6 +778,10 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.datetime "updated_at", :null => false
end
create_table "course_lists", :force => true do |t|
t.string "name"
end
create_table "course_messages", :force => true do |t|
t.integer "user_id"
t.integer "course_id"
@ -787,6 +799,15 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
add_index "course_messages", ["course_message_type"], :name => "index_course_messages_on_course_message_type"
add_index "course_messages", ["user_id", "course_id", "created_at"], :name => "index_course_messages_on_user_id_and_course_id_and_created_at"
create_table "course_modules", :force => true do |t|
t.integer "course_id"
t.string "module_type"
t.integer "position"
t.integer "hidden"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "course_statuses", :force => true do |t|
t.integer "changesets_count"
t.integer "watchers_count"
@ -837,6 +858,10 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "qrcode_expiretime", :default => 0
t.integer "invite_code_halt", :limit => 1, :default => 0
t.integer "os_allow", :default => 0
t.float "credit"
t.boolean "is_end", :default => false
t.date "end_date"
t.boolean "choose_group_allow", :default => false
end
add_index "courses", ["invite_code"], :name => "index_courses_on_invite_code", :unique => true
@ -947,6 +972,20 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.datetime "updated_at", :null => false
end
create_table "discusses", :force => true do |t|
t.integer "user_id"
t.string "dis_type"
t.integer "dis_id"
t.text "content"
t.integer "parent_id"
t.integer "root_id"
t.integer "praise_count"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "discusses", ["user_id"], :name => "index_discusses_on_user_id"
create_table "documents", :force => true do |t|
t.integer "project_id", :default => 0, :null => false
t.integer "category_id", :default => 0, :null => false
@ -1077,6 +1116,15 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "choice_random", :default => 0
end
create_table "experiences", :force => true do |t|
t.integer "user_id"
t.integer "container_id"
t.string "container_type"
t.integer "score"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "first_level_disciplines", :force => true do |t|
t.integer "discipline_category_id"
t.string "name"
@ -1148,6 +1196,15 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.datetime "created_at"
end
create_table "game_codes", :force => true do |t|
t.integer "game_id"
t.text "original_code", :limit => 2147483647
t.text "new_code", :limit => 2147483647
t.string "path"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "game_outputs", :force => true do |t|
t.integer "code"
t.integer "game_id"
@ -1166,6 +1223,20 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "final_score", :default => 0
t.integer "challenge_id"
t.datetime "open_time"
t.string "identifier"
t.boolean "answer_open", :default => false
t.datetime "end_time"
t.integer "retry_status", :default => 0
t.string "resubmit_identifier"
end
create_table "grades", :force => true do |t|
t.integer "user_id"
t.integer "container_id"
t.string "container_type"
t.integer "score"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "groups_users", :id => false, :force => true do |t|
@ -1201,6 +1272,26 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id"
create_table "homework_bank_samples", :force => true do |t|
t.text "input"
t.text "output"
t.integer "homework_bank_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "homework_bank_samples", ["homework_bank_id"], :name => "index_homework_bank_samples_on_homework_bank_id"
create_table "homework_bank_shixuns", :force => true do |t|
t.integer "homework_bank_id"
t.integer "shixun_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "homework_bank_shixuns", ["homework_bank_id"], :name => "index_homework_bank_shixuns_on_homework_bank_id"
add_index "homework_bank_shixuns", ["shixun_id"], :name => "index_homework_bank_shixuns_on_shixun_id"
create_table "homework_bank_tests", :force => true do |t|
t.text "input"
t.text "output"
@ -1226,6 +1317,11 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "homework_common_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.text "reference_answer"
t.integer "syllabus_id"
t.text "major_level"
t.text "discipline_category_id"
t.text "first_level_discipline_id"
end
create_table "homework_commons", :force => true do |t|
@ -1248,10 +1344,24 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "anonymous_appeal", :default => 0
t.integer "homework_bank_id"
t.boolean "is_update", :default => false
t.boolean "is_public", :default => false
t.text "reference_answer"
t.boolean "answer_public", :default => true
t.datetime "archive_time"
t.boolean "allow_late", :default => true
t.datetime "late_time"
t.boolean "work_public", :default => true
end
add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id"
create_table "homework_commons_shixuns", :force => true do |t|
t.integer "shixun_id"
t.integer "homework_common_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "homework_detail_groups", :force => true do |t|
t.integer "homework_common_id"
t.integer "min_num"
@ -1266,8 +1376,8 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
create_table "homework_detail_manuals", :force => true do |t|
t.float "ta_proportion"
t.integer "comment_status"
t.date "evaluation_start"
t.date "evaluation_end"
t.datetime "evaluation_start"
t.datetime "evaluation_end"
t.integer "evaluation_num"
t.integer "absence_penalty", :default => 1
t.integer "homework_common_id"
@ -1278,6 +1388,7 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "ta_mode", :default => 1
t.float "te_proportion", :default => 1.0
t.boolean "final_mode", :default => false
t.datetime "appeal_time"
end
create_table "homework_detail_programings", :force => true do |t|
@ -1305,6 +1416,15 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id"
add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id"
create_table "homework_reference_answers", :force => true do |t|
t.text "answer"
t.integer "homework_common_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "homework_reference_answers", ["homework_common_id"], :name => "index_homework_reference_answers_on_homework_common_id"
create_table "homework_samples", :force => true do |t|
t.text "input"
t.text "output"
@ -1332,6 +1452,19 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.datetime "updated_at", :null => false
end
create_table "ii", :force => true do |t|
t.integer "project_id"
t.string "author_login"
t.string "rep_identifier"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "sonar_version", :default => 0
t.string "path"
t.string "branch"
t.string "language"
t.string "sonar_name"
end
create_table "innodb_monitor", :id => false, :force => true do |t|
t.integer "a"
end
@ -1496,6 +1629,25 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "owner_type", :default => 0
end
create_table "major_courses", :force => true do |t|
t.integer "course_list_id"
t.integer "major_id"
end
add_index "major_courses", ["course_list_id"], :name => "index_major_courses_on_course_list_id"
add_index "major_courses", ["major_id"], :name => "index_major_courses_on_major_id"
create_table "majors", :force => true do |t|
t.string "major_code"
t.string "name"
t.integer "first_level_discipline_id"
t.integer "discipline_category_id"
t.integer "major_level"
end
add_index "majors", ["discipline_category_id"], :name => "index_majors_on_discipline_category_id"
add_index "majors", ["first_level_discipline_id"], :name => "index_majors_on_first_level_discipline_id"
create_table "mark_downs", :force => true do |t|
t.text "description"
t.datetime "created_at", :null => false
@ -1585,6 +1737,7 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "quotes"
t.integer "status", :default => 0
t.integer "root_id"
t.integer "visits", :default => 0
end
add_index "messages", ["author_id"], :name => "index_messages_on_author_id"
@ -1613,6 +1766,7 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "status", :default => 0
t.string "identifier"
end
create_table "news", :force => true do |t|
@ -1817,6 +1971,10 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.text "out_put", :limit => 2147483647
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "test_set_position"
t.text "actual_output"
t.boolean "result"
t.boolean "is_public"
end
create_table "phone_app_versions", :force => true do |t|
@ -2127,6 +2285,7 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "first_level_discipline_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "content_type"
end
add_index "resource_banks", ["course_id"], :name => "index_resource_banks_on_course_id"
@ -2234,6 +2393,17 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.datetime "updated_at", :null => false
end
create_table "shixun_major_courses", :force => true do |t|
t.integer "shixun_id"
t.integer "course_list_id"
t.integer "major_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "shixun_major_courses", ["major_id"], :name => "index_shixun_major_courses_on_major_id"
add_index "shixun_major_courses", ["shixun_id"], :name => "index_shixun_major_courses_on_shixun_id"
create_table "shixun_members", :force => true do |t|
t.integer "user_id"
t.integer "shixun_id"
@ -2242,6 +2412,21 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.datetime "updated_at", :null => false
end
create_table "shixun_modifies", :force => true do |t|
t.integer "shixun_id"
t.integer "myshixun_id"
t.integer "status", :limit => 1, :default => 0
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "shixun_tags", :force => true do |t|
t.string "name"
t.integer "challenge_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "shixuns", :force => true do |t|
t.string "name"
t.text "description"
@ -2255,6 +2440,13 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "changeset_num"
t.integer "status", :default => 0
t.string "language"
t.boolean "authentication", :default => false
t.string "identifier"
t.integer "myshixun_count", :default => 0
t.text "propaedeutics", :limit => 2147483647
t.boolean "webssh", :default => false
t.integer "trainee", :default => 1
t.integer "major_id"
end
create_table "softapplications", :force => true do |t|
@ -2297,6 +2489,32 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
add_index "ssos", ["user_id"], :name => "index_ssos_on_user_id"
create_table "stage_shixuns", :force => true do |t|
t.integer "subject_id"
t.integer "stage_id"
t.integer "shixun_id"
t.integer "position"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "stage_shixuns", ["shixun_id"], :name => "index_stage_shixuns_on_shixun_id"
add_index "stage_shixuns", ["stage_id"], :name => "index_stage_shixuns_on_stage_id"
add_index "stage_shixuns", ["subject_id"], :name => "index_stage_shixuns_on_subject_id"
create_table "stages", :force => true do |t|
t.integer "subject_id"
t.string "name"
t.text "description"
t.integer "user_id"
t.integer "position"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "stages", ["subject_id"], :name => "index_stages_on_subject_id"
add_index "stages", ["user_id"], :name => "index_stages_on_user_id"
create_table "student_work_projects", :force => true do |t|
t.integer "homework_common_id"
t.integer "student_work_id"
@ -2348,9 +2566,13 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "is_delete", :default => 0
t.integer "appeal_penalty", :default => 0
t.boolean "re_commit", :default => false
t.text "late_reason"
t.integer "group_id", :default => 0
t.integer "myshixun_id"
end
add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"
add_index "student_works", ["myshixun_id"], :name => "myshixun_id"
create_table "student_works_evaluation_distributions", :force => true do |t|
t.integer "student_work_id"
@ -2425,6 +2647,22 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.datetime "updated_at", :null => false
end
create_table "subjects", :force => true do |t|
t.string "name"
t.text "description"
t.integer "user_id"
t.integer "visits"
t.integer "status"
t.integer "course_list_id"
t.integer "major_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "subjects", ["course_list_id"], :name => "index_subjects_on_course_list_id"
add_index "subjects", ["major_id"], :name => "index_subjects_on_major_id"
add_index "subjects", ["user_id"], :name => "index_subjects_on_user_id"
create_table "syllabus_members", :force => true do |t|
t.integer "rank"
t.integer "syllabus_id"
@ -2467,6 +2705,7 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "major_level"
t.integer "discipline_category_id"
t.integer "first_level_discipline_id"
t.integer "major_id"
end
add_index "syllabuses", ["user_id"], :name => "index_syllabuses_on_user_id"
@ -2737,12 +2976,23 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.integer "excellent_student", :default => 0
t.string "phone"
t.boolean "authentication", :default => false
t.integer "grade"
t.integer "experience", :default => 0
t.string "nickname"
t.boolean "show_realname", :default => true
t.boolean "professional_certification", :default => false
t.string "ID_number"
end
add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"
add_index "users", ["id", "type"], :name => "index_users_on_id_and_type"
add_index "users", ["type"], :name => "index_users_on_type"
create_table "users_authentications", :force => true do |t|
t.integer "user_id"
t.integer "authentication_id"
end
create_table "verification_codes", :force => true do |t|
t.string "code"
t.integer "code_type"
@ -2805,6 +3055,14 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
t.datetime "updated_at", :null => false
end
create_table "websshes", :force => true do |t|
t.integer "myshixun_id"
t.string "host"
t.integer "port"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "wechat_logs", :force => true do |t|
t.string "openid", :null => false
t.text "request_raw"