From ccd8bd1141d47ee23147eb64ef0ee6fa7f775c9a Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 11 Sep 2015 15:09:45 +0800 Subject: [PATCH 01/58] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/schema.rb | 3355 +++++++++++++++++++++++++------------------------- 1 file changed, 1691 insertions(+), 1664 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 9c0f8e373..a49e22a66 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,1664 +1,1691 @@ -# encoding: UTF-8 -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). -# -# It's strongly recommended to check this file into your version control system. - -ActiveRecord::Schema.define(:version => 20150907152238) do - - create_table "activities", :force => true do |t| - t.integer "act_id", :null => false - t.string "act_type", :null => false - t.integer "user_id", :null => false - t.integer "activity_container_id" - t.string "activity_container_type", :default => "" - t.datetime "created_at" - end - - add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" - add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" - add_index "activities", ["user_id"], :name => "index_activities_on_user_id" - - create_table "activity_notifies", :force => true do |t| - t.integer "activity_container_id" - t.string "activity_container_type" - t.integer "activity_id" - t.string "activity_type" - t.integer "notify_to" - t.datetime "created_on" - t.integer "is_read" - end - - add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" - add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" - add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" - - create_table "api_keys", :force => true do |t| - t.string "access_token" - t.datetime "expires_at" - t.integer "user_id" - t.boolean "active", :default => true - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" - add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" - - create_table "applied_projects", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - end - - create_table "apply_project_masters", :force => true do |t| - t.integer "user_id" - t.string "apply_type" - t.integer "apply_id" - t.integer "status" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "attachments", :force => true do |t| - t.integer "container_id" - t.string "container_type", :limit => 30 - t.string "filename", :default => "", :null => false - t.string "disk_filename", :default => "", :null => false - t.integer "filesize", :default => 0, :null => false - t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "", :null => false - t.integer "downloads", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.string "description" - t.string "disk_directory" - t.integer "attachtype", :default => 1 - t.integer "is_public", :default => 1 - t.integer "copy_from" - t.integer "quotes" - end - - add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" - add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" - add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" - - create_table "attachmentstypes", :force => true do |t| - t.integer "typeId", :null => false - t.string "typeName", :limit => 50 - end - - create_table "auth_sources", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 60, :default => "", :null => false - t.string "host", :limit => 60 - t.integer "port" - t.string "account" - t.string "account_password", :default => "" - t.string "base_dn" - t.string "attr_login", :limit => 30 - t.string "attr_firstname", :limit => 30 - t.string "attr_lastname", :limit => 30 - t.string "attr_mail", :limit => 30 - t.boolean "onthefly_register", :default => false, :null => false - t.boolean "tls", :default => false, :null => false - t.string "filter" - t.integer "timeout" - end - - add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" - - create_table "biding_projects", :force => true do |t| - t.integer "project_id" - t.integer "bid_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 "bids", :force => true do |t| - t.string "name" - t.string "budget", :null => false - t.integer "author_id" - t.date "deadline" - t.text "description" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.integer "commit" - t.integer "reward_type" - t.integer "homework_type" - t.integer "parent_id" - t.string "password" - t.integer "is_evaluation" - t.integer "proportion", :default => 60 - t.integer "comment_status", :default => 0 - t.integer "evaluation_num", :default => 3 - t.integer "open_anonymous_evaluation", :default => 1 - end - - create_table "boards", :force => true do |t| - t.integer "project_id", :null => false - t.string "name", :default => "", :null => false - t.string "description" - t.integer "position", :default => 1 - t.integer "topics_count", :default => 0, :null => false - t.integer "messages_count", :default => 0, :null => false - t.integer "last_message_id" - t.integer "parent_id" - t.integer "course_id" - end - - add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" - add_index "boards", ["project_id"], :name => "boards_project_id" - - create_table "bug_to_osps", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "changes", :force => true do |t| - t.integer "changeset_id", :null => false - t.string "action", :limit => 1, :default => "", :null => false - t.text "path", :null => false - t.text "from_path" - t.string "from_revision" - t.string "revision" - t.string "branch" - end - - add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" - - create_table "changeset_parents", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "parent_id", :null => false - end - - add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" - add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" - - create_table "changesets", :force => true do |t| - t.integer "repository_id", :null => false - t.string "revision", :null => false - t.string "committer" - t.datetime "committed_on", :null => false - t.text "comments" - t.date "commit_date" - t.string "scmid" - t.integer "user_id" - end - - add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" - add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true - add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" - add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" - add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" - - create_table "changesets_issues", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "issue_id", :null => false - end - - add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true - - create_table "code_review_assignments", :force => true do |t| - t.integer "issue_id" - t.integer "change_id" - t.integer "attachment_id" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.string "action_type" - t.integer "changeset_id" - end - - create_table "code_review_project_settings", :force => true do |t| - t.integer "project_id" - t.integer "tracker_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "updated_by" - t.boolean "hide_code_review_tab", :default => false - t.integer "auto_relation", :default => 1 - t.integer "assignment_tracker_id" - t.text "auto_assign" - t.integer "lock_version", :default => 0, :null => false - t.boolean "tracker_in_review_dialog", :default => false - end - - create_table "code_reviews", :force => true do |t| - t.integer "project_id" - t.integer "change_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "line" - t.integer "updated_by_id" - t.integer "lock_version", :default => 0, :null => false - t.integer "status_changed_from" - t.integer "status_changed_to" - t.integer "issue_id" - t.string "action_type" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.integer "attachment_id" - t.integer "file_count", :default => 0, :null => false - t.boolean "diff_all" - end - - create_table "comments", :force => true do |t| - t.string "commented_type", :limit => 30, :default => "", :null => false - t.integer "commented_id", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.text "comments" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "comments", ["author_id"], :name => "index_comments_on_author_id" - add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" - - 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 "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.string "name" - t.string "budget", :default => "" - t.integer "author_id" - t.date "deadline" - t.string "description" - t.integer "commit" - t.string "password" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - create_table "course_activities", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_act_id" - t.string "course_act_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_attachments", :force => true do |t| - t.string "filename" - t.string "disk_filename" - t.integer "filesize" - t.string "content_type" - t.string "digest" - t.integer "downloads" - t.string "author_id" - t.string "integer" - t.string "description" - t.string "disk_directory" - t.integer "attachtype" - t.integer "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "container_id", :default => 0 - end - - create_table "course_groups", :force => true do |t| - t.string "name" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_infos", :force => true do |t| - t.integer "course_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_messages", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_message_id" - t.string "course_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "content" - t.integer "status" - end - - create_table "course_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "course_id" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "courses", :force => true do |t| - t.integer "tea_id" - t.string "name" - t.integer "state" - t.string "code" - t.integer "time" - t.string "extra" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "location" - t.string "term" - t.string "string" - t.string "password" - t.string "setup_time" - t.string "endup_time" - t.string "class_period" - t.integer "school_id" - t.text "description" - 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 - end - - create_table "custom_fields", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.string "field_format", :limit => 30, :default => "", :null => false - t.text "possible_values" - t.string "regexp", :default => "" - t.integer "min_length", :default => 0, :null => false - t.integer "max_length", :default => 0, :null => false - t.boolean "is_required", :default => false, :null => false - t.boolean "is_for_all", :default => false, :null => false - t.boolean "is_filter", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "searchable", :default => false - t.text "default_value" - t.boolean "editable", :default => true - t.boolean "visible", :default => true, :null => false - t.boolean "multiple", :default => false - end - - add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" - - create_table "custom_fields_projects", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "project_id", :default => 0, :null => false - end - - add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true - - create_table "custom_fields_trackers", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true - - create_table "custom_values", :force => true do |t| - t.string "customized_type", :limit => 30, :default => "", :null => false - t.integer "customized_id", :default => 0, :null => false - t.integer "custom_field_id", :default => 0, :null => false - t.text "value" - end - - add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" - add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" - - create_table "delayed_jobs", :force => true do |t| - t.integer "priority", :default => 0, :null => false - t.integer "attempts", :default => 0, :null => false - t.text "handler", :null => false - t.text "last_error" - t.datetime "run_at" - t.datetime "locked_at" - t.datetime "failed_at" - t.string "locked_by" - t.string "queue" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" - - create_table "documents", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "category_id", :default => 0, :null => false - t.string "title", :limit => 60, :default => "", :null => false - t.text "description" - t.datetime "created_on" - t.integer "user_id", :default => 0 - t.integer "is_public", :default => 1 - end - - add_index "documents", ["category_id"], :name => "index_documents_on_category_id" - 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" - t.string "File" - t.string "IPLine" - t.string "Review" - t.string "Category" - t.string "Defect" - t.string "PreConditions" - t.string "StartLine" - t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "enabled_modules", :force => true do |t| - t.integer "project_id" - t.string "name", :null => false - t.integer "course_id" - end - - add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" - - create_table "enumerations", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "is_default", :default => false, :null => false - t.string "type" - t.boolean "active", :default => true, :null => false - t.integer "project_id" - t.integer "parent_id" - t.string "position_name", :limit => 30 - end - - 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 "first_pages", :force => true do |t| - t.string "web_title" - t.string "title" - t.text "description" - t.string "page_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sort_type" - t.integer "image_width", :default => 107 - t.integer "image_height", :default => 63 - t.integer "show_course", :default => 1 - t.integer "show_contest", :default => 1 - end - - create_table "forge_activities", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_act_id" - t.string "forge_act_type" - t.integer "org_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" - - create_table "forge_messages", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_message_id" - t.string "forge_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "forums", :force => true do |t| - t.string "name", :null => false - t.text "description" - t.integer "topic_count", :default => 0 - t.integer "memo_count", :default => 0 - t.integer "last_memo_id", :default => 0 - t.integer "creator_id", :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sticky" - t.integer "locked" - end - - create_table "groups_users", :id => false, :force => true do |t| - t.integer "group_id", :null => false - t.integer "user_id", :null => false - end - - add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true - - create_table "homework_attaches", :force => true do |t| - t.integer "bid_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - t.string "name" - t.text "description" - t.integer "state" - t.integer "project_id", :default => 0 - t.float "score", :default => 0.0 - t.integer "is_teacher_score", :default => 0 - end - - add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" - - create_table "homework_commons", :force => true do |t| - t.string "name" - t.integer "user_id" - t.text "description" - t.date "publish_time" - t.date "end_time" - t.integer "homework_type", :default => 1 - t.string "late_penalty" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - 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.integer "evaluation_num" - t.integer "absence_penalty", :default => 1 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_detail_programings", :force => true do |t| - t.string "language" - t.text "standard_code", :limit => 2147483647 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "ta_proportion", :default => 0.1 - t.integer "question_id" - end - - create_table "homework_evaluations", :force => true do |t| - t.string "user_id" - t.string "homework_attach_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_for_courses", :force => true do |t| - t.integer "course_id" - t.integer "bid_id" - end - - 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_tests", :force => true do |t| - t.text "input" - t.text "output" - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "result" - t.text "error_msg" - end - - create_table "homework_users", :force => true do |t| - t.string "homework_attach_id" - t.string "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "invite_lists", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "issue_categories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.integer "assigned_to_id" - end - - add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" - add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" - - create_table "issue_relations", :force => true do |t| - t.integer "issue_from_id", :null => false - t.integer "issue_to_id", :null => false - t.string "relation_type", :default => "", :null => false - t.integer "delay" - end - - add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true - add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" - add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" - - create_table "issue_statuses", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_closed", :default => false, :null => false - t.boolean "is_default", :default => false, :null => false - t.integer "position", :default => 1 - t.integer "default_done_ratio" - end - - add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" - add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" - add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" - - create_table "issues", :force => true do |t| - t.integer "tracker_id", :null => false - t.integer "project_id", :null => false - t.string "subject", :default => "", :null => false - t.text "description" - t.date "due_date" - t.integer "category_id" - t.integer "status_id", :null => false - t.integer "assigned_to_id" - t.integer "priority_id", :null => false - t.integer "fixed_version_id" - t.integer "author_id", :null => false - t.integer "lock_version", :default => 0, :null => false - t.datetime "created_on" - t.datetime "updated_on" - t.date "start_date" - t.integer "done_ratio", :default => 0, :null => false - t.float "estimated_hours" - t.integer "parent_id" - t.integer "root_id" - t.integer "lft" - t.integer "rgt" - t.boolean "is_private", :default => false, :null => false - t.datetime "closed_on" - t.integer "project_issues_index" - end - - add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" - add_index "issues", ["author_id"], :name => "index_issues_on_author_id" - add_index "issues", ["category_id"], :name => "index_issues_on_category_id" - add_index "issues", ["created_on"], :name => "index_issues_on_created_on" - add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" - add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" - add_index "issues", ["project_id"], :name => "issues_project_id" - add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" - add_index "issues", ["status_id"], :name => "index_issues_on_status_id" - add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" - - create_table "join_in_competitions", :force => true do |t| - t.integer "user_id" - t.integer "competition_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "join_in_contests", :force => true do |t| - t.integer "user_id" - t.integer "bid_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "journal_details", :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", ["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" - t.integer "reply_id" - end - - add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" - add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" - add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" - - create_table "journals", :force => true do |t| - t.integer "journalized_id", :default => 0, :null => false - t.string "journalized_type", :limit => 30, :default => "", :null => false - t.integer "user_id", :default => 0, :null => false - t.text "notes" - t.datetime "created_on", :null => false - t.boolean "private_notes", :default => false, :null => false - end - - add_index "journals", ["created_on"], :name => "index_journals_on_created_on" - add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" - add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" - add_index "journals", ["user_id"], :name => "index_journals_on_user_id" - - create_table "journals_for_messages", :force => true do |t| - t.integer "jour_id" - t.string "jour_type" - t.integer "user_id" - t.text "notes" - t.integer "status" - t.integer "reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.string "m_parent_id" - t.boolean "is_readed" - t.integer "m_reply_count" - t.integer "m_reply_id" - t.integer "is_comprehensive_evaluation" - end - - create_table "kindeditor_assets", :force => true do |t| - t.string "asset" - t.integer "file_size" - t.string "file_type" - t.integer "owner_id" - t.string "asset_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "owner_type", :default => 0 - end - - create_table "member_roles", :force => true do |t| - t.integer "member_id", :null => false - t.integer "role_id", :null => false - t.integer "inherited_from" - end - - add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" - add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" - - create_table "members", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "project_id", :default => 0 - t.datetime "created_on" - t.boolean "mail_notification", :default => false, :null => false - t.integer "course_id", :default => -1 - t.integer "course_group_id", :default => 0 - end - - add_index "members", ["project_id"], :name => "index_members_on_project_id" - add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true - add_index "members", ["user_id"], :name => "index_members_on_user_id" - - create_table "memo_messages", :force => true do |t| - t.integer "user_id" - t.integer "forum_id" - t.integer "memo_id" - t.string "memo_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "memos", :force => true do |t| - t.integer "forum_id", :null => false - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :null => false - t.integer "author_id", :null => false - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count", :default => 0 - end - - create_table "message_alls", :force => true do |t| - t.integer "user_id" - t.integer "message_id" - t.string "message_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "messages", :force => true do |t| - t.integer "board_id", :null => false - t.integer "parent_id" - t.string "subject", :default => "", :null => false - t.text "content" - t.integer "author_id" - t.integer "replies_count", :default => 0, :null => false - t.integer "last_reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - end - - add_index "messages", ["author_id"], :name => "index_messages_on_author_id" - add_index "messages", ["board_id"], :name => "messages_board_id" - add_index "messages", ["created_on"], :name => "index_messages_on_created_on" - add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" - add_index "messages", ["parent_id"], :name => "messages_parent_id" - - create_table "news", :force => true do |t| - t.integer "project_id" - t.string "title", :limit => 60, :default => "", :null => false - t.string "summary", :default => "" - t.text "description" - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.integer "comments_count", :default => 0, :null => false - t.integer "course_id" - t.datetime "updated_on" - end - - add_index "news", ["author_id"], :name => "index_news_on_author_id" - add_index "news", ["created_on"], :name => "index_news_on_created_on" - add_index "news", ["project_id"], :name => "news_project_id" - - create_table "no_uses", :force => true do |t| - t.integer "user_id", :null => false - t.string "no_use_type" - t.integer "no_use_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "notificationcomments", :force => true do |t| - t.string "notificationcommented_type" - t.integer "notificationcommented_id" - t.integer "author_id" - t.text "notificationcomments" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "open_id_authentication_associations", :force => true do |t| - t.integer "issued" - t.integer "lifetime" - t.string "handle" - t.string "assoc_type" - t.binary "server_url" - t.binary "secret" - end - - create_table "open_id_authentication_nonces", :force => true do |t| - t.integer "timestamp", :null => false - t.string "server_url" - t.string "salt", :null => false - end - - create_table "open_source_projects", :force => true do |t| - t.string "name" - t.text "description" - t.integer "commit_count", :default => 0 - t.integer "code_line", :default => 0 - t.integer "users_count", :default => 0 - t.date "last_commit_time" - t.string "url" - t.date "date_collected" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "option_numbers", :force => true do |t| - t.integer "user_id" - t.integer "memo" - t.integer "messages_for_issues" - t.integer "issues_status" - t.integer "replay_for_message" - t.integer "replay_for_memo" - t.integer "follow" - t.integer "tread" - t.integer "praise_by_one" - t.integer "praise_by_two" - t.integer "praise_by_three" - t.integer "tread_by_one" - t.integer "tread_by_two" - t.integer "tread_by_three" - t.integer "changeset" - t.integer "document" - t.integer "attachment" - t.integer "issue_done_ratio" - t.integer "post_issue" - t.integer "score_type" - t.integer "total_score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - end - - create_table "organizations", :force => true do |t| - t.string "name" - t.string "logo_link" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "phone_app_versions", :force => true do |t| - t.string "version" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_answers", :force => true do |t| - t.integer "poll_question_id" - t.text "answer_text" - t.integer "answer_position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_questions", :force => true do |t| - t.string "question_title" - t.integer "question_type" - t.integer "is_necessary" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "question_number" - end - - create_table "poll_users", :force => true do |t| - t.integer "user_id" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_votes", :force => true do |t| - t.integer "user_id" - t.integer "poll_question_id" - t.integer "poll_answer_id" - t.text "vote_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "polls", :force => true do |t| - t.string "polls_name" - t.string "polls_type" - t.integer "polls_group_id" - t.integer "polls_status" - t.integer "user_id" - t.datetime "published_at" - t.datetime "closed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "polls_description" - t.integer "show_result", :default => 1 - end - - create_table "praise_tread_caches", :force => true do |t| - t.integer "object_id", :null => false - t.string "object_type" - t.integer "praise_num" - t.integer "tread_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "praise_treads", :force => true do |t| - t.integer "user_id", :null => false - t.integer "praise_tread_object_id" - t.string "praise_tread_object_type" - t.integer "praise_or_tread" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_infos", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_scores", :force => true do |t| - t.string "project_id" - t.integer "score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "issue_num", :default => 0 - t.integer "issue_journal_num", :default => 0 - t.integer "news_num", :default => 0 - t.integer "documents_num", :default => 0 - t.integer "changeset_num", :default => 0 - t.integer "board_message_num", :default => 0 - end - - create_table "project_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "project_id" - t.integer "project_type" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - end - - add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" - - create_table "projecting_softapplictions", :force => true do |t| - t.integer "user_id" - t.integer "softapplication_id" - t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "projects", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "description" - 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 "lft" - t.integer "rgt" - 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.integer "user_id" - t.integer "dts_test", :default => 0 - t.string "enterprise_name" - t.integer "organization_id" - t.integer "project_new_type" - end - - add_index "projects", ["lft"], :name => "index_projects_on_lft" - add_index "projects", ["rgt"], :name => "index_projects_on_rgt" - - create_table "projects_trackers", :id => false, :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true - add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" - - create_table "queries", :force => true do |t| - t.integer "project_id" - t.string "name", :default => "", :null => false - t.text "filters" - t.integer "user_id", :default => 0, :null => false - t.boolean "is_public", :default => false, :null => false - t.text "column_names" - t.text "sort_criteria" - t.string "group_by" - t.string "type" - end - - add_index "queries", ["project_id"], :name => "index_queries_on_project_id" - add_index "queries", ["user_id"], :name => "index_queries_on_user_id" - - create_table "relative_memo_to_open_source_projects", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "relative_memos", :force => true do |t| - t.integer "osp_id" - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :null => false - t.integer "author_id" - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.boolean "is_quote", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count_crawl", :default => 0 - t.integer "viewed_count_local", :default => 0 - t.string "url" - t.string "username" - t.string "userhomeurl" - t.date "date_collected" - t.string "topic_resource" - end - - create_table "repositories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "url", :default => "", :null => false - t.string "login", :limit => 60, :default => "" - t.string "password", :default => "" - t.string "root_url", :default => "" - t.string "type" - t.string "path_encoding", :limit => 64 - t.string "log_encoding", :limit => 64 - t.text "extra_info" - t.string "identifier" - t.boolean "is_default", :default => false - t.boolean "hidden", :default => false - end - - add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" - - create_table "roles", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "assignable", :default => true - t.integer "builtin", :default => 0, :null => false - t.text "permissions" - t.string "issues_visibility", :limit => 30, :default => "default", :null => false - end - - create_table "schools", :force => true do |t| - t.string "name" - t.string "province" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "logo_link" - end - - create_table "seems_rateable_cached_ratings", :force => true do |t| - t.integer "cacheable_id", :limit => 8 - t.string "cacheable_type" - t.float "avg", :null => false - t.integer "cnt", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "seems_rateable_rates", :force => true do |t| - t.integer "rater_id", :limit => 8 - t.integer "rateable_id" - t.string "rateable_type" - t.float "stars", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "is_teacher_score", :default => 0 - end - - create_table "settings", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "value" - t.datetime "updated_on" - end - - add_index "settings", ["name"], :name => "index_settings_on_name" - - create_table "shares", :force => true do |t| - t.date "created_on" - t.string "url" - t.string "title" - t.integer "share_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - t.integer "user_id" - end - - create_table "softapplications", :force => true do |t| - t.string "name" - t.text "description" - t.integer "app_type_id" - t.string "app_type_name" - t.string "android_min_version_available" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "contest_id" - t.integer "softapplication_id" - t.integer "is_public" - t.string "application_developers" - t.string "deposit_project_url" - t.string "deposit_project" - t.integer "project_id" - end - - create_table "student_work_tests", :force => true do |t| - t.integer "student_work_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "status", :default => 9 - t.text "results" - t.text "src" - end - - create_table "student_works", :force => true do |t| - t.string "name" - t.text "description", :limit => 2147483647 - t.integer "homework_common_id" - t.integer "user_id" - t.float "final_score" - t.float "teacher_score" - t.float "student_score" - t.float "teaching_asistant_score" - t.integer "project_id", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "late_penalty", :default => 0 - t.integer "absence_penalty", :default => 0 - t.integer "system_score" - t.boolean "is_test", :default => false - end - - create_table "student_works_evaluation_distributions", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "student_works_scores", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.integer "score" - t.text "comment" - t.integer "reviewer_role" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "students_for_courses", :force => true do |t| - t.integer "student_id" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" - add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" - - create_table "taggings", :force => true do |t| - t.integer "tag_id" - t.integer "taggable_id" - t.string "taggable_type" - t.integer "tagger_id" - t.string "tagger_type" - t.string "context", :limit => 128 - t.datetime "created_at" - end - - add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" - add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" - add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" - - create_table "tags", :force => true do |t| - t.string "name" - end - - create_table "teachers", :force => true do |t| - t.string "tea_name" - t.string "location" - t.integer "couurse_time" - t.integer "course_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "extra" - end - - create_table "time_entries", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - t.integer "issue_id" - t.float "hours", :null => false - t.string "comments" - t.integer "activity_id", :null => false - t.date "spent_on", :null => false - t.integer "tyear", :null => false - t.integer "tmonth", :null => false - t.integer "tweek", :null => false - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" - add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" - add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" - add_index "time_entries", ["project_id"], :name => "time_entries_project_id" - add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" - - create_table "tokens", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.string "action", :limit => 30, :default => "", :null => false - t.string "value", :limit => 40, :default => "", :null => false - t.datetime "created_on", :null => false - end - - add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" - add_index "tokens", ["value"], :name => "tokens_value", :unique => true - - create_table "trackers", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_in_chlog", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "is_in_roadmap", :default => true, :null => false - t.integer "fields_bits", :default => 0 - end - - create_table "user_activities", :force => true do |t| - t.string "act_type" - t.integer "act_id" - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "user_id" - end - - create_table "user_extensions", :force => true do |t| - t.integer "user_id", :null => false - t.date "birthday" - t.string "brief_introduction" - t.integer "gender" - t.string "location" - t.string "occupation" - t.integer "work_experience" - t.integer "zip_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "identity" - t.string "technical_title" - t.string "student_id" - t.string "teacher_realname" - t.string "student_realname" - t.string "location_city" - t.integer "school_id" - t.string "description", :default => "" - end - - create_table "user_feedback_messages", :force => true do |t| - t.integer "user_id" - t.integer "journals_for_message_id" - t.string "journals_for_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_grades", :force => true do |t| - t.integer "user_id", :null => false - t.integer "project_id", :null => false - t.float "grade", :default => 0.0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" - add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" - add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" - - create_table "user_levels", :force => true do |t| - t.integer "user_id" - t.integer "level" - end - - create_table "user_preferences", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.text "others" - t.boolean "hide_mail", :default => false - t.string "time_zone" - end - - add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" - - create_table "user_score_details", :force => true do |t| - t.integer "current_user_id" - t.integer "target_user_id" - t.string "score_type" - t.string "score_action" - t.integer "user_id" - t.integer "old_score" - t.integer "new_score" - t.integer "current_user_level" - t.integer "target_user_level" - t.integer "score_changeable_obj_id" - t.string "score_changeable_obj_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_scores", :force => true do |t| - t.integer "user_id", :null => false - t.integer "collaboration" - t.integer "influence" - t.integer "skill" - t.integer "active" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "level" - t.integer "file" - t.integer "issue" - end - - create_table "user_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "grade", :default => 0.0 - end - - add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" - add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" - add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" - - create_table "users", :force => true do |t| - t.string "login", :default => "", :null => false - t.string "hashed_password", :limit => 40, :default => "", :null => false - t.string "firstname", :limit => 30, :default => "", :null => false - t.string "lastname", :default => "", :null => false - t.string "mail", :limit => 60, :default => "", :null => false - t.boolean "admin", :default => false, :null => false - t.integer "status", :default => 1, :null => false - t.datetime "last_login_on" - t.string "language", :limit => 5, :default => "" - t.integer "auth_source_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "type" - t.string "identity_url" - t.string "mail_notification", :default => "", :null => false - t.string "salt", :limit => 64 - 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 "versions", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :default => "", :null => false - t.string "description", :default => "" - t.date "effective_date" - t.datetime "created_on" - t.datetime "updated_on" - t.string "wiki_page_title" - t.string "status", :default => "open" - t.string "sharing", :default => "none", :null => false - end - - add_index "versions", ["project_id"], :name => "versions_project_id" - add_index "versions", ["sharing"], :name => "index_versions_on_sharing" - - create_table "visitors", :force => true do |t| - t.integer "user_id" - t.integer "master_id" - t.datetime "updated_on" - t.datetime "created_on" - end - - add_index "visitors", ["master_id"], :name => "index_visitors_master_id" - add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" - add_index "visitors", ["user_id"], :name => "index_visitors_user_id" - - create_table "watchers", :force => true do |t| - t.string "watchable_type", :default => "", :null => false - t.integer "watchable_id", :default => 0, :null => false - t.integer "user_id" - end - - add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" - add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" - add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" - - create_table "web_footer_companies", :force => true do |t| - t.string "name" - t.string "logo_size" - t.string "url" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "web_footer_oranizers", :force => true do |t| - t.string "name" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "wiki_content_versions", :force => true do |t| - t.integer "wiki_content_id", :null => false - t.integer "page_id", :null => false - t.integer "author_id" - t.binary "data", :limit => 2147483647 - t.string "compression", :limit => 6, :default => "" - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" - add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" - - create_table "wiki_contents", :force => true do |t| - t.integer "page_id", :null => false - t.integer "author_id" - t.text "text", :limit => 2147483647 - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" - add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" - - create_table "wiki_pages", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title", :null => false - t.datetime "created_on", :null => false - t.boolean "protected", :default => false, :null => false - t.integer "parent_id" - end - - add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" - add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" - add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" - - create_table "wiki_redirects", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title" - t.string "redirects_to" - t.datetime "created_on", :null => false - end - - add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" - add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" - - create_table "wikis", :force => true do |t| - t.integer "project_id", :null => false - t.string "start_page", :null => false - t.integer "status", :default => 1, :null => false - end - - add_index "wikis", ["project_id"], :name => "wikis_project_id" - - create_table "workflows", :force => true do |t| - t.integer "tracker_id", :default => 0, :null => false - t.integer "old_status_id", :default => 0, :null => false - t.integer "new_status_id", :default => 0, :null => false - t.integer "role_id", :default => 0, :null => false - t.boolean "assignee", :default => false, :null => false - t.boolean "author", :default => false, :null => false - t.string "type", :limit => 30 - t.string "field_name", :limit => 30 - t.string "rule", :limit => 30 - end - - add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" - add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" - add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" - add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" - - create_table "works_categories", :force => true do |t| - t.string "category" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "zip_packs", :force => true do |t| - t.integer "user_id" - t.integer "homework_id" - t.string "file_digest" - t.string "file_path" - t.integer "pack_times", :default => 1 - t.integer "pack_size", :default => 0 - t.text "file_digests" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - -end +# encoding: UTF-8 +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended to check this file into your version control system. + +ActiveRecord::Schema.define(:version => 20150907152238) do + + create_table "activities", :force => true do |t| + t.integer "act_id", :null => false + t.string "act_type", :null => false + t.integer "user_id", :null => false + t.integer "activity_container_id" + t.string "activity_container_type", :default => "" + t.datetime "created_at" + end + + add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" + add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" + add_index "activities", ["user_id"], :name => "index_activities_on_user_id" + + create_table "activity_notifies", :force => true do |t| + t.integer "activity_container_id" + t.string "activity_container_type" + t.integer "activity_id" + t.string "activity_type" + t.integer "notify_to" + t.datetime "created_on" + t.integer "is_read" + end + + add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" + add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" + add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" + + create_table "api_keys", :force => true do |t| + t.string "access_token" + t.datetime "expires_at" + t.integer "user_id" + t.boolean "active", :default => true + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" + add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" + + create_table "applied_projects", :force => true do |t| + t.integer "project_id", :null => false + t.integer "user_id", :null => false + end + + create_table "apply_project_masters", :force => true do |t| + t.integer "user_id" + t.string "apply_type" + t.integer "apply_id" + t.integer "status" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "attachments", :force => true do |t| + t.integer "container_id" + t.string "container_type", :limit => 30 + t.string "filename", :default => "", :null => false + t.string "disk_filename", :default => "", :null => false + t.integer "filesize", :default => 0, :null => false + t.string "content_type", :default => "" + t.string "digest", :limit => 40, :default => "", :null => false + t.integer "downloads", :default => 0, :null => false + t.integer "author_id", :default => 0, :null => false + t.datetime "created_on" + t.string "description" + t.string "disk_directory" + t.integer "attachtype", :default => 1 + t.integer "is_public", :default => 1 + t.integer "copy_from" + t.integer "quotes" + end + + add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" + add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" + add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" + + create_table "attachmentstypes", :force => true do |t| + t.integer "typeId", :null => false + t.string "typeName", :limit => 50 + end + + create_table "auth_sources", :force => true do |t| + t.string "type", :limit => 30, :default => "", :null => false + t.string "name", :limit => 60, :default => "", :null => false + t.string "host", :limit => 60 + t.integer "port" + t.string "account" + t.string "account_password", :default => "" + t.string "base_dn" + t.string "attr_login", :limit => 30 + t.string "attr_firstname", :limit => 30 + t.string "attr_lastname", :limit => 30 + t.string "attr_mail", :limit => 30 + t.boolean "onthefly_register", :default => false, :null => false + t.boolean "tls", :default => false, :null => false + t.string "filter" + t.integer "timeout" + end + + add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" + + create_table "biding_projects", :force => true do |t| + t.integer "project_id" + t.integer "bid_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 "bids", :force => true do |t| + t.string "name" + t.string "budget", :null => false + t.integer "author_id" + t.date "deadline" + t.text "description" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.integer "commit" + t.integer "reward_type" + t.integer "homework_type" + t.integer "parent_id" + t.string "password" + t.integer "is_evaluation" + t.integer "proportion", :default => 60 + t.integer "comment_status", :default => 0 + t.integer "evaluation_num", :default => 3 + t.integer "open_anonymous_evaluation", :default => 1 + end + + create_table "boards", :force => true do |t| + t.integer "project_id", :null => false + t.string "name", :default => "", :null => false + t.string "description" + t.integer "position", :default => 1 + t.integer "topics_count", :default => 0, :null => false + t.integer "messages_count", :default => 0, :null => false + t.integer "last_message_id" + t.integer "parent_id" + t.integer "course_id" + end + + add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" + add_index "boards", ["project_id"], :name => "boards_project_id" + + create_table "bug_to_osps", :force => true do |t| + t.integer "osp_id" + t.integer "relative_memo_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "changes", :force => true do |t| + t.integer "changeset_id", :null => false + t.string "action", :limit => 1, :default => "", :null => false + t.text "path", :null => false + t.text "from_path" + t.string "from_revision" + t.string "revision" + t.string "branch" + end + + add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" + + create_table "changeset_parents", :id => false, :force => true do |t| + t.integer "changeset_id", :null => false + t.integer "parent_id", :null => false + end + + add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" + add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" + + create_table "changesets", :force => true do |t| + t.integer "repository_id", :null => false + t.string "revision", :null => false + t.string "committer" + t.datetime "committed_on", :null => false + t.text "comments" + t.date "commit_date" + t.string "scmid" + t.integer "user_id" + end + + add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" + add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true + add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" + add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" + add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" + + create_table "changesets_issues", :id => false, :force => true do |t| + t.integer "changeset_id", :null => false + t.integer "issue_id", :null => false + end + + add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true + + create_table "code_review_assignments", :force => true do |t| + t.integer "issue_id" + t.integer "change_id" + t.integer "attachment_id" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.string "action_type" + t.integer "changeset_id" + end + + create_table "code_review_project_settings", :force => true do |t| + t.integer "project_id" + t.integer "tracker_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "updated_by" + t.boolean "hide_code_review_tab", :default => false + t.integer "auto_relation", :default => 1 + t.integer "assignment_tracker_id" + t.text "auto_assign" + t.integer "lock_version", :default => 0, :null => false + t.boolean "tracker_in_review_dialog", :default => false + 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| + t.integer "project_id" + t.integer "change_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "line" + t.integer "updated_by_id" + t.integer "lock_version", :default => 0, :null => false + t.integer "status_changed_from" + t.integer "status_changed_to" + t.integer "issue_id" + t.string "action_type" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.integer "attachment_id" + t.integer "file_count", :default => 0, :null => false + t.boolean "diff_all" + end + + create_table "comments", :force => true do |t| + t.string "commented_type", :limit => 30, :default => "", :null => false + t.integer "commented_id", :default => 0, :null => false + t.integer "author_id", :default => 0, :null => false + t.text "comments" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + add_index "comments", ["author_id"], :name => "index_comments_on_author_id" + add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" + + 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 "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.string "name" + t.string "budget", :default => "" + t.integer "author_id" + t.date "deadline" + t.string "description" + t.integer "commit" + t.string "password" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + create_table "course_activities", :force => true do |t| + t.integer "user_id" + t.integer "course_id" + t.integer "course_act_id" + t.string "course_act_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_attachments", :force => true do |t| + t.string "filename" + t.string "disk_filename" + t.integer "filesize" + t.string "content_type" + t.string "digest" + t.integer "downloads" + t.string "author_id" + t.string "integer" + t.string "description" + t.string "disk_directory" + t.integer "attachtype" + t.integer "is_public" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "container_id", :default => 0 + end + + create_table "course_groups", :force => true do |t| + t.string "name" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_infos", :force => true do |t| + t.integer "course_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_messages", :force => true do |t| + t.integer "user_id" + t.integer "course_id" + t.integer "course_message_id" + t.string "course_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "content" + t.integer "status" + end + + create_table "course_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "course_id" + t.float "grade", :default => 0.0 + t.integer "course_ac_para", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "courses", :force => true do |t| + t.integer "tea_id" + t.string "name" + t.integer "state" + t.string "code" + t.integer "time" + t.string "extra" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "location" + t.string "term" + t.string "string" + t.string "password" + t.string "setup_time" + t.string "endup_time" + t.string "class_period" + t.integer "school_id" + t.text "description" + 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 + end + + create_table "custom_fields", :force => true do |t| + t.string "type", :limit => 30, :default => "", :null => false + t.string "name", :limit => 30, :default => "", :null => false + t.string "field_format", :limit => 30, :default => "", :null => false + t.text "possible_values" + t.string "regexp", :default => "" + t.integer "min_length", :default => 0, :null => false + t.integer "max_length", :default => 0, :null => false + t.boolean "is_required", :default => false, :null => false + t.boolean "is_for_all", :default => false, :null => false + t.boolean "is_filter", :default => false, :null => false + t.integer "position", :default => 1 + t.boolean "searchable", :default => false + t.text "default_value" + t.boolean "editable", :default => true + t.boolean "visible", :default => true, :null => false + t.boolean "multiple", :default => false + end + + add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" + + create_table "custom_fields_projects", :id => false, :force => true do |t| + t.integer "custom_field_id", :default => 0, :null => false + t.integer "project_id", :default => 0, :null => false + end + + add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true + + create_table "custom_fields_trackers", :id => false, :force => true do |t| + t.integer "custom_field_id", :default => 0, :null => false + t.integer "tracker_id", :default => 0, :null => false + end + + add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true + + create_table "custom_values", :force => true do |t| + t.string "customized_type", :limit => 30, :default => "", :null => false + t.integer "customized_id", :default => 0, :null => false + t.integer "custom_field_id", :default => 0, :null => false + t.text "value" + end + + add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" + add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" + + create_table "delayed_jobs", :force => true do |t| + t.integer "priority", :default => 0, :null => false + t.integer "attempts", :default => 0, :null => false + t.text "handler", :null => false + t.text "last_error" + t.datetime "run_at" + t.datetime "locked_at" + t.datetime "failed_at" + t.string "locked_by" + t.string "queue" + t.datetime "created_at" + t.datetime "updated_at" + end + + 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| + t.integer "project_id", :default => 0, :null => false + t.integer "category_id", :default => 0, :null => false + t.string "title", :limit => 60, :default => "", :null => false + t.text "description" + t.datetime "created_on" + t.integer "user_id", :default => 0 + t.integer "is_public", :default => 1 + end + + add_index "documents", ["category_id"], :name => "index_documents_on_category_id" + add_index "documents", ["created_on"], :name => "index_documents_on_created_on" + add_index "documents", ["project_id"], :name => "documents_project_id" + + 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 "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" + t.datetime "updated_at" + t.integer "id", :null => false + end + + create_table "enabled_modules", :force => true do |t| + t.integer "project_id" + t.string "name", :null => false + t.integer "course_id" + end + + add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" + + create_table "enumerations", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "is_default", :default => false, :null => false + t.string "type" + t.boolean "active", :default => true, :null => false + t.integer "project_id" + t.integer "parent_id" + t.string "position_name", :limit => 30 + end + + 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 "first_pages", :force => true do |t| + t.string "web_title" + t.string "title" + t.text "description" + t.string "page_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sort_type" + t.integer "image_width", :default => 107 + t.integer "image_height", :default => 63 + t.integer "show_course", :default => 1 + t.integer "show_contest", :default => 1 + end + + create_table "forge_activities", :force => true do |t| + t.integer "user_id" + t.integer "project_id" + t.integer "forge_act_id" + t.string "forge_act_type" + t.integer "org_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" + + create_table "forge_messages", :force => true do |t| + t.integer "user_id" + t.integer "project_id" + t.integer "forge_message_id" + t.string "forge_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "forums", :force => true do |t| + t.string "name", :null => false + t.text "description" + t.integer "topic_count", :default => 0 + t.integer "memo_count", :default => 0 + t.integer "last_memo_id", :default => 0 + t.integer "creator_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sticky" + t.integer "locked" + end + + create_table "groups_users", :id => false, :force => true do |t| + t.integer "group_id", :null => false + t.integer "user_id", :null => false + end + + add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true + + create_table "homework_attaches", :force => true do |t| + t.integer "bid_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + t.string "name" + t.text "description" + t.integer "state" + t.integer "project_id", :default => 0 + t.float "score", :default => 0.0 + t.integer "is_teacher_score", :default => 0 + end + + add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" + + create_table "homework_commons", :force => true do |t| + t.string "name" + t.integer "user_id" + t.text "description" + t.date "publish_time" + t.date "end_time" + t.integer "homework_type", :default => 1 + t.string "late_penalty" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + 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.integer "evaluation_num" + t.integer "absence_penalty", :default => 1 + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "homework_detail_programings", :force => true do |t| + t.string "language" + t.text "standard_code", :limit => 2147483647 + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.float "ta_proportion", :default => 0.1 + t.integer "question_id" + end + + create_table "homework_evaluations", :force => true do |t| + t.string "user_id" + t.string "homework_attach_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "homework_for_courses", :force => true do |t| + t.integer "course_id" + t.integer "bid_id" + end + + 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_tests", :force => true do |t| + t.text "input" + t.text "output" + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "result" + t.text "error_msg" + end + + create_table "homework_users", :force => true do |t| + t.string "homework_attach_id" + t.string "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "invite_lists", :force => true do |t| + t.integer "project_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "issue_categories", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "name", :limit => 30, :default => "", :null => false + t.integer "assigned_to_id" + end + + add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" + add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" + + create_table "issue_relations", :force => true do |t| + t.integer "issue_from_id", :null => false + t.integer "issue_to_id", :null => false + t.string "relation_type", :default => "", :null => false + t.integer "delay" + end + + add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true + add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" + add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" + + create_table "issue_statuses", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.boolean "is_closed", :default => false, :null => false + t.boolean "is_default", :default => false, :null => false + t.integer "position", :default => 1 + t.integer "default_done_ratio" + end + + add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" + add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" + add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" + + create_table "issues", :force => true do |t| + t.integer "tracker_id", :null => false + t.integer "project_id", :null => false + t.string "subject", :default => "", :null => false + t.text "description" + t.date "due_date" + t.integer "category_id" + t.integer "status_id", :null => false + t.integer "assigned_to_id" + t.integer "priority_id", :null => false + t.integer "fixed_version_id" + t.integer "author_id", :null => false + t.integer "lock_version", :default => 0, :null => false + t.datetime "created_on" + t.datetime "updated_on" + t.date "start_date" + t.integer "done_ratio", :default => 0, :null => false + t.float "estimated_hours" + t.integer "parent_id" + t.integer "root_id" + t.integer "lft" + t.integer "rgt" + t.boolean "is_private", :default => false, :null => false + t.datetime "closed_on" + t.integer "project_issues_index" + end + + add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" + add_index "issues", ["author_id"], :name => "index_issues_on_author_id" + add_index "issues", ["category_id"], :name => "index_issues_on_category_id" + add_index "issues", ["created_on"], :name => "index_issues_on_created_on" + add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" + add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" + add_index "issues", ["project_id"], :name => "issues_project_id" + add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" + add_index "issues", ["status_id"], :name => "index_issues_on_status_id" + add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" + + create_table "join_in_competitions", :force => true do |t| + t.integer "user_id" + t.integer "competition_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "join_in_contests", :force => true do |t| + t.integer "user_id" + t.integer "bid_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "journal_details", :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", ["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" + t.integer "reply_id" + end + + add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" + add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" + add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" + + create_table "journals", :force => true do |t| + t.integer "journalized_id", :default => 0, :null => false + t.string "journalized_type", :limit => 30, :default => "", :null => false + t.integer "user_id", :default => 0, :null => false + t.text "notes" + t.datetime "created_on", :null => false + t.boolean "private_notes", :default => false, :null => false + end + + add_index "journals", ["created_on"], :name => "index_journals_on_created_on" + add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" + add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" + add_index "journals", ["user_id"], :name => "index_journals_on_user_id" + + create_table "journals_for_messages", :force => true do |t| + t.integer "jour_id" + t.string "jour_type" + t.integer "user_id" + t.text "notes" + t.integer "status" + t.integer "reply_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.string "m_parent_id" + t.boolean "is_readed" + t.integer "m_reply_count" + t.integer "m_reply_id" + t.integer "is_comprehensive_evaluation" + end + + create_table "kindeditor_assets", :force => true do |t| + t.string "asset" + t.integer "file_size" + t.string "file_type" + t.integer "owner_id" + t.string "asset_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "owner_type", :default => 0 + end + + create_table "member_roles", :force => true do |t| + t.integer "member_id", :null => false + t.integer "role_id", :null => false + t.integer "inherited_from" + end + + add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" + add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" + + create_table "members", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.integer "project_id", :default => 0 + t.datetime "created_on" + t.boolean "mail_notification", :default => false, :null => false + t.integer "course_id", :default => -1 + t.integer "course_group_id", :default => 0 + end + + add_index "members", ["project_id"], :name => "index_members_on_project_id" + add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true + add_index "members", ["user_id"], :name => "index_members_on_user_id" + + create_table "memo_messages", :force => true do |t| + t.integer "user_id" + t.integer "forum_id" + t.integer "memo_id" + t.string "memo_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "memos", :force => true do |t| + t.integer "forum_id", :null => false + t.integer "parent_id" + t.string "subject", :null => false + t.text "content", :null => false + t.integer "author_id", :null => false + t.integer "replies_count", :default => 0 + t.integer "last_reply_id" + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count", :default => 0 + end + + create_table "message_alls", :force => true do |t| + t.integer "user_id" + t.integer "message_id" + t.string "message_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "messages", :force => true do |t| + t.integer "board_id", :null => false + t.integer "parent_id" + t.string "subject", :default => "", :null => false + t.text "content" + t.integer "author_id" + t.integer "replies_count", :default => 0, :null => false + t.integer "last_reply_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.boolean "locked", :default => false + t.integer "sticky", :default => 0 + end + + add_index "messages", ["author_id"], :name => "index_messages_on_author_id" + add_index "messages", ["board_id"], :name => "messages_board_id" + add_index "messages", ["created_on"], :name => "index_messages_on_created_on" + add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" + add_index "messages", ["parent_id"], :name => "messages_parent_id" + + create_table "news", :force => true do |t| + t.integer "project_id" + t.string "title", :limit => 60, :default => "", :null => false + t.string "summary", :default => "" + t.text "description" + t.integer "author_id", :default => 0, :null => false + t.datetime "created_on" + t.integer "comments_count", :default => 0, :null => false + t.integer "course_id" + end + + add_index "news", ["author_id"], :name => "index_news_on_author_id" + add_index "news", ["created_on"], :name => "index_news_on_created_on" + add_index "news", ["project_id"], :name => "news_project_id" + + create_table "no_uses", :force => true do |t| + t.integer "user_id", :null => false + t.string "no_use_type" + t.integer "no_use_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "notificationcomments", :force => true do |t| + t.string "notificationcommented_type" + t.integer "notificationcommented_id" + t.integer "author_id" + t.text "notificationcomments" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "open_id_authentication_associations", :force => true do |t| + t.integer "issued" + t.integer "lifetime" + t.string "handle" + t.string "assoc_type" + t.binary "server_url" + t.binary "secret" + end + + create_table "open_id_authentication_nonces", :force => true do |t| + t.integer "timestamp", :null => false + t.string "server_url" + t.string "salt", :null => false + end + + create_table "open_source_projects", :force => true do |t| + t.string "name" + t.text "description" + t.integer "commit_count", :default => 0 + t.integer "code_line", :default => 0 + t.integer "users_count", :default => 0 + t.date "last_commit_time" + t.string "url" + t.date "date_collected" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "option_numbers", :force => true do |t| + t.integer "user_id" + t.integer "memo" + t.integer "messages_for_issues" + t.integer "issues_status" + t.integer "replay_for_message" + t.integer "replay_for_memo" + t.integer "follow" + t.integer "tread" + t.integer "praise_by_one" + t.integer "praise_by_two" + t.integer "praise_by_three" + t.integer "tread_by_one" + t.integer "tread_by_two" + t.integer "tread_by_three" + t.integer "changeset" + t.integer "document" + t.integer "attachment" + t.integer "issue_done_ratio" + t.integer "post_issue" + t.integer "score_type" + t.integer "total_score" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "project_id" + end + + create_table "organizations", :force => true do |t| + t.string "name" + t.string "logo_link" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "phone_app_versions", :force => true do |t| + t.string "version" + t.text "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_answers", :force => true do |t| + t.integer "poll_question_id" + t.text "answer_text" + t.integer "answer_position" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_questions", :force => true do |t| + t.string "question_title" + t.integer "question_type" + t.integer "is_necessary" + t.integer "poll_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "question_number" + end + + create_table "poll_users", :force => true do |t| + t.integer "user_id" + t.integer "poll_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_votes", :force => true do |t| + t.integer "user_id" + t.integer "poll_question_id" + t.integer "poll_answer_id" + t.text "vote_text" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "polls", :force => true do |t| + t.string "polls_name" + t.string "polls_type" + t.integer "polls_group_id" + t.integer "polls_status" + t.integer "user_id" + t.datetime "published_at" + t.datetime "closed_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.text "polls_description" + t.integer "show_result", :default => 1 + end + + create_table "praise_tread_caches", :force => true do |t| + t.integer "object_id", :null => false + t.string "object_type" + t.integer "praise_num" + t.integer "tread_num" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "praise_treads", :force => true do |t| + t.integer "user_id", :null => false + t.integer "praise_tread_object_id" + t.string "praise_tread_object_type" + t.integer "praise_or_tread" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "project_infos", :force => true do |t| + t.integer "project_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "project_scores", :force => true do |t| + t.string "project_id" + t.integer "score" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "issue_num", :default => 0 + t.integer "issue_journal_num", :default => 0 + t.integer "news_num", :default => 0 + t.integer "documents_num", :default => 0 + t.integer "changeset_num", :default => 0 + t.integer "board_message_num", :default => 0 + end + + create_table "project_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "project_id" + t.integer "project_type" + t.float "grade", :default => 0.0 + t.integer "course_ac_para", :default => 0 + end + + add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" + + create_table "projecting_softapplictions", :force => true do |t| + t.integer "user_id" + t.integer "softapplication_id" + t.integer "project_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "projects", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "description" + 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 "lft" + t.integer "rgt" + 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.integer "user_id" + t.integer "dts_test", :default => 0 + t.string "enterprise_name" + t.integer "organization_id" + t.integer "project_new_type" + end + + add_index "projects", ["lft"], :name => "index_projects_on_lft" + add_index "projects", ["rgt"], :name => "index_projects_on_rgt" + + create_table "projects_trackers", :id => false, :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.integer "tracker_id", :default => 0, :null => false + end + + add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true + add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" + + create_table "queries", :force => true do |t| + t.integer "project_id" + t.string "name", :default => "", :null => false + t.text "filters" + t.integer "user_id", :default => 0, :null => false + t.boolean "is_public", :default => false, :null => false + t.text "column_names" + t.text "sort_criteria" + t.string "group_by" + t.string "type" + end + + add_index "queries", ["project_id"], :name => "index_queries_on_project_id" + add_index "queries", ["user_id"], :name => "index_queries_on_user_id" + + create_table "relative_memo_to_open_source_projects", :force => true do |t| + t.integer "osp_id" + t.integer "relative_memo_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "relative_memos", :force => true do |t| + t.integer "osp_id" + t.integer "parent_id" + t.string "subject", :null => false + t.text "content", :limit => 16777215, :null => false + t.integer "author_id" + t.integer "replies_count", :default => 0 + t.integer "last_reply_id" + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.boolean "is_quote", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count_crawl", :default => 0 + t.integer "viewed_count_local", :default => 0 + t.string "url" + t.string "username" + t.string "userhomeurl" + t.date "date_collected" + t.string "topic_resource" + end + + create_table "repositories", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "url", :default => "", :null => false + t.string "login", :limit => 60, :default => "" + t.string "password", :default => "" + t.string "root_url", :default => "" + t.string "type" + t.string "path_encoding", :limit => 64 + t.string "log_encoding", :limit => 64 + t.text "extra_info" + t.string "identifier" + t.boolean "is_default", :default => false + t.boolean "hidden", :default => false + end + + 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| + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "assignable", :default => true + t.integer "builtin", :default => 0, :null => false + t.text "permissions" + t.string "issues_visibility", :limit => 30, :default => "default", :null => false + end + + create_table "schools", :force => true do |t| + t.string "name" + t.string "province" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "logo_link" + end + + create_table "seems_rateable_cached_ratings", :force => true do |t| + t.integer "cacheable_id", :limit => 8 + t.string "cacheable_type" + t.float "avg", :null => false + t.integer "cnt", :null => false + t.string "dimension" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "seems_rateable_rates", :force => true do |t| + t.integer "rater_id", :limit => 8 + t.integer "rateable_id" + t.string "rateable_type" + t.float "stars", :null => false + t.string "dimension" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "is_teacher_score", :default => 0 + end + + create_table "settings", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "value" + t.datetime "updated_on" + end + + add_index "settings", ["name"], :name => "index_settings_on_name" + + create_table "shares", :force => true do |t| + t.date "created_on" + t.string "url" + t.string "title" + t.integer "share_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "project_id" + t.integer "user_id" + t.string "description" + end + + create_table "softapplications", :force => true do |t| + t.string "name" + t.text "description" + t.integer "app_type_id" + t.string "app_type_name" + t.string "android_min_version_available" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "contest_id" + t.integer "softapplication_id" + t.integer "is_public" + t.string "application_developers" + t.string "deposit_project_url" + t.string "deposit_project" + t.integer "project_id" + end + + create_table "student_work_tests", :force => true do |t| + t.integer "student_work_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "status", :default => 9 + t.text "results" + t.text "src" + end + + create_table "student_works", :force => true do |t| + t.string "name" + t.text "description", :limit => 2147483647 + t.integer "homework_common_id" + t.integer "user_id" + t.float "final_score" + t.float "teacher_score" + t.float "student_score" + t.float "teaching_asistant_score" + t.integer "project_id", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "late_penalty", :default => 0 + t.integer "absence_penalty", :default => 0 + t.integer "system_score" + t.boolean "is_test", :default => false + end + + create_table "student_works_evaluation_distributions", :force => true do |t| + t.integer "student_work_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "student_works_scores", :force => true do |t| + t.integer "student_work_id" + t.integer "user_id" + t.integer "score" + t.text "comment" + t.integer "reviewer_role" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "students_for_courses", :force => true do |t| + t.integer "student_id" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" + add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" + + create_table "taggings", :force => true do |t| + t.integer "tag_id" + t.integer "taggable_id" + t.string "taggable_type" + t.integer "tagger_id" + t.string "tagger_type" + t.string "context", :limit => 128 + t.datetime "created_at" + end + + add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" + add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" + add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" + + create_table "tags", :force => true do |t| + t.string "name" + end + + create_table "teachers", :force => true do |t| + t.string "tea_name" + t.string "location" + t.integer "couurse_time" + t.integer "course_code" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "extra" + end + + create_table "time_entries", :force => true do |t| + t.integer "project_id", :null => false + t.integer "user_id", :null => false + t.integer "issue_id" + t.float "hours", :null => false + t.string "comments" + t.integer "activity_id", :null => false + t.date "spent_on", :null => false + t.integer "tyear", :null => false + t.integer "tmonth", :null => false + t.integer "tweek", :null => false + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" + add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" + add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" + add_index "time_entries", ["project_id"], :name => "time_entries_project_id" + add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" + + create_table "tokens", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.string "action", :limit => 30, :default => "", :null => false + t.string "value", :limit => 40, :default => "", :null => false + t.datetime "created_on", :null => false + end + + add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" + add_index "tokens", ["value"], :name => "tokens_value", :unique => true + + create_table "trackers", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.boolean "is_in_chlog", :default => false, :null => false + t.integer "position", :default => 1 + t.boolean "is_in_roadmap", :default => true, :null => false + t.integer "fields_bits", :default => 0 + end + + create_table "user_activities", :force => true do |t| + t.string "act_type" + t.integer "act_id" + t.string "container_type" + t.integer "container_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "user_id" + end + + create_table "user_extensions", :force => true do |t| + t.integer "user_id", :null => false + t.date "birthday" + t.string "brief_introduction" + t.integer "gender" + t.string "location" + t.string "occupation" + t.integer "work_experience" + t.integer "zip_code" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "technical_title" + t.integer "identity" + t.string "student_id" + t.string "teacher_realname" + t.string "student_realname" + t.string "location_city" + t.integer "school_id" + t.string "description", :default => "" + end + + create_table "user_feedback_messages", :force => true do |t| + t.integer "user_id" + t.integer "journals_for_message_id" + t.string "journals_for_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_grades", :force => true do |t| + t.integer "user_id", :null => false + t.integer "project_id", :null => false + t.float "grade", :default => 0.0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" + add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" + add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" + + create_table "user_levels", :force => true do |t| + t.integer "user_id" + t.integer "level" + end + + create_table "user_preferences", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.text "others" + t.boolean "hide_mail", :default => false + t.string "time_zone" + end + + add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" + + create_table "user_score_details", :force => true do |t| + t.integer "current_user_id" + t.integer "target_user_id" + t.string "score_type" + t.string "score_action" + t.integer "user_id" + t.integer "old_score" + t.integer "new_score" + t.integer "current_user_level" + t.integer "target_user_level" + t.integer "score_changeable_obj_id" + t.string "score_changeable_obj_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_scores", :force => true do |t| + t.integer "user_id", :null => false + t.integer "collaboration" + t.integer "influence" + t.integer "skill" + t.integer "active" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.float "grade", :default => 0.0 + end + + add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" + add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" + add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" + + create_table "users", :force => true do |t| + t.string "login", :default => "", :null => false + t.string "hashed_password", :limit => 40, :default => "", :null => false + t.string "firstname", :limit => 30, :default => "", :null => false + t.string "lastname", :default => "", :null => false + t.string "mail", :limit => 60, :default => "", :null => false + t.boolean "admin", :default => false, :null => false + t.integer "status", :default => 1, :null => false + t.datetime "last_login_on" + t.string "language", :limit => 5, :default => "" + t.integer "auth_source_id" + t.datetime "created_on" + t.datetime "updated_on" + t.string "type" + t.string "identity_url" + t.string "mail_notification", :default => "", :null => false + t.string "salt", :limit => 64 + 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 "versions", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "name", :default => "", :null => false + t.string "description", :default => "" + t.date "effective_date" + t.datetime "created_on" + t.datetime "updated_on" + t.string "wiki_page_title" + t.string "status", :default => "open" + t.string "sharing", :default => "none", :null => false + end + + add_index "versions", ["project_id"], :name => "versions_project_id" + add_index "versions", ["sharing"], :name => "index_versions_on_sharing" + + create_table "visitors", :force => true do |t| + t.integer "user_id" + t.integer "master_id" + t.datetime "updated_on" + t.datetime "created_on" + end + + add_index "visitors", ["master_id"], :name => "index_visitors_master_id" + add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" + add_index "visitors", ["user_id"], :name => "index_visitors_user_id" + + create_table "watchers", :force => true do |t| + t.string "watchable_type", :default => "", :null => false + t.integer "watchable_id", :default => 0, :null => false + t.integer "user_id" + end + + add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" + add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" + add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" + + create_table "web_footer_companies", :force => true do |t| + t.string "name" + t.string "logo_size" + t.string "url" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "web_footer_oranizers", :force => true do |t| + t.string "name" + t.text "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "wiki_content_versions", :force => true do |t| + t.integer "wiki_content_id", :null => false + t.integer "page_id", :null => false + t.integer "author_id" + t.binary "data", :limit => 2147483647 + t.string "compression", :limit => 6, :default => "" + t.string "comments", :default => "" + t.datetime "updated_on", :null => false + t.integer "version", :null => false + end + + add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" + add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" + + create_table "wiki_contents", :force => true do |t| + t.integer "page_id", :null => false + t.integer "author_id" + t.text "text", :limit => 2147483647 + t.string "comments", :default => "" + t.datetime "updated_on", :null => false + t.integer "version", :null => false + end + + add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" + add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" + + create_table "wiki_pages", :force => true do |t| + t.integer "wiki_id", :null => false + t.string "title", :null => false + t.datetime "created_on", :null => false + t.boolean "protected", :default => false, :null => false + t.integer "parent_id" + end + + add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" + add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" + add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" + + create_table "wiki_redirects", :force => true do |t| + t.integer "wiki_id", :null => false + t.string "title" + t.string "redirects_to" + t.datetime "created_on", :null => false + end + + add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" + add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" + + create_table "wikis", :force => true do |t| + t.integer "project_id", :null => false + t.string "start_page", :null => false + t.integer "status", :default => 1, :null => false + end + + add_index "wikis", ["project_id"], :name => "wikis_project_id" + + create_table "workflows", :force => true do |t| + t.integer "tracker_id", :default => 0, :null => false + t.integer "old_status_id", :default => 0, :null => false + t.integer "new_status_id", :default => 0, :null => false + t.integer "role_id", :default => 0, :null => false + t.boolean "assignee", :default => false, :null => false + t.boolean "author", :default => false, :null => false + t.string "type", :limit => 30 + t.string "field_name", :limit => 30 + t.string "rule", :limit => 30 + end + + add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" + add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" + add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" + add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" + + create_table "works_categories", :force => true do |t| + t.string "category" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "zip_packs", :force => true do |t| + t.integer "user_id" + t.integer "homework_id" + t.string "file_digest" + t.string "file_path" + t.integer "pack_times", :default => 1 + t.integer "pack_size", :default => 0 + t.text "file_digests" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + +end From d0c19124b731572e43dc3a5d007f6793b3e51cf0 Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 14 Sep 2015 17:29:00 +0800 Subject: [PATCH 02/58] =?UTF-8?q?=E5=B0=86=E8=AF=BE=E7=A8=8B=E7=9A=84?= =?UTF-8?q?=E2=80=9C=E7=A7=81=E6=9C=89=E2=80=9D=E6=A0=87=E5=BF=97=E6=94=B9?= =?UTF-8?q?=E6=88=90=E4=B8=8D=E5=8F=AF=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_courses.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index b59e97324..38bfbfe5c 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -87,12 +87,12 @@
<%= @course.name %> - <% if @course.is_public == 0%> + + <% if @course.is_public == 0%> <%= l(:field_is_private)%> - <% end %> - + <% end %>
From a999897efa701035eb1498fba21b1e44a08c2fc0 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 15 Sep 2015 09:22:18 +0800 Subject: [PATCH 03/58] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=E7=9A=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_message.html.erb | 2 +- app/views/users/_course_news.html.erb | 2 +- app/views/users/_project_issue.html.erb | 2 +- app/views/users/_project_message.html.erb | 2 +- public/stylesheets/new_user.css | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 1587cbfb1..114852a06 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -91,7 +91,7 @@ <% replies_all_i=replies_all_i+1 %>
  • - <%= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.author_id), :alt => "用户头像" %>
    diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index 857ae3697..54c1fd51d 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -62,7 +62,7 @@ <% replies_all_i = replies_all_i + 1 %>
  • - <%= link_to image_tag(url_to_avatar(comment.author), :width => "45", :height => "45"), user_path(comment.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.author_id), :alt => "用户头像" %>
    diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index e0e093f2d..cdc310604 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -100,7 +100,7 @@ <% replies_all_i=replies_all_i + 1 %>
  • - <%= link_to image_tag(url_to_avatar(reply.user), :width => "45", :height => "45"), user_path(reply.user_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.user_id), :alt => "用户头像" %>
    diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 2c0dfeec0..ac96ee562 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -77,7 +77,7 @@ <% replies_all_i=replies_all_i+1 %>
  • - <%= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.author_id), :alt => "用户头像" %>
    diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 0111ec212..51bd52547 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -587,8 +587,8 @@ a.postReplyCancel:hover {color:#ffffff;} .homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;} a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;} a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;} -.homepagePostReplyPortrait {float:left; width:45px;} -.homepagePostReplyDes {float:left; width:620px; margin-left:15px;} +.homepagePostReplyPortrait {float:left; width:33px;} +.homepagePostReplyDes {float:left; width:632px; margin-left:15px;} .homepagePostReplyPublisher {font-size:12px; color:#888888; margin-bottom:5px;} .homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;} .homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} From e10e5e8412be22d7f6378d83b9889e07735743af Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 15 Sep 2015 09:50:57 +0800 Subject: [PATCH 04/58] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/news/_course_show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb index f39eb8266..0baafd513 100644 --- a/app/views/news/_course_show.html.erb +++ b/app/views/news/_course_show.html.erb @@ -48,7 +48,7 @@ <% comments.each do |comment| %> <% next if comment.new_record? %>
    -
    <%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author)%>
    +
    <%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author), :class => "problem_pic fl"%>
    <%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %> From 1ae302621f88eb5dcc6084e433ec4611427a6da2 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 15 Sep 2015 10:31:59 +0800 Subject: [PATCH 05/58] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=9A=84=E6=A0=87=E7=AD=BE=E5=BA=93=E5=8F=AF=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/tags_controller.rb | 47 +++++++++++++++++++++++++++++ app/views/files/index.html.erb | 48 ++++++++++++++++++++++++++++++ app/views/tags/_tag_list.html.erb | 3 +- config/routes.rb | 1 + 4 files changed, 98 insertions(+), 1 deletion(-) diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 253faa2b1..e0cb8af8e 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -230,6 +230,53 @@ class TagsController < ApplicationController end end + #更新某个tag名称 + def update_tag_name + @tag_name = params[:tagName] + @rename_tag_name = params[:renameName] + @taggable_id = params[:taggableId] + @taggable_type = numbers_to_object_type(params[:taggableType]) + + + @rename_tag = (ActsAsTaggableOn::Tag.find_by_name(@rename_tag_name)) #查找重命名后的tag + @tag_id = (ActsAsTaggableOn::Tag.find_by_name(@tag_name)).id #重命名前的tag_id + @taggings = ActsAsTaggableOn::Tagging.find_by_tag_id_and_taggable_id_and_taggable_type(@tag_id,@taggable_id,@taggable_type) + @obj = get_object(@taggable_id,params[:taggableType]) + if(@rename_tag.nil?) #这次命名的是新的tag + + # 是否还有其他记录 引用了 tag_id + @tagging = ActsAsTaggableOn::Tagging.where("tag_id = #{@tag_id}") + # 如果taggings表中记录为 1 ,那么改变@tag_id对应的tag的名字 + if @tagging.count == 1 + @tag = ActsAsTaggableOn::Tag.find_by_id(@tag_id) + @tag.update_attributes({:name=>@rename_tag_name}) + else #如果tagging表中的记录大于1,那么就要新增tag记录 + + unless @obj.nil? + @obj.tag_list.add(@rename_tag_name.split(",")) + @obj.save + end + #删除原来的对应的taggings的记录 + unless @taggings.nil? + @taggings.delete + end + end + else #这是已有的tag + # 更改taggings记录里的tag_id + unless @taggings.nil? + @taggings.update_attributes({:tag_id=>@rename_tag.id}) + end + end + @obj_flag = params[:taggableType] + if @obj && @obj_flag == '6' && @obj.container.kind_of?(Course) + @course = @obj.container + @tag_list = @tag_list = get_course_tag_list @course + end + respond_to do |format| + format.js + end + end + def tag_save @select_tag_name = params[:tag_for_save][:tag_name] @tags = params[:tag_for_save][:name] diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index aefa1a5a9..fa15c1fc7 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -223,6 +223,54 @@ }); } + var tagNameHtml; //当前双击的链接的父节点的html + var tagName; //标签的值 + var parentCssBorder; //当前双击的链接的父节点 + var ele; //当前双击的链接 + var tagId; //标签的id + var taggableType; //被标签的类型 + function rename_tag(domEle,name,id,type){ + if(domEle.children().get(0) != undefined ){ //已经是编辑框的情况下不要动 + return; + } + tagNameHtml = domEle.parent().html() + tagName = name; + parentCssBorder = domEle.parent().css("border"); + ele = domEle; + tagId = id; + taggableType = type; + domEle.html(''); + domEle.parent().css("border","1px solid #ffffff"); + $("#renameTagName").focus(); + } + //监听所有的单击事件 + $(document.body).click(function(e){ + node = document.elementFromPoint(e.clientX, e.clientY); + if(node.tagName == "INPUT"){ //如果是输入框的聚焦,那么就不要进行下去了 + return; + } + if($("#renameTagName")[0] != undefined ){//存在renameTagName,则处于编辑状态 + if($("#renameTagName").val().trim() == tagName){ //如果值一样,则恢复原来的状态 + ele.parent().css("border",""); + ele.parent().html(tagNameHtml); + + }else{ //否则就要更新tag名称了 + if(confirm("是否将标签改为 "+ $("#renameTagName").val().trim())){ + $.post( + '<%= update_tag_name_path %>', + {"taggableId":tagId,"taggableType":taggableType,"tagName":tagName,"renameName":$("#renameTagName").val().trim()} +// function(data){ +// ele.parent().css("border",""); +// ele.parent().html(tagNameHtml); +// } + ) + }else{ + ele.parent().css("border",""); + ele.parent().html(tagNameHtml); + } + } + } + }); diff --git a/app/views/tags/_tag_list.html.erb b/app/views/tags/_tag_list.html.erb index b512f1ef3..49c9b2351 100644 --- a/app/views/tags/_tag_list.html.erb +++ b/app/views/tags/_tag_list.html.erb @@ -2,7 +2,8 @@ <% if @tags.size > 0 %> <% @tags.each do |tag| %> - <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %> + <%#= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %> + <%= tag %> <% case object_flag %> <% when '10' %> diff --git a/config/routes.rb b/config/routes.rb index 1df7b0d2f..1d2393764 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -884,6 +884,7 @@ RedmineApp::Application.routes.draw do match 'tags/remove_tag', :as=>"remove_tag" match 'tags/remove_tag_new', :as=>"remove_tag_new" match 'tags/tag_save', :as => "save_tag" + match 'tags/update_tag_name',:as => "update_tag_name" match 'words/add_brief_introdution' From 1b9bde2284d5bc3c00742a21e0d342ddfce186fe Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 15 Sep 2015 10:33:05 +0800 Subject: [PATCH 06/58] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=9A=84=E6=A0=87=E7=AD=BE=E5=BA=93=E5=8F=AF=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/tags/update_tag_name.js.erb | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app/views/tags/update_tag_name.js.erb diff --git a/app/views/tags/update_tag_name.js.erb b/app/views/tags/update_tag_name.js.erb new file mode 100644 index 000000000..b72b0c33f --- /dev/null +++ b/app/views/tags/update_tag_name.js.erb @@ -0,0 +1,40 @@ +//本js使用的新的tag显示方法 +<% if @obj_flag == '3'%> +$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +//$('#put-tag-form-issue').hide(); +$('#name-issue').val(""); +<% elsif @obj_flag == '1'%> +$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_user_new_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +$('#tags_name3').val(""); +<% elsif @obj_flag == '2'%> +$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +$('#tags_name2').val(""); +<% elsif @obj_flag == '6'%> +<%if @course%> +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list', + :locals => {:obj => @obj,:object_flag => @obj_flag,:select_tag_name => @select_tag_name}) %>'); +$("#files_tag").html("<%= escape_javascript(render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => @course,:tag_name => @select_tag_name}) %>"); +<%else%> +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +<%end%> + +$("#tags_name_<%=@obj.id%>").val(""); +$("#add_tag_<%=@obj.id%>").hide(); +<% elsif @obj_flag == '9'%> +$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/new_tag_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +$('#tags_name').val(""); +<% elsif @obj_flag == '10'%> +//$("#put-tag-form-<%#=@obj.class%>-<%#=@obj.id%>").hide(); +<% else%> +$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +$('#tags_name').val(""); +//$('#put-tag-form').hide(); +<% end %> \ No newline at end of file From 2fa01f32fb396c00afdf507b8b2427db5c46102a Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 15 Sep 2015 11:28:08 +0800 Subject: [PATCH 07/58] schema --- db/schema.rb | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 4dd7f1b68..3daf4743e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150911064528) do +ActiveRecord::Schema.define(:version => 20150911031029) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -497,26 +497,23 @@ ActiveRecord::Schema.define(:version => 20150911064528) do add_index "documents", ["created_on"], :name => "index_documents_on_created_on" add_index "documents", ["project_id"], :name => "documents_project_id" - 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 "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 + create_table "dts", :force => true do |t| + t.string "IPLineCode" t.string "Description" - t.text "PreConditions", :limit => 2147483647 - t.text "TraceInfo", :limit => 2147483647 - t.text "Code", :limit => 2147483647 + t.string "Num" + t.string "Variable" + t.string "TraceInfo" + t.string "Method" + t.string "File" + t.string "IPLine" + t.string "Review" + t.string "Category" + t.string "Defect" + t.string "PreConditions" + t.string "StartLine" t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "enabled_modules", :force => true do |t| @@ -781,6 +778,16 @@ ActiveRecord::Schema.define(:version => 20150911064528) 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" From fff9c44271434f98c0f06b1f76f4a4dac898f450 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 15 Sep 2015 15:16:49 +0800 Subject: [PATCH 08/58] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=92=8C=E9=A1=B9=E7=9B=AE=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=92=8C=E9=A1=B9=E7=9B=AE=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=9C=892=E6=9D=A1=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/new_base_user.html.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 8676c6fb1..7f8b4c69e 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -109,9 +109,9 @@ <% end%> <% end%>
    -
    + <% courses = @user.courses.visible.select("courses.*,(SELECT MAX(created_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5)%> +
      - <% courses = @user.courses.visible.select("courses.*,(SELECT MAX(created_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5)%> <%= render :partial => 'layouts/user_courses', :locals => {:courses => courses,:user => @user, :page => 0} %>
    @@ -122,9 +122,9 @@ <%=link_to "", new_project_path, :class => "homepageMenuSetting fr", :title => "新建项目"%> <% end%>
    -
    + <% projects = @user.projects.visible.select("projects.*,(SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)%> +
      - <% projects = @user.projects.visible.select("projects.*,(SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)%> <%= render :partial => 'layouts/user_projects', :locals => {:projects => projects,:user => @user, :page => 0} %>
    From f79b2cda948a2a3908cd37b468e440e683f2cce2 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 15 Sep 2015 15:18:33 +0800 Subject: [PATCH 09/58] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E5=85=B3=E8=81=94=E9=A1=B9=E7=9B=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/student_work_helper.rb | 9 ++++----- app/views/student_work/new.html.erb | 11 +++++++++++ .../users/_user_homework_attachment.html.erb | 6 +++--- app/views/users/_user_homework_list.html.erb | 3 +++ public/images/homepage_icon.png | Bin 11280 -> 12533 bytes public/javascripts/new_user.js | 6 ++++++ public/stylesheets/new_user.css | 10 +++++++++- 7 files changed, 36 insertions(+), 9 deletions(-) diff --git a/app/helpers/student_work_helper.rb b/app/helpers/student_work_helper.rb index bff997ba4..aa359e273 100644 --- a/app/helpers/student_work_helper.rb +++ b/app/helpers/student_work_helper.rb @@ -2,17 +2,16 @@ include UserScoreHelper module StudentWorkHelper + #获取当前用户的项目列表 def user_projects_option - cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" - memberships = User.current.memberships.all(:conditions => cond) - projects = memberships.map(&:project) + projects = User.current.projects.visible not_have_project = [] - not_have_project << Setting.please_chose + not_have_project << "没有可选项目,请直接为本作品创建一个项目" not_have_project << 0 type = [] type << not_have_project projects.each do |project| - if project != nil + if project option = [] option << project.name option << project.id diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb index 85c23f300..de9ede9ff 100644 --- a/app/views/student_work/new.html.erb +++ b/app/views/student_work/new.html.erb @@ -75,6 +75,17 @@ <%= render :partial => 'users/user_homework_attachment', :locals => {:container => @student_work, :has_program=>false} %>
    + +
    + +
    + <%= select_tag :project_id, options_for_select(user_projects_option, @student_work.project_id), {:class => "InputBox W680 fl"} %> + <%=link_to "", new_project_path, :class => "ml5 mt5 SetUpIcon fl", :title => "快速创建"%> +
    +
    +
    确定 diff --git a/app/views/users/_user_homework_attachment.html.erb b/app/views/users/_user_homework_attachment.html.erb index 0944ffab6..08927ab8f 100644 --- a/app/views/users/_user_homework_attachment.html.erb +++ b/app/views/users/_user_homework_attachment.html.erb @@ -48,10 +48,10 @@
    上传附件 - <%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mr15 mt3",:remote => true%> + <%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mt3",:remote => true%> <% if defined?(has_program) && has_program %> - 编程 - + 编程 + <% end %>
    diff --git a/app/views/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb index 642373d58..37afc3384 100644 --- a/app/views/users/_user_homework_list.html.erb +++ b/app/views/users/_user_homework_list.html.erb @@ -47,6 +47,9 @@
  • <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
  • +
  • + <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %> +
  • diff --git a/public/images/homepage_icon.png b/public/images/homepage_icon.png index 127f12e926bffaf04424e48ff87b71e68f7407a6..a6f3223b6d26e4d4e5f428fd52e40d28b54c3d23 100644 GIT binary patch delta 9571 zcmaiacT`i&*KP`g-aAr6dJ_bcAQ2FycM+w7B28*2N<=vDDhfyuA}xfVR0X9ssZl^g zItWOQw1`L-2>l-4U%lVDcYXhywdR~XvuDrj+536+oafftx1Mt|z$9o95D4T{S~aX( z1Wyl0oH4k1`FhCsudL8?%Z2x~Yt*9jR#YtQSC*lcy57SE=LrtR@1)qM4%;pt-HA=% ze^WgS3%%UVF=8lFH9m5CvU>1?PjFdw#M4*WDK_IH>?;wgGOeaiw%69OoGjjK_A|oE zJ;t=1#>t%m>4&S!I9Y5kf5=GvR^wX3jp>d}0L3D5HT<_Z?c?W2ZG8a|u>@9jJ=z%2 zKg}vl*FEpXrh19JWhrNVbEr2pH>?)Amgha)=N-uA&sxTwPK{#eZz!-G=+nM(~?wk1BXTOC}hGbrTetu?Xb5adO znWQshV?vGvtbW z8Kp?s*xxLnR$~Pp;6nO|eu}*IFE+!upKGwL8wb?c22KAFX^|P!^iJqS>oR+Kc<3K} zMb$-T=j3ZWbpW+&v6_#50>1if{bId88VO~fn2ygXz)r^c``4qu$$YSxyfLmdn$&&#O6#fW$c>nQM6Vy0YE!Nd1pyj&d7c>`C}o{#sD8Pdvv$Cvq(dibLNB%odXn1(fxN=4_oDtDm(k}-t4g;<=|X_kDf z<%(htQQ|bZBR49PNOd9VcFbJlRTR5<`;zaOUfm%vby&;kK7RvjnhGY(D-D%pcCIK) z5ZdTGzej)E*my>DQ+kxSXJI^8;jNba=p}fIIWaLpp0XX?oDv||SLG9GrN;;`TN9Ir zcMY(@8~Uf$0#-KkwFWuQn$TL)+SC5>vejpSdTkWzGSUzN9qya!MT^q=6)iZFT;eo( zZ6A7T5dXw!aXp*ZPRydT_ZIm~G!NFSbP_R?sMiIC_!5&(f5syw=)t%^>GC|a;X61c ziDF}AlPX!C3168|kBJ>%nW)hD>RVddQlmGv+&&b=?on+Y3ZAujv7QXdF7M0-h3WHC zzdb*V)g09=*EiXZHgyC~-EvDiQfjlG4MH>1wX@5NI-)#HX}BSNe4f6l8E$WVCKBsQ zCTM`R0Hyw+;HeK3>H%(je2Kc^b8u{_REoA#>Sx;$2UXp`WWeoo_)%YVfx$z`@DF5k zjn639lP84twUXxYy58_e(v>5Dn4$Ocpv^*bpcTH8k2M1>aM$tiGCiECS?RDJ6?DEW zjOayNfCA@|nJRrkv)Y!%ZOA@{rOxwT!eVWEADakQbU);s@|w8Uv|RrbY6iW0Xi-I= znEgKC;&lZkb~FRj>e`kjp?@`YRX@E=m*UkI503!g!tiVe&-;>4u631T>|u(8=rFt# zcG6L^azF4AC~v=c_K#CsFS(?81KMhWKu0|1qy3S1Qhj{1A$)(IL-AA1%I>CGogv@7 z@R23DUmS^4$D@s!pQ@@qD2yK8L9tV$IF0bEKqA$&d0T*x00p5q`a5{F^(1+L9LYuL zLufqGl>EdyQ8UxGOJOhc`jS`5Rpo#W+c2s$Q?vbGTZR%wdM^BBYv9+0Gz>R?-hd9A8J# zzyQQq*s;Po?&H~=d*chmLjxYaIS*rYu4THG!nqRWUVAr~3rjvyk^J5lmoC$TAh8>W zikZ53Hpgkcnf?GsKbt|w2zFSE-TO17@@M@(51fhDw2L=3d7v_v^=#E^&&%&7 zG={J_38<+)Jo3x#u9}%`f5!FI_q1t+?%`-eDKa6qVg-0-zDo)wZ<6Uswl}vjCi+ih z^LKtK)E#k{;^{q15p3Rx|JB%!s4r-F{m zKGrs>8O&D6^g16Fd3EH!8)x?J?XOjUPt%-LP*6Cr(_?0iw#T^#77ERX^}JkO^E2U( z_%l#r>9jJnzIE~1N%+*G(X3+qnlC4_H*w)?K+CM{CfVvx+u_tu_y~M$097}9D@-7X z0U)gFwajVGF0IS^O*5G9W_ot4zt0_c+F?97_a?Spa`889Vg|*AQczDFY^ldsenBHl zwA9oQ68VU$n|q07lIb@r0Ari~)U#;YQn>Kh_jgYICEK@C7{nSa;upT3hDcxWY*c#eWS<`$kd3QLp;IUtko%wDXUTEawrtWD{mYtWKUi^sj z<(-1@zzFJJ-7d9CL|Fxe7A=$NlD5VD0h2L_3f zZ}ys0r%`UR?$b%41cY;Ij-Sj+`2bFT4M0&YF?*{g91KxysVVNz{*(EXhHa2+tk{8b+H>zzntUJK?;Dn$Hu|tF@Q;3X99lW_C>$-$+q-0pWM* zh=@MHYFlu$c=p1Eau=_bg68hr`@+|Eho0%WO;oKG^2EOlU9Wc=(0I7aORXq5Qo9?@ zUYJXneeDDu zc)R=V#8YtLQczFYl91w(rdX{Wr*oe*UOVrrEOm*4ifz!i%sXjL zAD{XO_JJ-{?y@WbhKcB-L`SaX<8sN$6;U*Zl0pURp)!x#fd2$$kb!`4ItT8tTWb3B zc1++pxpq80M9f+GP$S3U4yDvuAf?cke5cVnf8%3tt4gLtENQwT|+^mRXd&)EosV(GX{t^69tVF;yIu z292>rT~wQ=8>cx>BGrvMd;->VD26zTI_0_gRil#S2a9^xH)+vGC#oCO6(+e$2hrX5 ztjz;8dOgqREunXPo5wm@N2f&4*Q^0XMwWK=r|x_xBqJ~M(D6GrdtpXH51JbUT%v<{ zYOoe=7nYzk-5}9eC9;-OY8`FJWTQj06R_c-><>}AAVh~M_IDQ)__iYUt;Xkl$-yo3 z{21p9a=(A#Ry;d7kuSV2IOE3|kHKJ(7ypH3|0DD-zW9$mL6?6IFEQtomv1m=T~bu^ z8Gc6GTUc07=ge=SxgjMn@%g(sAg`d1{U%yw4tPONt~$*`X|D@- zm8d<|(>CVlpv>CxLXWrQ%!J#P!T#Lz`C%{4yRQny34?jP^Y0r51=43 zsJm~nz4(=@$*TxZ^(ifR&r1<@=3nn&kK0(%dKuke^rK?sVJuphtW8=9^1L=b#)$H% zk<}UD-V0d{8oS4WW=347ssK}YKYRSf{u$vld54;*D|jX%-8=6<*!sPgPazIGnuH%> z=tVe>Z)wS!&q^WYw{V_Y;t5I#px1Dh(Y>Ak?Nl+r0k0@rg{siq*KZ`y^$hLxiCf}_ zhTe}%+$n2BG_jnRNooCBY;=woA0MyBwRc;yzOnIP)7hye%{k}QzUz>=cop&-OQvHy zaN-tB*AXJR?wOQOJtSZjM1!umIeHzYZ2W2LE_Vxq0895bM~6V&H;6iLgqv&%J4}lq zIaq06r1CBov3hYgtb191i;k|0Kji)6xkhGW0Ryv2bnmaZJlE{+6jfB;3b>%j+Hzm7 zb7)tYePYw*`?t6J-;VI_I>LW*p#QJeC<3nSC~K)yUaD^Dzlh;(8}~?D&e|w;>vzw= zV?CAsp2nIQpK*ps%a3I5oHC{x-9*Ugp7(s5j<1&!qO*2$*cVRcN~9`yal7o)sZ-CC zeC}c}@AHlBEBF=t%~%XDzm%jojZgw0)RY=XH={YeMrtmEYkqZ|xU`RCf$aegVYbB5 zh)P41McFT1U1{9uy8xCb zL<0oHA-8%GS=lA^7NIxOvoZ9QKRiBu_je6loe-Ku(Z(g}!5U_hh-aNqtV3@&1-pH| z`-k`-1%$GnD$ccjU$-UIByf{8NcCWtwh4&b3p=xJnPoH(Y0o4F7rFqms(EoMPLU-u zti*SPq$5i>6)PUj35Nat5ue9W0oWB@RqW+Yr=(Y37Z=;54vIA}y{1~k1uqAvl@ysi zyY_QSOx(te`({Dc3t4u(7e!i}XX3#8#PkF4`d{_||FAFTl=(<%mcyt#O$qfA2$$Oi z{Y#;c{+botDC;0Sdcxb*;HfpZCe;J?u{-LDAal!>>du*OM?2K=l(F(6ei5@b@10wZ z8Jo9sj_bVI)Lm~;@X4ai0sZWJ`>w+W1Vi9w}?~p)lxP9 z8sye&l!Q)|TN5=m)2)^VYpZ=ixsHuv)FakF{`S{LdBgK__VC{-f+wSvVm4`>E)z8z z1=6EKzhti(#42|;Y7ktH?D$eI5o$_V#U*>o7lSdW+Zjq`0TZHJz7}5|!N(}~Qx}@L zz09K2y=FGtbY6u%tDJ5mB;T5fl{*0N={2R_9B}hTiUaZOHr|dMZoIUwt9%-iS~WU- z(xfIs^#kFGvOZ%=vBtX`2BZj+^|`c#7X0;iIaJsdb}2{bQ+G`Q#%d}?^|MD0q6O~jf%D~=x&R9 z_~00`@!%B#^#=Q~s1bW%=5O>h>U}y^s_>7iqIYGxD_-WYeL-d{cv4A7$ElTzFYGo~ zJ#<(`yrLTiq3veFTtBG)q2xBX z*6x%t;BltZ#@Bw7X|4|%7D52rm5-@7`=sV`IF(IB1|f{ZY+0M=WKQz>g+qC(I~@6A z*Nu`dUJgkxL78};7E8Fw%3i3?Cn;@dwEWoolf?ygcD*os@5`vVNzj=DW1sIM&uIGI zci`z93hum*+!ywt*sV!Tjwy$1cF5HaeGV)Ja)vIoWthK&oQm|~T*d3ubEQKkMKJZ3 zEqiKK+|Q|A9>RGk`%DlD{JE_N6ZWI+pC9>5D08MXsm|S*)k`ionuo3`ZcgSz|5|ti zmp<&T@yY5xgLPeZeFCDPCVM>JB8LSh=H+RZ#3Wye`P((NKzu{5xJdF z>+&R85;frL2Bx8W{RJ}>e)-ny%3Jw!$i&*RDQnUl(v1%EJ#IW&u8ST+sO{fsWQYul zR3nft-LV<5b#5kOTIIVQF!SaO4M})v6SZGT_fm8kM_^l#--&^*thLc+<06SFq;e0H zi|3xHa71==--AyKURUqgYP{H0aZG0)r`h_23V6w1$DZzOGlC(Iw=3nmih4~x4B`=A zp`mSRLUi_giBuABGV}=2{vIOGVZ(H_XTqtV%VqjRX>Y{a={d3xXGUZq`gc_nWE8Zf zq`LMPjjaZg(g@_J;0N@{ZnelvvxW^~%7#8TI}i>A2j1o)e_Y7G84wr;=YM~HVF2Kj z<-2TSHHTO9`?d-)HF}UF^h+Lp7R7EA@(%po&#&|HJsDb-_{gOKGv%`&3>AtMe*os( zQ0?+I#mZ;1_75>avR84&vv_7X$aICAmzaOU9+dzCivITo%8x+CU?T|xG83ZY!a?+8 zzGrM@Qo-Ld88DX{ph>4O1`rRP+@@=PA2!ct7p<~1%UC71OxIO0@_=yv4HWjtC~H!WRLx+^Dkt_3JxI%LdAA^Cw6u1q!57Lpw;Ed@Uh-Z1fSYO2=lD1@SV2q# z%_=~`-Qk%LExesi+C`!5??X0?;mj9Gt90;XWDE<$HPtnqW|jJ9WNSnr=oUDz$VOa? zY=Px^*!AGAi7}!g02UvVzaNVI^&hzZ&qCbPEQm`u$+KNs;ja!ZOhL9$YY@^5v4cPk zyA9Zk=xBZ1YCHwbwmyjry@ir)$0)VHLjALcNH_O3F+8sd``w}$#wnoGhI9;kmaEugGo}M2EY3%MZ+I= zYyH{90;Cb{?AZiYn-)Z~o5o%^0=N$0fw+edb}?NQju6Kkl%Lpf&qWJf@H=;`_)fI) zI!2jwT}e^tkG{~$pD>IRu60Wix~l?_A<-J-Tu#PpQ*u4mWW9ZE*COXMOTKct4_z&e z)q}+b@<;@0e>96YCD&z3Z4B;PI@|JO?=kp`3* zSQtb4sYI&T*zRfhULi@Yegk>?WCEpff)RQH)&e0=%UE8>3OTQv8rEab!~yuu`OWohZ97CYIlIjP!4Cu!8LSBsOcB)G^z8tl-QcJa-gd!`04*z=j$mx?_N%8*XXtdTNy@e7M(&%s~q0|q{T>3JK} zO=i#$nmB86jIaU&hTIten<<5QcBV4n3$P@+n)iIxsbt^t#82jO=vQZ~gFKs8ki829 z2T8Rk12nzHn*opOlIK;ATLG28tp(OYdY_!S!EUHxDW+@aiez=`x8WyYEH^3RU=7T8 zP^|NG-%IFT?IL7Ga&aD^5?|(z%&6~sU zcM8U0H4AN7>)IM`;1+5#SFVPODT77UT~Kura-}1e_%p~8jHVct5Gb%3=SqB}WhV|WCapnRS`{;Yw7cn3OF=Gw}A`iSrW zkD!ZyV&89f4fqbc7pyP+iq*|M*MXibI2bH8N84hx2j{1++uc?&vefKQ=}DG5w;fX? z(2-FZ&6RZ&c|USViwdY2S0ag$w6IAJAd;lMZ&jjc1-6OY6`jxJ4j2tQdt*jy?&91! z-zv=nX`eHx@)&<$VLt-Ph73h)t<%)r%Pw<4UQZASavPPq7M?V@daP#qbgy!9Jn17s5H<%r6#2I2xF8#jCa>)?O$Ks_PQ z*^#fXsOYZ9akP!5@_0W4<>{D~v9LSKqxaxjp8CMWLQ*3B-7Ac>EgUA;buz1|;|zSC zX~9g3J$ZoLIC+i2JbdVrNKpK~2rQ%i~%flsbpbbc!sUm;TsTbSgVkfx2hj z#?CHteAGbjId z`%s5+k8^2*#ONxU(%(1i|4(KdBwi8z?lgGcmer{&MCV~EWifc?;k*Q=QI!f-Qdg*F zURuo5w!kJLBk;5k-Pgjm6F$9AS0NEJZUOL6%*a==!l__Vp|Z0{TIM3%i9@$z;)dx{ z^VLVK)RPKrqdwG|-y$^XGN`|=1B@xvSCAShBo zbjH24iGd9m2WK&ZG`Gv+_j0&IJP3;y)S$P1zNj^_9CBXWsU3F`8x`ld1JL7@5=x(S6jdk7=Q zA!k5brD-hu8i5>s7~uoP`_|1KWO`<1t|bDhJA{(%@ECFwh}UFVtuU8+<>_C^P&r>^ z{n5y?gh^!$%f*>cnL%UOjbtV z>L9SjU+B3Dxn#z|B>M7Db8|^xgf$kyxD2WE5EW9=x-V=6&s9$GMQCR1%aKe-ffP}n zlaInyp)(==05W|0FF^{n5_{kB-T7`0J8@j6vasm~VKvL@zY-R>aC$u@@aYc8a5|##Otz9hiA!{7|lXk z5_EI3Z%XOBVPT$x{O+0K4U0U*WoYqpHcpO&6y-FuFucQW1*mIOn_*4&1BS@be`MY9 z+TUK8$6o707Dr%*bo(mei^K<1^m68vdvjn3TXEXbh7Ncq(#&LciVwwA^Rbiz8q5nk z6p0>XfttrpPks{{=<}t-Z6D0LF&@YF!z+FrK>e!;{H*NmW|(9ajANYUd?Vc2XJ2J^ zNyJP9jd;xJ!!N*!eJ!K{WEnh*$_JeUe9k6CEDErS8;q#YfGja^a)H$`s* z0?n?s6S-wC=Gnw&IzUgs@TAg%SI%kumxKj;xJO>S&eD_g* zzG}>I{zY#TllMQ-`P~}YFBs)71z;_2NnbjDTCA6_ zS!Hc)$bz8<$(6?tDdKhDyX S2>we2G0-u+TB7az*Z%?8)&c$i delta 8263 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 diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index eb50c2762..9e5a858f6 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -180,6 +180,12 @@ function regexStudentWorkDescription() } } +//学生作品 +function show_project() +{ + $("#about_project").slideToggle(); +} + //textarea自适应高度 纯js写的 有浏览器判断 /** * 文本框根据输入内容自适应高度 diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 51bd52547..128890d4b 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -890,7 +890,7 @@ a.FilesBtn{ background: url(../images/homepage_icon.png) 0px -373px no-repeat; a:hover.FilesBtn{background: url(../images/homepage_icon.png) -89px -372px no-repeat; color:#3598db;} a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} a:hover.BlueCirBtnMini{ background:#3598db; color:#fff;} -a.ProBtn{background: url(../images/homepage_icon.png) -86px -396px no-repeat; width:35px; height:20px; display:block; padding-left:20px; color:#888888;} +a.ProBtn{background: url(../images/homepage_icon.png) -86px -396px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} a:hover.ProBtn{background: url(../images/homepage_icon.png) -86px -426px no-repeat; color:#3598db;} a.DropBtn{background: url(../images/homepage_icon.png) -125px -339px no-repeat; width:85px; height:20px; display:block; color:#888888; font-size:14px;} @@ -1116,3 +1116,11 @@ a:hover.tijiao{ background:#0f99a9;} #cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;} #cboxNext{position:absolute; bottom:0px; left:63px; color:#444;} #cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;} + +/*20150906关联项目LB*/ +a.RalationIcon{ background: url(../images/homepage_icon.png) -183px -396px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} +a:hover.RalationIcon{background: url(../images/homepage_icon.png) -183px -428px no-repeat; color:#3598db;} +a.SetUpIcon{background: url(../images/homepage_icon.png) 0px -453px no-repeat; width:20px; height:20px; display:block; color:#888888;} +a:hover.SetUpIcon{background: url(../images/homepage_icon.png) 0px -486px no-repeat; color:#3598db;} +.W680{ width:680px;} +.W710{ width:708px;} From 069c1ddf3c1040f17cf022994bed89dc5fa34c5c Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 15 Sep 2015 15:45:16 +0800 Subject: [PATCH 10/58] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E8=AF=84=E8=AE=BA=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/news/_course_show.html.erb | 5 +- app/views/users/_course_news_reply.html.erb | 177 ------------- app/views/users/show_chen.erb | 279 -------------------- public/javascripts/course.js | 19 +- 4 files changed, 20 insertions(+), 460 deletions(-) delete mode 100644 app/views/users/_course_news_reply.html.erb delete mode 100644 app/views/users/show_chen.erb diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb index 0baafd513..9ae951779 100644 --- a/app/views/news/_course_show.html.erb +++ b/app/views/news/_course_show.html.erb @@ -32,7 +32,8 @@ <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> <%= kindeditor_tag :comment, '',:height=>'100',:editor_id =>'comment_editor', :placeholder=>"最多250个字"%>
    -

    +

    +

    <%= l(:label_cancel_with_space) %> @@ -76,4 +77,4 @@ <% end %> -<% html_title @news.title -%> +<% html_title @news.title -%> \ No newline at end of file diff --git a/app/views/users/_course_news_reply.html.erb b/app/views/users/_course_news_reply.html.erb deleted file mode 100644 index c3f8571be..000000000 --- a/app/views/users/_course_news_reply.html.erb +++ /dev/null @@ -1,177 +0,0 @@ - -<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> - -<% if @news.commentable? %> -

    -

    <%= l(:label_comment_add) %>

    - <%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form") do %> -
    - <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> - <%= kindeditor_tag :comment, '',:height=>'100',:editor_id =>'comment_editor', :placeholder=>"最多250个字"%> -
    -

    - - <%= l(:label_cancel_with_space) %> - - - <%= l(:label_comment_with_space) %> - -

    - <% end %> -
    -<% end %> - -
    - - <%= form_for('new_form', :method => :post, - :url => {:controller => 'words', :action => 'leave_course_message'},:html => {:id=>'leave_message_form'}) do |f|%> - <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> - -

    - <% end %> -
    -
    -
    - 取  消 - - 发送 - -
    -
    - -
    - - - - - diff --git a/app/views/users/show_chen.erb b/app/views/users/show_chen.erb deleted file mode 100644 index 3bd0014c6..000000000 --- a/app/views/users/show_chen.erb +++ /dev/null @@ -1,279 +0,0 @@ -
    -
    -
    最新动态
    - -
    - -
    -
    - 用户头像
    -
    - - -
    - -
    截止时间:2015-08-20
    -
    -
    (作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
    - -
    -
    -
    -
    -
    -
    -
    - 用户头像
    -
    - - -
    - -
    截止时间:2015-08-20
    -
    -
    (作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
    - -
    -
    -
    -
    - - - -
    -
    -
    - 用户头像
    -
    - - -
    - 时间:2015-07-31 -
    -
    - -
    -
    -
    -
    -
    -
    -
    回复(5)
    -
    2015-07-31
    - -
    -
    - -
    -
    - - - -
    -
    -
    -
    - 用户头像 -
    -
    -
    黄井泉 学生 - 2015-08-01删除 -
    -
    很开心!
    -
    -
    -
    -
    -
    - 用户头像 -
    -
    -
    陈正东 学生 - 2015-08-02删除 -
    -
    假期好热,没出去。
    -
    -
    -
    -
    -
    -
    -
    -
    - 用户头像
    -
    - - -
    -
    指派给  苏稳 -
    -
    时间:2015-08-20
    -
    -
    (缺陷描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
    -
    - 文件附件.zip(123KB) -
    -
    - 图片附件.png(123KB) -
    -
    - -
    -
    -
    -
    -
    -
    -
    回复(5)
    -
    2015-07-26
    - -
    -
    - -
    -
    - - - -
    -
    -
    -
    - 用户头像 -
    -
    -
    尹教授 - 2015-08-01删除 -
    -
    请大家说下软件工程是什么!
    -
    -
    -
    -
    -
    - 用户头像 -
    -
    -
    Tang 学生 - 2015-08-01删除 -
    -
    软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/public/javascripts/course.js b/public/javascripts/course.js index e5c50ac51..fc52ef87a 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -260,8 +260,23 @@ function submitFocus(obj) function submitComment() { - comment_editor.sync(); - $("#add_comment_form").submit(); + if (newsReplyVerify()) { + comment_editor.sync(); + $("#add_comment_form").submit(); + } +} + +function newsReplyVerify() { + var content = comment_editor.html(); + if(content.length == 0) { + $("#add_reply_news").text("评论不能为空"); + $("#add_reply_news").css('color', '#ff0000'); + return false; + } else { + $("#add_reply_news").text("填写正确"); + $("#add_reply_news").css('color', '#008000'); + return true; + } } /////////////////////////////////////////////////课程讨论区 From cd96fd99a8f95fafa2b47a20598b2b0386d58fd8 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 15 Sep 2015 16:11:55 +0800 Subject: [PATCH 11/58] =?UTF-8?q?=E5=BF=AB=E9=80=9F=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 1 + app/helpers/projects_helper.rb | 1 + app/views/projects/create.js.erb | 3 ++ app/views/student_work/_new_project.html.erb | 31 +++++++++++++ app/views/student_work/new.html.erb | 16 +++++-- public/javascripts/new_user.js | 46 +++++++++++++++++++- public/stylesheets/new_user.css | 2 +- 7 files changed, 95 insertions(+), 5 deletions(-) create mode 100644 app/views/projects/create.js.erb create mode 100644 app/views/student_work/_new_project.html.erb diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index ae80f8fcb..a58906c67 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -216,6 +216,7 @@ class ProjectsController < ApplicationController end } format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'projects', :action => 'show', :id => @project.id) } + format.js end else respond_to do |format| diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 12925b0b1..c25035fdb 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -18,6 +18,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. include AvatarHelper +include StudentWorkHelper module ProjectsHelper def link_to_version(version, options = {}) return '' unless version && version.is_a?(Version) diff --git a/app/views/projects/create.js.erb b/app/views/projects/create.js.erb new file mode 100644 index 000000000..9bb447789 --- /dev/null +++ b/app/views/projects/create.js.erb @@ -0,0 +1,3 @@ +$("#project_id").replaceWith("<%= escape_javascript(select_tag :project_id, options_for_select(user_projects_option), {:class => "InputBox W680 fl"})%>"); +hideModal("#popbox02"); +alert("创建成功"); \ No newline at end of file diff --git a/app/views/student_work/_new_project.html.erb b/app/views/student_work/_new_project.html.erb new file mode 100644 index 000000000..3d9214c7d --- /dev/null +++ b/app/views/student_work/_new_project.html.erb @@ -0,0 +1,31 @@ +
    + <%= labelled_form_for(Project.new,:remote => "true") do |f| %> +

    新建项目

    +
    +
    +
    + + +

    +
    +
    + +

    + +
    + +
    + +
    + + 确定 + + 取消 +
    +
    + <% end%> +
    +
    diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb index de9ede9ff..c755014d1 100644 --- a/app/views/student_work/new.html.erb +++ b/app/views/student_work/new.html.erb @@ -9,12 +9,21 @@ ""); $('#ajax-modal').parent().css("top","30%").css("left","40%"); $('#ajax-modal').parent().addClass("anonymos_work"); -// alert("当前作业已开启匿评,您提交作品后将不会收到任何匿评作品,您的作品也不会被其他用户匿评,如需获得最终成绩,请您联系主讲老师对您的作品单独进行评分"); }); <% end%> //匿评弹框取消按钮 function clickCanel(){hideModal("#popbox02");} + + //快速创建项目的弹框 + function new_project(){ + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/new_project') %>'); + showModal('ajax-modal', '800px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().css("top","30%").css("left","20%").css("position","fixed"); + }
    @@ -82,7 +91,8 @@
    <%= select_tag :project_id, options_for_select(user_projects_option, @student_work.project_id), {:class => "InputBox W680 fl"} %> - <%=link_to "", new_project_path, :class => "ml5 mt5 SetUpIcon fl", :title => "快速创建"%> + <%#=link_to "", new_project_path, :class => "ml5 mt5 SetUpIcon fl", :title => "快速创建"%> +
    @@ -94,4 +104,4 @@
    <% end%>
    - + \ No newline at end of file diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index 9e5a858f6..3548d1f90 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -255,4 +255,48 @@ var autoTextarea = function (elem, extra, maxHeight) { addEvent('input', change); addEvent('focus', change); change(); -}; \ No newline at end of file +}; + +/////////////////////////////////////////////////////////////////////////////////////创建项目 +//验证项目名称是不是为空 +function regex_project_name(){ + var name = $.trim($("#project_name").val()); + if(name=="") + { + $("#project_name_error_msg").text("项目名称不能为空"); + return false; + } + else + { + $("#project_name_error_msg").text(""); + return true; + } +} + +//验证项目名称是否重复---项目名称可以重复。。。。 +function regex_project_name_same(){ + var name = $.trim($("#project_name").val()); + return true; +} + +//验证项目描述 +function regex_project_desc(){ + var desc = $.trim($("#project_description").val()); + if(desc == "") + { + $("#project_desc_error_msg").text("项目名称不能为空"); + return false; + } + else + { + $("#project_desc_error_msg").text(""); + return true; + } +} +//提交 +function submit_project(){ + if(regex_project_name()&®ex_project_desc()){ + $("#new_project").submit(); + } +} +/////////////////////////////////////////////////////////////////////////////////////创建项目 end \ No newline at end of file diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 128890d4b..184a6c49e 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -938,7 +938,7 @@ a:hover.UsersApBtn{border:1px solid #888888; } .C_Blue{ color:#3598db;} a.C_Blue{ color:#3598db;} a:hover.C_Blue{ color:#297fb8;} -.BluePopupBox{ border:3px solid #3598db; padding:20px; background:#fff; width:707px;} +.BluePopupBox{ padding:20px; background:#fff; width:707px;} /*.BluePopupBox:hover{ border:3px solid #297fb8; }*/ a.CloseBtn{background:url(../images/CloseBtn.png) 0px 0px no-repeat; width:13px; height:13px; display:block; float:right;} a:hover.CloseBtn{background:url(../images/CloseBtn.png) 0px -24px no-repeat; } From 0a2bfa1bdb013637d0383813acf4d0ed6ea9ea26 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 15 Sep 2015 16:27:53 +0800 Subject: [PATCH 12/58] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E7=9A=84=E7=BC=BA=E9=99=B7=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E4=B8=8E=E7=BC=BA=E9=99=B7=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E5=86=85=E5=AE=B9=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_project_issue.html.erb | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index cdc310604..0413d6811 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -111,17 +111,14 @@ <% end %> <%= format_time(reply.created_on) %> - <% if reply.details.any? %> - <% details_to_strings(reply.details).each do |string| %> -
    - <%= string %> -
    - <% end %> - <% else %> -
    - <%= reply.notes.html_safe %> -
    - <% end %> +
    + <% if reply.details.any? %> + <% details_to_strings(reply.details).each do |string| %> +

    <%= string %>

    + <% end %> + <% end %> +

    <%= reply.notes.html_safe %>

    +
    From 9ee82c57be6bdc5406a376da50fbfebee8b7e7e8 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 15 Sep 2015 17:01:39 +0800 Subject: [PATCH 13/58] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=9A=84=E5=AF=BC=E8=88=AA=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_courses.html.erb | 30 ------------------------- 1 file changed, 30 deletions(-) diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 38bfbfe5c..4830431a0 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -33,36 +33,6 @@
    -
    -
    -

    - - <%= l(:label_courses_community)%> - -

    -

    - <%= l(:label_user_location) %> : - <%= link_to l(:field_homepage), home_path %> - > - - <%=l(:label_courses_management_platform)%> - - > - <%= link_to @course.name, course_path(@course) %> -

    -
    - - - - - - - - - - -
    -
    From fddf466ce1c1b3e80056f637234e3e8e0eed11f0 Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 16 Sep 2015 09:45:27 +0800 Subject: [PATCH 14/58] =?UTF-8?q?=E5=B0=86=E5=8F=91=E5=B8=83=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E6=97=B6=E7=9A=84=E5=BC=95=E7=94=A8=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=BA=93=E7=9A=84=E2=80=9C=E7=A1=AE=E5=AE=9A=E2=80=9D=E2=80=9C?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E2=80=9D=E6=8C=89=E9=92=AE=E6=94=B9=E6=88=90?= =?UTF-8?q?=E6=95=B4=E4=B8=AA=E6=8C=89=E9=92=AE=E5=8F=AF=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_show_user_resource.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users/_show_user_resource.html.erb b/app/views/users/_show_user_resource.html.erb index a3c82d995..24d81a787 100644 --- a/app/views/users/_show_user_resource.html.erb +++ b/app/views/users/_show_user_resource.html.erb @@ -59,8 +59,8 @@
    <% end %> From 77a8c18a777362dc2f07ef42fd15dec9ec7b194e Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 16 Sep 2015 10:16:25 +0800 Subject: [PATCH 15/58] =?UTF-8?q?1.=E5=85=B3=E4=BA=8E=E6=88=91=E4=BB=AC?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9=EF=BC=9B=202.=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E7=95=8C=E9=9D=A2=E6=A0=BC=E5=BC=8F=E8=B0=83=E6=95=B4?= =?UTF-8?q?=EF=BC=9B=203.=E4=B8=AA=E4=BA=BA=E5=8A=A8=E6=80=81=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/account/about_us.html.erb | 100 ++-- app/views/account/login.html.erb | 572 +++++++++++----------- app/views/users/_course_message.html.erb | 38 +- app/views/users/_course_news.html.erb | 32 +- app/views/users/_project_issue.html.erb | 33 +- app/views/users/_project_message.html.erb | 36 +- app/views/users/_user_activities.html.erb | 145 +++--- public/javascripts/init_KindEditor.js | 246 +++++----- public/stylesheets/new_user.css | 14 +- 9 files changed, 618 insertions(+), 598 deletions(-) diff --git a/app/views/account/about_us.html.erb b/app/views/account/about_us.html.erb index 2d21783ce..f990cd64c 100644 --- a/app/views/account/about_us.html.erb +++ b/app/views/account/about_us.html.erb @@ -1,50 +1,50 @@ -<%= stylesheet_link_tag 'new_user'%> -
    -

    关于我们

    -
    -

    - Trustie是一个面向高校创新实践的在线协作社区,是在中国高校推行大规模开放在线研究(Massive Open Online Research, MOORE)的支撑平台,也简称Trustie平台。老师、学生和科研人员可以在此开展各种在线协同学习、协同作业、协同开发等活动。 -

    -

    - MOORE是国防科学技术大学杨学军院士提出的一个面向高校科研教学活动的新型创新实践概念,为全面支持高校人才培养和科学研究提供了一种新思路。MOORE是对大规模在线开放课程(Massive Open Online Course, MOOC)的拓展,是课堂教学与创新实践深度结合的全新模式,可以看作MOOC2.0。 -

    -

    - 2005年开始,Trustie研制团队围绕网络时代的软件开发效率和质量这一核心问题展开研究,经过十年的磨砺与攻关,逐步揭示出以大众化协同开发、开放式资源共享、持续性可信评估为核心的互联网大规模协同机理,提出了全新的软件开发群体化方法。2008年起,研制团队开始探索如何将这种协同机理引入软件人才培养。MOORE概念的提出为研制团队的人才培养实践提供了新的发展方向和应用模式,使Trustie技术和工具能够更直接、更有效地与高校人才培养对接,形成了今天已被大量师生接受的在线人才培养平台。 -

    -

    - 研制团队认为MOORE的创新人才培养模式(如图1左图)是将互联网大规模协同机理与高校创新实践活动相结合的全新人才培养方法和模式,研制团队并基于本平台的架构形成了对MOORE核心机理的三方面认识(如图1右图)。 -

    -
    - -

    图1 基于MOORE的创新人才培养模式与核心机理

    -
    -

    - 目前,Trustie平台已经初步展现出大规模开放在线研究的生态系统蓝图,其核心是在线教学实践平台和在线协同研究平台,如图2。Trustie在线教学实践平台是支持教师和学生围绕课堂学习开展实践的平台(如图2),Trustie在线协同研究平台是支持开发小组围绕实践任务或研究工作开展分布式协作的平台(如图2)。两个核心平台为一名"新手"大学生成长为具有一定创新能力的"创客"提供了从学习到研究的一个渐进式成长环境(如图2)。 -

    -

    - 特别是,根据师生的实际需要,Trustie平台提供了私有模式和公开模式,支持针对未公开成果实施有效知识产权保护为前提的交流分享(如图2)。随着越来越多的高校、课程和研究小组的加入,MOORE创新实践模式的生态效益将不断显现出来。 -

    -
    - -

    图2 基于MOORE的支撑平台和生态系统

    -
    -

    - 研制团队特别感谢高校老师和学生的积极反馈、无私创意。平台的很多实用便捷的功能都是老师们积极参与和设计的结果,汇聚了大量师生的宝贵贡献,是研制团队和用户群体共同成长的结果。 -

    -

    - Trustie平台的基本思路是将开源模式与中国高校人才培养活动相结合,但其本质上是一种O2O(Online To Offline)的创新人才培养模式,只有在以下两个方面同步推进,才能在持续解决实际需求的过程中快速发展:
    -     (1)构建实践平台,激活创新能力:成为支持不同规模的团队进行协同研究和协同开发的实践平台,支持各类可公开的课程实验任务、教研室科研任务的在线协同,能够有效提升和评估学生的创新能力、协作能力和实践能力。
    -     (2)引入开源理念,形成创客文化:将互联网开源软件运动中的自由、对等、共享、创新的理念引入高校,使"自主创意并亲自动手实现创意"的创客精神深入人才培养活动,在学生群体中形成大胆创意、大胆实践的创新文化。 -

    -

    - 研制团队认为,Trustie平台是一种"互联网+"思维在高校教育领域的大型探索性实践。作为一种互联网应用,Trustie平台自身的开发也采取了互联网模式:Trustie研制团队采用了"网构化软件开发模式",坚持"每周一更"的快速上线、快速体验模式,以最大程度上贴近用户实际需求提升。欢迎高校师生一同投身创新实践,共同见证MOORE创新生态的早日形成。 -

    -
    - - - -
    - - - - +<%= stylesheet_link_tag 'new_user'%> +
    +

    关于我们

    +
    +

    + Trustie是一个面向高校创新实践的在线协作社区,是在中国高校推行大规模开放在线研究(Massive Open Online Research, MOORE)的支撑平台,也简称Trustie平台。老师、学生和科研人员可以在此开展各种在线协同学习、协同作业、协同开发等活动。 +

    +

    + MOORE是国防科学技术大学杨学军院士提出的一个面向高校科研教学活动的新型创新实践概念,为全面支持高校人才培养和科学研究提供了一种新思路。MOORE是对大规模在线开放课程(Massive Open Online Course, MOOC)的拓展,是课堂教学与创新实践深度结合的全新模式,可以看作MOOC2.0。 +

    +

    + 2005年开始,Trustie研制团队围绕网络时代的软件开发效率和质量这一核心问题展开研究,经过十年的磨砺与攻关,逐步揭示出以大众化协同开发、开放式资源共享、持续性可信评估为核心的互联网大规模协同机理,提出了全新的软件开发群体化方法。2008年起,研制团队开始探索如何将这种协同机理引入软件人才培养。MOORE概念的提出为研制团队的人才培养实践提供了新的发展方向和应用模式,使Trustie技术和工具能够更直接、更有效地与高校人才培养对接,形成了今天已被大量师生接受的在线人才培养平台。 +

    +

    + 研制团队认为MOORE的创新人才培养模式(如图1左图)是将互联网大规模协同机理与高校创新实践活动相结合的全新人才培养方法和模式,研制团队并基于本平台的架构形成了对MOORE核心机理的三方面认识(如图1右图)。 +

    +
    + +

    图1 基于MOORE的创新人才培养模式与核心机理

    +
    +

    + 目前,Trustie平台已经初步展现出大规模开放在线研究的生态系统蓝图,其核心是在线教学实践平台和在线协同研究平台,如图2。Trustie在线教学实践平台是支持教师和学生围绕课堂学习开展实践的平台(如图2),Trustie在线协同研究平台是支持开发小组围绕实践任务或研究工作开展分布式协作的平台(如图2)。两个核心平台为一名"新手"大学生成长为具有一定创新能力的"创客"提供了从学习到研究的一个渐进式成长环境(如图2)。 +

    +

    + 特别是,根据师生的实际需要,Trustie平台提供了私有模式和公开模式,支持针对未公开成果实施有效知识产权保护为前提的交流分享(如图2)。随着越来越多的高校、课程和研究小组的加入,MOORE创新实践模式的生态效益将不断显现出来。 +

    +
    + +

    图2 基于MOORE的支撑平台和生态系统

    +
    +

    + 研制团队特别感谢高校老师和学生的积极反馈、无私创意。平台的很多实用便捷的功能都是老师们积极参与和设计的结果,汇聚了大量师生的宝贵贡献,是研制团队和用户群体共同成长的结果。 +

    +

    + Trustie平台的基本思路是将开源模式与中国高校人才培养活动相结合,但其本质上是一种O2O(Online To Offline)的创新人才培养模式,只有在以下两个方面同步推进,才能在持续解决实际需求的过程中快速发展:
    +     (1)构建实践平台,激活创新能力:成为支持不同规模的团队进行协同研究和协同开发的实践平台,支持各类可公开的课程实验任务、教研室科研任务的在线协同,能够有效提升和评估学生的创新能力、协作能力和实践能力。
    +     (2)引入开源理念,形成创客文化:将互联网开源软件运动中的自由、对等、共享、创新的理念引入高校,使"自主创意并亲自动手实现创意"的创客精神深入人才培养活动,在学生群体中形成大胆创意、大胆实践的创新文化。 +

    +

    + 研制团队认为,Trustie平台是一种"互联网+"思维在高校教育领域的大型探索性实践。作为一种互联网应用,Trustie平台自身的开发也采取了互联网模式:Trustie研制团队采用了"网构化软件开发模式",坚持"每周一更"的快速上线、快速体验模式,以最大程度上贴近用户实际需求提升。欢迎高校师生一同投身创新实践,共同见证MOORE创新生态的早日形成。 +

    +
    + + + +
    + + + + diff --git a/app/views/account/login.html.erb b/app/views/account/login.html.erb index 56f2c5454..ed43f455a 100644 --- a/app/views/account/login.html.erb +++ b/app/views/account/login.html.erb @@ -1,286 +1,286 @@ -<%= stylesheet_link_tag 'new_user'%> -<%= stylesheet_link_tag 'leftside'%> - - -
    -
    -
    - -
    欢迎加入Trustie高校创新实践社区!老师、学生和科研人员可以在此开展各种在线协同学习、协同作业、协同开发等活动。Trustie是在中国推行大规模开放在线研究模式(MOORE)的支撑平台。
    -
    -
    -
    -
    -
    -
      -
    • 登录
    • -
    • -
    -
    -
    <%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %>
    -
    -
    - - <%= form_tag(signin_path,:id=>'main_login_form',:method=>'post') do %> - <%= back_url_hidden_field_tag %> -
    - <%= text_field_tag 'username', params[:username], :tabindex => '1' , - :class=>'loginSignBox',:placeholder=>'请输入邮箱地址或昵称', :onkeypress => "user_name_keypress(event);"%> - -
    - <% if Setting.openid? %> -
    - <%= text_field_tag "openid_url", nil, :tabindex => '3',:placeholder=>'请输入OpenId URL' %> -
    - <% end %> -
    - - <%= password_field_tag 'password', nil, :tabindex => '2',:class=>'loginSignBox' ,:placeholder=>'请输密码', :onkeypress => "user_name_keypress(event);"%> -
    -
    - <% if Setting.autologin? %> -
    - <%= check_box_tag 'autologin', 1, true, :tabindex => 4 %> -
    - <%= l(:label_stay_logged_in) %> - <% end %> - - <% if Setting.lost_password? %> - 忘记密码? - <% end %> -
    - <% end %> -
    - 登录 -
    - -
    - -
    -
    -
    -
      -
    • 注册<%= link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %> -
    • -
    -
    -
    - <%= form_for :user, :url => register_path,:method=>'post',:html=>{:id=>'main_reg_form'} do |f| %> - <%= error_messages_for 'user' %> -
    - - <%= f.text_field :mail,:size => 25, :class=>'loginSignBox' ,:placeholder=>"请输入邮箱地址"%> - -
    -
    - - <%= f.password_field :password, :size => 25,:placeholder=>"请输入密码",:class=>'loginSignBox' %> - -
    -
    - - <%= f.password_field :password_confirmation, :size => 25,:placeholder=>"请再次输入密码",:class=>'loginSignBox' %> - -
    -
    - - <%= f.text_field :login, :size => 25,:placeholder=>"请输入用户昵称",:class=>'loginSignBox'%> - -
    -
    -
    - -
    - 我已阅读并接受Trustie服务协议条款
    -
    - 注册 - -
    - <% end %> -
    -
    -
    -
    -
    -
    +<%= stylesheet_link_tag 'new_user'%> +<%= stylesheet_link_tag 'leftside'%> + + +
    +
    +
    + +
      欢迎加入Trustie高校创新实践社区!老师、学生和科研人员可以在此开展各种在线协同学习、协同作业、协同开发等活动。

      Trustie是在中国推行大规模开放在线研究模式(MOORE)的支撑平台。
    +
    +
    +
    +
    +
    +
      +
    • 登录
    • +
    • +
    +
    +
    <%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %>
    +
    +
    + + <%= form_tag(signin_path,:id=>'main_login_form',:method=>'post') do %> + <%= back_url_hidden_field_tag %> +
    + <%= text_field_tag 'username', params[:username], :tabindex => '1' , + :class=>'loginSignBox',:placeholder=>'请输入邮箱地址或昵称', :onkeypress => "user_name_keypress(event);"%> + +
    + <% if Setting.openid? %> +
    + <%= text_field_tag "openid_url", nil, :tabindex => '3',:placeholder=>'请输入OpenId URL' %> +
    + <% end %> +
    + + <%= password_field_tag 'password', nil, :tabindex => '2',:class=>'loginSignBox' ,:placeholder=>'请输密码', :onkeypress => "user_name_keypress(event);"%> +
    +
    + <% if Setting.autologin? %> +
    + <%= check_box_tag 'autologin', 1, true, :tabindex => 4 %> +
    + <%= l(:label_stay_logged_in) %> + <% end %> + + <% if Setting.lost_password? %> + 忘记密码? + <% end %> +
    + <% end %> +
    + 登录 +
    + +
    + +
    +
    +
    +
      +
    • 注册<%= link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %> +
    • +
    +
    +
    + <%= form_for :user, :url => register_path,:method=>'post',:html=>{:id=>'main_reg_form'} do |f| %> + <%= error_messages_for 'user' %> +
    + + <%= f.text_field :mail,:size => 25, :class=>'loginSignBox' ,:placeholder=>"请输入邮箱地址"%> + +
    +
    + + <%= f.password_field :password, :size => 25,:placeholder=>"请输入密码",:class=>'loginSignBox' %> + +
    +
    + + <%= f.password_field :password_confirmation, :size => 25,:placeholder=>"请再次输入密码",:class=>'loginSignBox' %> + +
    +
    + + <%= f.text_field :login, :size => 25,:placeholder=>"请输入用户昵称",:class=>'loginSignBox'%> + +
    +
    +
    + +
    + 我已阅读并接受Trustie服务协议条款
    +
    + 注册 + +
    + <% end %> +
    +
    +
    +
    +
    +
    diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 1587cbfb1..5f820d923 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -24,7 +24,6 @@ 发帖时间:<%= format_time(activity.created_on) %>
    -
    <% if activity.parent_id.nil? %> <%= activity.content.to_s.html_safe%> @@ -67,21 +66,6 @@ <% end %>
    -
    -
    - <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> - - - -

    -
    - 取消 - 发送 - <% end%> -
    -
    -
    - <% activity= activity.parent ? activity.parent : activity%> <% replies_all_i = 0 %> <% if count > 0 %> @@ -91,7 +75,7 @@ <% replies_all_i=replies_all_i+1 %>
  • - <%= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_path(reply.author_id), :alt => "用户头像" %>
    @@ -112,5 +96,25 @@
    <% end %> + +
    +
    <%= link_to image_tag(url_to_avatar(activity.author), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
    +
    +
    + <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> + + + + 发送 +
    +
    +

    + <% end%> +
    +
    +
    +
    +
    +
  • diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index 857ae3697..f9745f59e 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -40,20 +40,6 @@ <% end %>
    -
    -
    - <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> - - -

    -
    - 取消 - 发送 - <% end%> -
    -
    -
    - <% replies_all_i = 0 %> <% if count > 0 %>
    @@ -62,7 +48,7 @@ <% replies_all_i = replies_all_i + 1 %>
  • - <%= link_to image_tag(url_to_avatar(comment.author), :width => "45", :height => "45"), user_path(comment.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
    @@ -81,5 +67,21 @@
    <% end %> + +
    +
    <%= link_to image_tag(url_to_avatar(activity.author), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
    +
    +
    + <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> + + +
    + 发送 +

    + <% end%> +
    +
    +
    +
  • \ No newline at end of file diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index e0e093f2d..e3ef7c41d 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -78,20 +78,6 @@ <% end %> -
    -
    - <%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%> - - -

    -
    - 取消 - 发送 - <% end%> -
    -
    -
    - <% replies_all_i = 0 %> <% if count > 0 %>
    @@ -100,7 +86,7 @@ <% replies_all_i=replies_all_i + 1 %>
  • - <%= link_to image_tag(url_to_avatar(reply.user), :width => "45", :height => "45"), user_path(reply.user_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "用户头像" %>
    @@ -129,6 +115,23 @@
    <% end %> + +
    +
    <%= link_to image_tag(url_to_avatar(activity.author), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
    +
    +
    + <%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%> + + +
    + 发送 +

    + <% end%> +
    +
    +
    +
    +
  • - <% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %> - <% case user_activity.container_type.to_s %> - <% when 'Course' %> - <% if act %> - <% case user_activity.act_type.to_s %> - <% when 'HomeworkCommon' %> - <%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> - <% when 'News' %> - <%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> - <% when 'Message'%> - <%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> - <% when 'Poll' %> - <%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id} %> - <% end %> - <% end %> - <% when 'Project' %> - <% if act %> - <% case user_activity.act_type.to_s %> - <% when 'Issue' %> - <%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> - <% when 'Message' %> - <%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> - <% end %> - <% end %> - <% end %> - <% end %> -<% end %> - -<% if user_activities.count == 10%> -
    展开更多<%=link_to "", user_activities_path(@user.id,:type => type,:page => page),:id => "more_activities_link",:remote => "true",:class => "none" %>
    - <%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%> -<% end%> - - + <% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %> + <% case user_activity.container_type.to_s %> + <% when 'Course' %> + <% if act %> + <% case user_activity.act_type.to_s %> + <% when 'HomeworkCommon' %> + <%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> + <% when 'News' %> + <%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> + <% when 'Message'%> + <%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> + <% when 'Poll' %> + <%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id} %> + <% end %> + <% end %> + <% when 'Project' %> + <% if act %> + <% case user_activity.act_type.to_s %> + <% when 'Issue' %> + <%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> + <% when 'Message' %> + <%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id} %> + <% end %> + <% end %> + <% end %> + <% end %> +<% end %> + +<% if user_activities.count == 10%> +
    展开更多<%=link_to "", user_activities_path(@user.id,:type => type,:page => page),:id => "more_activities_link",:remote => "true",:class => "none" %>
    + <%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%> +<% end%> + + \ No newline at end of file diff --git a/public/javascripts/init_KindEditor.js b/public/javascripts/init_KindEditor.js index 18e7182fb..f9b94e2d3 100644 --- a/public/javascripts/init_KindEditor.js +++ b/public/javascripts/init_KindEditor.js @@ -1,122 +1,126 @@ -function init_editor(params){ - // var minHeight; //最小高度 - var paramsHeight = params.height; //设定的高度 - - var editor = params.kindutil.create(params.textarea, { - resizeType : 1,minWidth:"1px",width:"100%", - height:"30px",// == undefined ? "30px":paramsHeight+"px", - minHeight:"30px",// == undefined ? "30px":paramsHeight+"px", - items:['emoticons'], - afterChange:function(){//按键事件 - nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea}); - var edit = this.edit; - var body = edit.doc.body; - edit.iframe.height(paramsHeight); - this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + (paramsHeight == undefined ? 30:paramsHeight), paramsHeight)); - }, - afterCreate:function(){ - var toolbar = $("div[class='ke-toolbar']",params.div_form); - $(".ke-outline>.ke-toolbar-icon",toolbar).append('表情'); - params.toolbar_container.append(toolbar); - //init - var edit = this.edit; - var body = edit.doc.body; - edit.iframe[0].scroll = 'no'; - body.style.overflowY = 'hidden'; - //reset height - var edit = this.edit; - var body = edit.doc.body; - paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight; - edit.iframe.height(paramsHeight); - this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ (paramsHeight == undefined ? 30:paramsHeight) , paramsHeight)); - - } - }).loadPlugin('paste'); - return editor; -} - -function nh_check_field(params){ - var result=true; - if(params.content!=undefined){ - if(params.content.isEmpty()){ - result=false; - } - if(params.content.html()!=params.textarea.html() || params.issubmit==true){ - params.textarea.html(params.content.html()); - params.content.sync(); - if(params.content.isEmpty()){ - params.contentmsg.html('内容不能为空'); - params.contentmsg.css({color:'#ff0000'}); - }else{ - params.contentmsg.html('填写正确'); - params.contentmsg.css({color:'#008000'}); - } - params.contentmsg.show(); - } - } - return result; -} -function init_form(params){ - params.form.submit(function(){ - var flag = false; - if(params.form.attr('data-remote') != undefined ){ - flag = true - } - var is_checked = nh_check_field({ - issubmit:true, - content:params.editor, - contentmsg:params.contentmsg, - textarea:params.textarea - }); - if(is_checked){ - if(flag){ - return true; - }else{ - $(this)[0].submit(); - return false; - } - } - return false; - }); -} -function nh_reset_form(params){ - params.form[0].reset(); - params.textarea.empty(); - if(params.editor != undefined){ - params.editor.html(params.textarea.html()); - } - params.contentmsg.hide(); -} -//第二个参数是高度,可以传,可以不传 -function init_KindEditor_data(id){ - var height = arguments[1] ? arguments[1] : undefined; - KindEditor.ready(function (K) { - $("div[nhname='new_message_" + id + "']").each(function () { - var params = {}; - params.kindutil = K; - params.div_form = $(this); - params.form = $("form", params.div_form); - if (params.form == undefined || params.form.length == 0) { - return; - } - params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form); - params.contentmsg = $("p[nhname='contentmsg_" + id + "']", params.div_form); - params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form); - params.cancel_btn = $("#new_message_cancel_btn_" + id); - params.submit_btn = $("#new_message_submit_btn_" + id); - params.height = height; - if (params.textarea.data('init') == undefined) { - params.editor = init_editor(params); - init_form(params); - params.cancel_btn.click(function () { - nh_reset_form(params); - }); - params.submit_btn.click(function () { - params.form.submit(); - }); - params.textarea.data('init', 1); - $(this).show(); - } - }); - }); +function init_editor(params){ + // var minHeight; //最小高度 + var paramsHeight = params.height; //设定的高度 + var paramsWidth = params.width == undefined ? "100%" : params.width; + + var editor = params.kindutil.create(params.textarea, { + resizeType : 1,minWidth:"1px",width:paramsWidth, + height:"30px",// == undefined ? "30px":paramsHeight+"px", + minHeight:"30px",// == undefined ? "30px":paramsHeight+"px", + items:['emoticons'], + afterChange:function(){//按键事件 + nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea}); + var edit = this.edit; + var body = edit.doc.body; + edit.iframe.height(paramsHeight); + this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + (paramsHeight == undefined ? 30:paramsHeight), paramsHeight)); + }, + afterCreate:function(){ + var toolbar = $("div[class='ke-toolbar']",params.div_form); + toolbar.css('width',24); + $(".ke-outline>.ke-toolbar-icon",toolbar).append('表情'); + params.toolbar_container.append(toolbar); + //init + var edit = this.edit; + var body = edit.doc.body; + edit.iframe[0].scroll = 'no'; + body.style.overflowY = 'hidden'; + //reset height + var edit = this.edit; + var body = edit.doc.body; + paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight; + edit.iframe.height(paramsHeight); + this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ (paramsHeight == undefined ? 30:paramsHeight) , paramsHeight)); + + } + }).loadPlugin('paste'); + return editor; +} + +function nh_check_field(params){ + var result=true; + if(params.content!=undefined){ + if(params.content.isEmpty()){ + result=false; + } + if(params.content.html()!=params.textarea.html() || params.issubmit==true){ + params.textarea.html(params.content.html()); + params.content.sync(); + if(params.content.isEmpty()){ + params.contentmsg.html('内容不能为空'); + params.contentmsg.css({color:'#ff0000'}); + }else{ + params.contentmsg.html('填写正确'); + params.contentmsg.css({color:'#008000'}); + } + params.contentmsg.show(); + } + } + return result; +} +function init_form(params){ + params.form.submit(function(){ + var flag = false; + if(params.form.attr('data-remote') != undefined ){ + flag = true + } + var is_checked = nh_check_field({ + issubmit:true, + content:params.editor, + contentmsg:params.contentmsg, + textarea:params.textarea + }); + if(is_checked){ + if(flag){ + return true; + }else{ + $(this)[0].submit(); + return false; + } + } + return false; + }); +} +function nh_reset_form(params){ + params.form[0].reset(); + params.textarea.empty(); + if(params.editor != undefined){ + params.editor.html(params.textarea.html()); + } + params.contentmsg.hide(); +} +//第二个参数是高度,可以传,可以不传 +function init_KindEditor_data(id){ + var height = arguments[1] ? arguments[1] : undefined; + var width = arguments[2] ? arguments[2] : undefined; + KindEditor.ready(function (K) { + $("div[nhname='new_message_" + id + "']").each(function () { + var params = {}; + params.kindutil = K; + params.div_form = $(this); + params.form = $("form", params.div_form); + if (params.form == undefined || params.form.length == 0) { + return; + } + params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form); + params.contentmsg = $("p[nhname='contentmsg_" + id + "']", params.div_form); + params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form); + params.cancel_btn = $("#new_message_cancel_btn_" + id); + params.submit_btn = $("#new_message_submit_btn_" + id); + params.height = height; + params.width = width; + if (params.textarea.data('init') == undefined) { + params.editor = init_editor(params); + init_form(params); + params.cancel_btn.click(function () { + nh_reset_form(params); + }); + params.submit_btn.click(function () { + params.form.submit(); + }); + params.textarea.data('init', 1); + $(this).show(); + } + }); + }); } \ No newline at end of file diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index c526b3245..2fb72c439 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -562,7 +562,7 @@ a.postTypeGrey:hover {color:#269ac9;} .homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;} .homepagePostReplyBannerTime{width:85px; display:inline-block;} .homepagePostReplyBannerMore{width:330px; display:inline-block; text-align:right;} -.homepagePostReplyInputContainer {width:680px; margin: 10px auto 0 auto;} +.homepagePostReplyInputContainer {width:630px; float:left;} .homepagePostReplyInput {width:663px; height:45px; max-width:663px; max-height:45px; border:1px solid #d9d9d9; outline:none; margin:20px auto 10px auto;} .homepagePostReplyEmotion {background:url(../images/homepage_icon.png) -90px -88px no-repeat; width:50px; height:24px; float:left; padding-left:30px;} .homepagePostReplySubmit {float:right; width:45px; height:24px; text-align:center; line-height:24px; vertical-align:middle; font-size:12px; color:#ffffff; background-color:#269ac9;} @@ -582,7 +582,7 @@ a.postReplyCancel:hover {color:#ffffff;} .homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;} a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;} a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;} -.homepagePostReplyPortrait {float:left; width:45px;} +.homepagePostReplyPortrait {float:left; width:33px;} .homepagePostReplyDes {float:left; width:620px; margin-left:15px;} .homepagePostReplyPublisher {font-size:12px; color:#888888; margin-bottom:5px;} .homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;} @@ -665,16 +665,18 @@ a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;} /*20150826忘记密码 LB*/ -.BgBox{ width:968px; border:1px solid #dddddd; background:#fff; padding:15px; padding-top:10px;margin: 10px auto 20px auto;} +.BgBox{ width:968px; border:1px solid #dddddd; background:#fff; padding:15px; padding-top:10px; margin:20px auto;} .BgBox_h2{ font-size:16px; color:#484848; width:968px;border-bottom:1px solid #e3e3e3; padding-bottom:5px;} -.NomalInput{width:308px; height:38px; border:1px solid #98a1a6 !important; outline:none; color:#888888; font-size:14px;} -.BgBoxCon{ width:310px; margin:80px auto;} +.NomalInput{width:308px; height:38px; border:1px solid #98a1a6; outline:none; color:#888888; font-size:14px;} +.BgBoxCon{ width:310px; margin:140px auto 520px;} .BgBoxConP{ font-size:14px; color:#484848;} .LoginButton {width:315px; height:40px; background-color:#269ac9; font-size:14px; text-align:center; line-height:40px; vertical-align:middle;} .LoginButton:hover {background-color:#297fb8;} /*20150826协议 LB*/ .AgreementBox{ margin:20px 0; color:#666666; font-size:14px; line-height:1.9;} -.Agreementh4{ color:#2980b9; font-weight:bold; font-size:14px; margin-top:30px; border: none;} +.Agreementh4{ color:#2980b9; font-weight:bold; font-size:14px; margin-top:30px;} +.AgreementTxt{text-indent:2em; margin-bottom:15px;} +.AgreementImg{ margin:0px auto; width:619px;} /*底部*/ #Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/ From 5f08ecc7e31ff2d9f3a7f34f70cf4366013e0791 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 16 Sep 2015 10:26:13 +0800 Subject: [PATCH 16/58] =?UTF-8?q?1=E3=80=81=E4=BD=9C=E4=B8=9A=E7=9A=84?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=8C=BF=E8=AF=84=E3=80=81=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=8C=BF=E8=AF=84=E5=8A=9F=E8=83=BD=202=E3=80=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BD=9C=E5=93=81=E6=97=B6=EF=BC=8C=E8=BF=9F=E4=BA=A4?= =?UTF-8?q?=E6=89=A3=E5=88=86=E3=80=81=E7=BC=BA=E8=AF=84=E6=89=A3=E5=88=86?= =?UTF-8?q?=E7=9A=84=E8=AE=A1=E7=AE=97--->=E6=94=B9=E4=B8=BA=E5=8F=AA?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=95=B0=E9=87=8F=203=E3=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_common_controller.rb | 8 ++++---- app/controllers/student_work_controller.rb | 8 ++++---- app/controllers/users_controller.rb | 8 ++++++++ app/helpers/application_helper.rb | 17 ++++++++--------- .../alert_anonymous_comment.js.erb | 3 +-- .../start_anonymous_comment.js.erb | 2 +- app/views/student_work/new.html.erb | 3 --- app/views/users/_user_homework_list.html.erb | 2 +- public/javascripts/new_user.js | 17 ++++++++++++++++- public/stylesheets/new_user.css | 14 ++++++++++++++ 10 files changed, 57 insertions(+), 25 deletions(-) diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 71782ee28..293346365 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -190,11 +190,11 @@ class HomeworkCommonController < ApplicationController #开启匿评 #statue 1:启动成功,2:启动失败,作业总数大于等于2份时才能启动匿评,3:已开启匿评,请务重复开启,4:没有开启匿评的权限 def start_anonymous_comment - @statue =4 and return unless User.current.admin? || User.current.allowed_to?(:as_teacher,@course) + @statue = 4 and return unless User.current.admin? || User.current.allowed_to?(:as_teacher,@course) @statue = 5 and return if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") if @homework_detail_manual.comment_status == 1 student_works = @homework.student_works - if student_works && student_works.size >=2 + if student_works && student_works.size >= 2 student_works.each_with_index do |work, index| user = work.user n = @homework_detail_manual.evaluation_num @@ -218,11 +218,11 @@ class HomeworkCommonController < ApplicationController #关闭匿评 def stop_anonymous_comment @homework_detail_manual.update_column('comment_status', 3) - + #计算缺评扣分---->计算缺评数量 work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")" @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 - 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 : 0 student_work.save end diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 0de5184c7..474fb81bc 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -180,15 +180,15 @@ class StudentWorkController < ApplicationController student_work.homework_common_id = @homework.id student_work.user_id = User.current.id student_work.save_attachments(params[:attachments]) + render_attachment_warning_if_needed(student_work) + #提交作品时,计算是否迟交 if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d") - student_work.late_penalty = @homework.late_penalty - else + student_work.late_penalty = 1 + else student_work.late_penalty = 0 end - render_attachment_warning_if_needed(student_work) if student_work.save - respond_to do |format| format.html { flash[:notice] = l(:notice_successful_create) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 05e828aae..4796d0c0c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -419,6 +419,14 @@ class UsersController < ApplicationController homework = HomeworkCommon.find(params[:homework]) student_work = StudentWork.where(homework_common_id: homework.id, user_id: User.current.id).first if student_work + + #提交作品时,计算是否迟交 + if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d") + student_work.late_penalty = 1 + else + student_work.late_penalty = 0 + end + student_work.save flash[:notice] = l(:notice_successful_create) redirect_to student_work_index_url(:homework => params[:homework]) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a1663c76b..f085032c3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2304,20 +2304,19 @@ module ApplicationHelper # else # link = "启动匿评".html_safe # end - if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") - link = "启动匿评".html_safe + link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "作业截止日期之前不可以启动匿评" elsif homework.student_works.count >= 2 #作业份数大于2 case homework.homework_detail_manual.comment_status - when 1 - link = link_to '启动匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'fr mr10 work_edit' - when 2 - link = link_to '关闭匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'fr mr10 work_edit' - when 3 - link = "匿评结束".html_safe + when 1 + link = link_to '启动匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'postOptionLink' + when 2 + link = link_to '关闭匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'postOptionLink' + when 3 + link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束" end else - link = "启动匿评".html_safe + link = link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "学生提交作业数大于2时才可以启动匿评" end link end diff --git a/app/views/homework_common/alert_anonymous_comment.js.erb b/app/views/homework_common/alert_anonymous_comment.js.erb index 2b3248dc2..375b333f1 100644 --- a/app/views/homework_common/alert_anonymous_comment.js.erb +++ b/app/views/homework_common/alert_anonymous_comment.js.erb @@ -3,5 +3,4 @@ showModal('ajax-modal', '500px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + ""); -$('#ajax-modal').parent().css("top","").css("left",""); -$('#ajax-modal').parent().addClass("anonymos"); \ No newline at end of file +$('#ajax-modal').parent().css("top","30%").css("left","30%"); \ No newline at end of file diff --git a/app/views/homework_common/start_anonymous_comment.js.erb b/app/views/homework_common/start_anonymous_comment.js.erb index 5f27a5b82..b0424bf7a 100644 --- a/app/views/homework_common/start_anonymous_comment.js.erb +++ b/app/views/homework_common/start_anonymous_comment.js.erb @@ -1,6 +1,6 @@ <% if @statue == 1%> alert('启动成功'); -$("#<%= @homework.id %>_start_anonymous_comment").replaceWith('<%= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_homework_common_path(@homework), remote: true, id:"#{@homework.id}_stop_anonymous_comment",:class => "fr mr10 work_edit")%>'); +$("#<%= @homework.id %>_start_anonymous_comment").replaceWith('<%= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_homework_common_path(@homework), remote: true, id:"#{@homework.id}_stop_anonymous_comment",:class => "postOptionLink")%>'); <% elsif @statue == 2 %> alert('启动失败\n作业总数大于等于2份时才能启动匿评'); <% elsif @statue == 3%> diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb index c755014d1..f9b242443 100644 --- a/app/views/student_work/new.html.erb +++ b/app/views/student_work/new.html.erb @@ -12,9 +12,6 @@ }); <% end%> - //匿评弹框取消按钮 - function clickCanel(){hideModal("#popbox02");} - //快速创建项目的弹框 function new_project(){ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/new_project') %>'); diff --git a/app/views/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb index 37afc3384..6a9ffb727 100644 --- a/app/views/users/_user_homework_list.html.erb +++ b/app/views/users/_user_homework_list.html.erb @@ -48,7 +48,7 @@ <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
  • - <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %> + <%= homework_anonymous_comment homework_common %>
  • diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index 3548d1f90..4f2cbeeff 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -299,4 +299,19 @@ function submit_project(){ $("#new_project").submit(); } } -/////////////////////////////////////////////////////////////////////////////////////创建项目 end \ No newline at end of file +/////////////////////////////////////////////////////////////////////////////////////创建项目 end +//匿评弹框取消按钮 +function clickCanel(){hideModal("#popbox02");} +//匿评弹框确定按钮 +function clickOK(path) +{ + clickCanel(); + $.ajax({ + type: "GET", + url: path, + data: 'text', + success: function (data) { + } + }); +} +///////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 184a6c49e..48696b743 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -1124,3 +1124,17 @@ a.SetUpIcon{background: url(../images/homepage_icon.png) 0px -453px no-repeat; a:hover.SetUpIcon{background: url(../images/homepage_icon.png) 0px -486px no-repeat; color:#3598db;} .W680{ width:680px;} .W710{ width:708px;} + +/* 开启匿评弹框 */ +.anonymos{width:480px;height:180px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;} +.anonymos_work {position:fixed !important;left:60%;top:60%;margin:-215px 0 0 -300px; box-shadow:0px 0px 8px #194a81; overflow:auto;} +.ni_con { width:425px; margin:25px 30px;} +.ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;} +.ni_con p{ color:#808181; } +.ni_con a:hover{ text-decoration:none;} +.ni_btn{ width:190px; margin:15px auto; line-height:1.9;} +a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:15px;} +a:hover.tijiao{ background:#0f99a9;} +.c_pink{ color:#e65d5e;} +.ni_con_work { width:300px; margin:25px 20px;} +.ni_con_work p{ color:#808181; } From a714b108608c516e3b7f581f49e0faa7e2e71a6a Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 16 Sep 2015 12:39:08 +0800 Subject: [PATCH 17/58] =?UTF-8?q?=E9=98=BB=E6=AD=A2=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E3=80=81=E5=8A=A0=E5=85=A5=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E3=80=81=E6=96=B0=E5=BB=BA=E8=AF=BE=E7=A8=8B=E3=80=81=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E9=A1=B9=E7=9B=AE=E7=89=88=E6=9C=AC=E3=80=81=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E7=89=88=E6=9C=AC=E5=BA=93=E7=AD=89=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E7=9A=84=E8=87=AA=E5=8A=A8=E5=A1=AB?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_join_private_course.html.erb | 2 ++ app/views/courses/new.html.erb | 2 ++ app/views/courses/settings.html.erb | 2 ++ app/views/projects/settings/_new_repositories.html.erb | 6 ++++-- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/views/courses/_join_private_course.html.erb b/app/views/courses/_join_private_course.html.erb index 934a4eb33..4cc8b9fbf 100644 --- a/app/views/courses/_join_private_course.html.erb +++ b/app/views/courses/_join_private_course.html.erb @@ -57,6 +57,8 @@ :id => 'new-watcher-form') do %>
    • + + 课 程 ID: diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index 8c7a41ddc..d2c17917e 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -5,6 +5,8 @@
        <%= labelled_form_for @course do |f| %>
      • + + diff --git a/app/views/courses/settings.html.erb b/app/views/courses/settings.html.erb index 4ca8d3d43..a462db79d 100644 --- a/app/views/courses/settings.html.erb +++ b/app/views/courses/settings.html.erb @@ -20,6 +20,8 @@
      • + + diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index be793a409..410bd8c32 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -59,7 +59,7 @@
        -<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post"} do |f| %> +<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form',:method=>"post",:autocomplete=>'off'} do |f| %>
        • @@ -79,6 +79,8 @@
        • <% end %>
        • + + <%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false,:label=>"", :no_label => true %> <% unless @repository.identifier_frozen? %> @@ -87,7 +89,7 @@
        • - <%= f.password_field :upassword, :label=> "", :no_label => true %> + <%= f.password_field :upassword, :label=> "", :no_label => true%> <%= l(:label_upassword_info)%>
        • From fa00285529b42f928270cbd8ac9b084b40de7524 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 16 Sep 2015 15:30:08 +0800 Subject: [PATCH 18/58] =?UTF-8?q?css=E6=96=87=E4=BB=B6=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/courses.css | 128 ++++++++-- public/stylesheets/public.css | 426 ++++++++++++++++++++++++++++++++- 2 files changed, 518 insertions(+), 36 deletions(-) diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index d810c4891..073eaf56b 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -23,9 +23,44 @@ a:hover.project_txt{ color:#066e9a;} .noline{ border-bottom:none;} .news_description{max-height: 360px;overflow:hidden; } .news_description_none{max-height: none;} +.wrapper {position:relative;} +.attachmentContainer {display:inline-block;} +.deadline {position:absolute; bottom:0px; display:inline-block; right:0px;} a.news_foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:600px; height:20px; padding-top:3px; cursor:pointer;} a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;} +/*右侧内容新*/ +.ctt2{clear:both; } +.hworkListBanner {width:720px; height:40px; background:#eaeaea; margin-bottom:10px; margin-left:5px;} +.hworkListContainer {float:left; clear:both; width:720px; margin-left:5px;} +.showHwork{ border:2px solid #269ac9; width:696px; padding:10px; color:#666666; padding-bottom:0px; } +.showHworkP{ width:630px; float:left;} +.showHwork ul li {margin-bottom: 5px;} +.hworkPingText{ float:left; border:1px solid #e4e4e4; padding:5px; width:618px; height:35px;} +.pingBox{ width:676px; padding:10px; background:#f5f3f3;} +.pingBoxTit{ float:left; width:625px; margin-left:10px;} +.pingText{border:1px solid #CCCCCC; margin:5px; padding:5px; width:610px; height:20px; } +.pingBackTit{ float:left; width:573px; margin-left:10px; } +.hworkUl{ height:50px; border-bottom:1px solid #eaeaea; line-height:50px; vertical-align:middle;} +.hworkListRow {height:65px; border-bottom:1px solid #eaeaea; line-height:65px; vertical-align:middle;} +.hworkListRow:hover {background-color:#f6f6f7; cursor:pointer;} +.hworkUl li{ float:left;} +.hworkListRow li{ float:left;} +.hworkList380 {width:375px; text-align:left; height:50px; line-height:50px;padding-left:5px;} +.hworkList80 {width:80px; text-align:center;} +.hworkList50 {width:50px; text-align:center;} +.codeList{ float:right; font-size:12px; color:#484848; padding:0px 3px; width:714px; margin-bottom:10px; } +.hworkName {width:380px; max-width:380px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:16px; line-height:16px;} +.hworkDetail {max-width:100px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:14px; line-height:14px; font-size:12px; color:#888888;} +.hworkDate {max-width:150px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:14px; line-height:14px; font-size:12px; color:#888888;} +.hworkMenu {width:100px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 20px; left:-110px; font-size:12px; color:#888888; display:none; line-height:2;} +a.hworkExport {background:url(../images/homepage_icon2.png) -10px -401px no-repeat; padding-left:23px;} +a.hworkSetting {background:url(../images/homepage_icon2.png) -10px -450px no-repeat; padding-left:23px;} +.hworkInfor {font-size:12px; color:#269ac9; width:80px; height:40px; vertical-align:middle; float:left; line-height:40px; text-align:center; font-weight:bold;} +.infoNi{ width:100px; padding:5px;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left; line-height:2; position:absolute; margin-top:-24px;margin-left: 40px;} +.problemTxt {width:660px; margin-left:10px; color:#777777; position:relative;} +.rTxtTit{width:560px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#269ac9; font-size:14px;} + /*邮件邀请*/ .box_main{ width:345px; margin:0 auto;} @@ -78,7 +113,7 @@ a:hover.talk_pic{border:1px solid #64bdd9;} a.talk_btn{ background:#64bdd9; width:50px; height:20px; color:#fff; text-align:center; margin-top:12px; padding-top:3px;} a:hover.talk_btn{ background:#2a9dc1;} /****讨论区内页***/ -.mt0{ margin-top:0px;} +.mt0{ margin-top:0px !important;} .talk_info{ color:#7d7d7d; margin-left:60px; margin-top:10px;} a.talk_edit{ color:#269ac9; margin-right:5px;} a:hover.talk_edit{ color:#297fb8;} @@ -101,6 +136,7 @@ a:hover.grey_btn{ background:#717171; color:#fff;} .f_b{ font-weight: bold;} .c_blue{ color:#64bdd9;} .c_grey{ color:#999999;} +a.c_grey{ color:#999999;} .c_grey02{ color:#666666;} .f_14{ font-size:14px;} .c_dblue{ color:#3e6d8e;} @@ -149,6 +185,7 @@ a.un_work_edit{color: white; display:block; padding:1px 5px; background-color: d .dis{display:block; } .undis{display:none;} .c_red{ color:#de030d;} +input.c_red {padding:0px; text-align:center; border:0;} .f_12{ font-size:12px;} .w_40{ width:40px; border:1px solid red;} .dis_ul{ height:70px; border-bottom:1px dashed #d4d4d4; margin-bottom:10px;} @@ -300,7 +337,7 @@ a:hover.tijiao{ background:#0f99a9;} .c_pink{ color:#e65d5e;} .ni_con_work { width:300px; margin:25px 20px;} .ni_con_work p{ color:#808181; } - +a.xls{ margin-left:5px; color:#136b3b;} /* 学生列表*/ .st_list{ width:670px;} .st_search{ } @@ -521,11 +558,10 @@ img.ui-datepicker-trigger { /*作业批次下拉*/ div#menu_r {height:41px; font-size:14px; font-weight:bold; margin-bottom:10px;} div#menu_r ul {float: left;} -div#menu_r ul.menu_r { background: #64bdd9; padding:0 10px; height:40px; } +div#menu_r ul.menu_r { background: #269ac9; padding:0 10px; height:40px; } div#menu_r li {position: relative; z-index: 9; margin: 0; display: block; float: left; } div#menu_r li:hover>ul { left: -2px;} div#menu_r a {position: relative;z-index: 10; height: 41px; display: block; float: left;line-height: 41px; text-decoration: none; font-size:14px; } -div#menu_r {display: block; cursor: pointer; background-repeat: no-repeat;background-position: 95% 0;padding-right: 15px; _padding-right: 20px;} div#menu_r ul a.parent {background: url(../images/item.png) -20px -30px no-repeat; width:60px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} div#menu_r ul a.parent:hover {background: url(../images/item.png) -20px -60px no-repeat;} div#menu_r ul ul a.parent {background: url(../images/item.png) -20px 6px no-repeat;} @@ -536,9 +572,9 @@ div#menu_r a { padding: 5px 12px 0 10px;line-height: 30px; color: #fff;} div#menu_r li.last { background: none; } /* menu::level2 */ div#menu_r ul ul li { background: none; } -div#menu_r ul ul { position: absolute;top: 38px; left: -999em; width: 90px; padding: 5px 0 0 0; background:#fff; border:1px solid #15bccf; margin-top:1px;} -div#menu_r ul ul a {padding: 0 0 0 15px; height: auto; float: none;display: block; line-height: 24px; font-size:12px; font-weight:normal;color:#15bccf;} -div#menu_r ul ul a:hover { background:#64bdd9; color:#fff;} +div#menu_r ul ul { position: absolute;top: 38px; left: -999em; width: 90px; padding: 5px 0 0 0; background:#fff; border:1px solid #269ac9; margin-top:1px;} +div#menu_r ul ul a {padding: 0 0 0 15px; height: auto; float: none;display: block; line-height: 24px; font-size:12px; font-weight:normal;color:#269ac9;} +div#menu_r ul ul a:hover { background:#297fb8; color:#fff;} div#menu_r ul ul li.last { margin-left:15px; } div#menu_r ul ul li {width: 100%;} @@ -553,7 +589,7 @@ a.wzan_visited{background:url(../images/new_project/public_icon.png) 0px -503px .newwork_btn a:hover{ background:#329cbd;} .files_tag{ width:670px; height:22px; overflow:hidden; margin-bottom:10px;} a.files_tag_icon{ background:#e2f3f9; color:#54aeca; border:1px solid #bbe2ef; padding:1px 10px; float:left; margin-right:10px;margin-bottom:10px; } -a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #64bdd9; padding:1px 10px; float:left; margin-right:10px;margin-bottom:10px;} +a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #bbe2ef; padding:1px 10px; float:left; margin-right:10px;margin-bottom:10px;} /* 20150423作业评分*/ .ml14{ margin-left:14px;} @@ -636,40 +672,40 @@ a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;} .t_c{ text-align:center;} .hwork_tit{ width:210px; float:left; } -.hwork_tit a{ width:205px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } -.hwork_tit_une{ width:270px; float:left; } -.hwork_tit_une a{ width:265px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } +.hwork_tit a{ width:255px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } +.hwork_tit02{ width:235px; float:left; } +.hwork_tit02 a{ width:230px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .hwork_code{ width:56px; text-align:center; } -.hwork_code02{ width:60px; text-align:center; } +.hwork_code02{ width:32px; text-align:center; } .hwork_tit_e{ width:420px; float:left; } .hwork_tit_e a{ width:405px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .hwork_num{ width:90px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;min-height: 1px;} .mr18{ margin-right:18px;} -a.hwork_center{ display:block; width:60px; margin-right:5px;overflow: hidden; white-space: nowrap; text-overflow:ellipsis;} -.hwork_name{ display:block;width:80px; overflow: hidden;white-space: nowrap; text-overflow:ellipsis;min-height: 1px;} -.absence_penalty{ display:block;width:45px; overflow: hidden;white-space: nowrap; text-overflow:ellipsis;min-height: 1px;} -.border_ce {border: 1px solid #e4e4e4;} +a.hwork_center{ display:block; width:60px; text-align:center; margin-right:5px;} .show_hwork{ border:2px solid #64bdd9; width:646px; padding:10px; color:#666666; padding-bottom:0px; } .show_hwork ul li{ margin-bottom:5px;} -.show_hwork_arrow{ position:relative; top:2px; left:25px;background:url(../images/course/arrow_up.jpg) 0 0 no-repeat; width:20px; height:11px;} +.show_hwork_arrow{ position:relative; top:2px; left:165px;background:url(../images/course/arrow_up.jpg) 0 0 no-repeat; width:20px; height:11px;} .tit_fb{ font-weight:bold; width:66px; text-align:right; display:block; float:left;} .ml160{ margin-left:160px;} .show_hwork_p{ width:580px; float:left;} -.hwork_ping_text{ float:left; border:1px solid #e4e4e4; padding:5px; width:568px; height:50px;} +.hwork_ping_text{ float:left; border:1px solid #e4e4e4; padding:5px; width:568px; height:35px;} .ping_box{ width:626px; padding:10px; background:#f5f3f3; } a.ping_pic{ display:block; width:34px; height:34px; padding:2px; border:1px solid #e3e3e3;} a:hover.ping_pic{border:1px solid #64bdd9;} .ping_box_tit{ float:left; width:575px; margin-left:10px;} .ping_box_ul{} .ping_line{ border-bottom:1px dashed #CCCCCC; padding-bottom:8px; margin-bottom:8px;} -.ping_text{border:1px solid #CCCCCC; margin:5px; padding:5px; width:560px; height:50px; } +.ping_text{border:1px solid #CCCCCC; margin:5px; padding:5px; width:560px; height:20px; } .ping_back_tit{ float:left; width:523px; margin-left:10px; } a.down_btn{ border:1px solid #CCC; color:#999; padding:0px 5px; font-size:12px; text-align:center; display:block;} a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;} -.min_search{ width:140px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 185px -193px no-repeat; } +.fr{ float:right;} +.min_search{ width:200px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 185px -193px no-repeat; cursor:pointer;} .li_min_search{ float:right; margin-right:-10px;} -.info_ni_download{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 200px;margin-top: 10px;} -.info_ni{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 50px;margin-top: -5px;} +.info_ni{ width:100px; padding:5px;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;} +.hwork_num{ width:90px; text-align:center; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.hwork_name{width:80px; text-align:center;} +.mr18{ margin-right:18px;} /*返回顶部*/ .to_top{width: 19px;height: 74px;position: fixed;top: 50px;right: 1px;color: white;background: #15bccf; line-height: 1.2; padding-top: 10px;padding-left: 5px;font-size: 14px;cursor: pointer;} .hwork_num_ab{ width:120px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;min-height: 1px;} @@ -678,6 +714,7 @@ a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;} .hwork_time_c{width:40px;color: #6d6d6d} .hwork_score{ width:62px; text-align:center; } .absence{width: 50px;text-align: center;} + /* 评分插件 */ input#score{ width:40px;} .ui-slider{position:relative;width:200px;float:left;margin-right:10px;height:14px; margin-top:2px;background:#e2e2e2; } @@ -685,12 +722,11 @@ input#score{ width:40px;} .ui-slider .ui-slider-handle:hover,.ui-slider .ui-slider-handle:focus{background:#64bdd9;} .ui-slider .ui-slider-handle:active{background-image:none;} .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;top:0;height:100%;background:#64bdd9;left:0;} - /* 编程作品 */ .border_ce{ border:1px solid #e4e4e4; } .border_ce tr td{ height:26px; } -.td_tit{width:170px; text-align:center;} -.td_50{width:60px; text-align:center;} +.td_tit{width:155px; text-align:center;} +.td_50{width:50px; text-align:center;} a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; font-weight:bold; white-space: nowrap; text-overflow:ellipsis;} .work_list_pro{ width:670px;} .border_l{border-left:1px solid #e4e4e4;} @@ -769,3 +805,45 @@ a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflo .ProResultUl li{ line-height:35px; border-bottom:1px solid #dddddd; } .DateBorder{border:1px solid #d9d9d9; border-left:none; padding:7px 6px 6px 6px;} .mb50{margin-bottom: 50px;} + +/* 课程主页 */ +.rside_nav{ background:#eaebec; padding:10px 10px;} +.rside_box{ width:730px; border:1px solid #e7edf0;} +.rside_top{ height:24px; background:#f5f8fa; border-bottom:1px solid #e7edf0; padding:8px 10px;} +.rside_work_list{margin:10px; border-bottom:1px dashed #e5e5e5;} +.imageWrapper {width:50px; height:auto; float:left; color:#999999; text-align:center;} +.img_blue_icon{ background:url(../images/course/icons.png) 0 -400px no-repeat; width:37px; height:18px; color:#fff; font-size:12px; padding-left:7px; color:#fff; } +.img_green_icon{ background:url(../images/course/icons.png) 0 -425px no-repeat; width:37px; height:18px; color:#fff; font-size:12px; padding-left:7px; color:#fff; } +a.rside_work_tit{ font-size:14px; font-weight:bold; color:#3e4040; max-width:430px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +a:hover.rside_work_tit{ color:#0781b4;} +.bgrey_icon{ color:#9b9b9b; border:1px solid #b6b6b6; background:#f0f0f0; font-size:12px; padding:0px 3px; } +.dgrey_icon{ color:#717171; border:1px solid #717171; font-size:12px; padding:0px 3px;} +.yellow_icon{ color:#ff5c60; border:1px solid #ff5c60; background:#ffffd5; font-size:12px; padding:0px 3px;} +.arrow_r{background:url(../images/course/icons.png) 0 -450px no-repeat; width:22px; height:13px; } +.c_dgreen{ color:#0e9e4f;} +.list_more{ text-align:center; margin:10px 0;} +.rside_massage_txt{ width:650px; margin-left:10px; } +a.massage_tit{ max-width:530px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +a.rside_name{ display:block; max-width:80px;} +.rside_talk_txt{ width:650px; margin-left:10px; color:#333;} +.rside_talk_tit{ color:#0781b4; width:490px; display:block; } +.rside_talkWrapArrow{ display:block; float:right; margin-right:10px;background:url(../images/course/arrow.png) 0 0 no-repeat; height:7px; width:13px;} +.rside_talkWrapBox{ width:650px; margin-left:60px; } +.rside_Msg_txt{ float:left; width:580px; margin-left:10px;} +.rside_talkWrapMsg{ background:#f2f2f2; padding:10px;} +.rside_talkWrapMsg ul li{} +.rside_inputFeint{ border:1px solid #d9d9d9; background:#fff; width:623px; height:40px; margin:10px; margin-bottom:5px;color:#666;} +a.icon_face{background:url(../images/public_icon.png) 0px -671px no-repeat; display:block; height:25px; width:40px; padding-left:25px; padding-top:3px; } +a:hover.icon_face{background:url(../images/public_icon.png) -79px -671px no-repeat; } +a.pro_mes_w{ height:20px; display:block; color:#999999;} +.info_list{ border-top:1px solid #F2F2F2; padding:5px 0;} +.info_list_r li{ height:20px;} +.pai_box{background:#fff; padding:10px 0 10px 10px;width:230px; color:#3e4040; } + +.rside_work_con{ width:650px;} +a.c_grey{ color:#999999;} +a:hover.c_grey{ color:#333;} +.link_file{ display:block; max-width:300px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.last_time{width:auto; text-align:right; margin-right:70px;} +.link_file_box{ width:360px;} + diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index e291e503a..4c5261e02 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -1,4 +1,5 @@ /* CSS Document */ +/* 2015-06-26 */ body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.5; background:#eaebec;} div,img,tr,td,table{ border:0;} @@ -8,9 +9,10 @@ a:link,a:visited{color:#7f7f7f;text-decoration:none;} a:hover,a:active{color:#000;} a:hover {text-decoration: none; } textarea {resize: none;} +.pInline {margin:0px; padding:0px; display:inline-block;} /*常用*/ -select,input,textarea{ border:1px solid #64bdd9; background:#fff; color:#000; padding-left:5px; } +select,input,textarea{ border:1px solid #269ac9; background:#fff; color:#000; padding-left:5px; } .sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; margin-bottom:10px; background:#dbdbdb;} .sub_btn:hover{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;} table{ background:#fff;} @@ -20,6 +22,7 @@ table{ background:#fff;} .no_border{ border:none;} .min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/new_project/public_icon.png) 135px -193px no-repeat;} a.btn_message_free{ background:#ff5722; display:block; text-align:center; color:#fff; padding:3px 0; width:80px; margin-bottom:10px;} +.db {display:block;} /* font & color */ h2{ font-size:18px; color:#15bccf;} h3{ font-size:14px; color:#e8770d;} @@ -28,6 +31,7 @@ h4{ font-size:14px; color:#3b3b3b;} .f14{font-size:14px;} .f16{font-size:16px;} .f18{font-size:18px;} +.f20{font-size:20px;} .fb{font-weight:bold;} .lh20{line-height:20px;} .lh22{line-height:22px;} @@ -49,6 +53,8 @@ h4{ font-size:14px; color:#3b3b3b;} .break_word{ word-break:break-all; word-wrap: break-word;} .hidden{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .flow_hidden{ width:300px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.white_space{white-space:nowrap;} +.pr {position:relative;} /* Spacing */ .ml2{ margin-left:2px;} @@ -71,10 +77,15 @@ h4{ font-size:14px; color:#3b3b3b;} .ml100{ margin-left:100px;} .ml110{ margin-left:110px;} .ml320{ margin-left:320px;} +.ml150 { margin-left:150px;} +.mr-5 {margin-right:-5px;} .mr5{ margin-right:5px;} +.mr45 {margin-right:45px;} +.mr55{ margin-right:55px;} .mr10{ margin-right:10px;} -.mr15 {margin-right: 15px;} +.mr15 {margin-right:15px;} .mr20{ margin-right:20px;} +.mr25 {margin-right:25px;} .mr30{ margin-right:30px;} .mr40{ margin-right:40px;} .mr45{margin-right: 45px;} @@ -82,22 +93,28 @@ h4{ font-size:14px; color:#3b3b3b;} .mr55{margin-right: 55px;} .mr70{margin-right: 70px;} .mw15{margin:0 15px;} -.mw20{margin:0 20px;} +.mw20{ margin: 0 20px;} .mt1{margin-top: 1px;} +.mt-4 {margin-top:-4px;} +.mt0 {margin-top:0px !important;} .mt3{ margin-top:3px;} .mt5{ margin-top:5px;} .mt8{ margin-top:8px;} -.mt10{ margin-top:10px;} +.mt10{ margin-top:10px !important;} .mt30{ margin-top: 30px;} +.mt12 { margin-top:12px;} +.mt15 {margin-top:15px;} +.mt19 {margin-top:19px !important;} +.mb4{ margin-bottom:4px;} .mb5{ margin-bottom:5px;} -.mb8{ margin-bottom:8px;} -.mb10{ margin-bottom:10px;} +.mb8 {margin-bottom:8px;} +.mb10{ margin-bottom:10px !important;} .mb20{ margin-bottom:20px;} .pl15{ padding-left:15px;} .w20{ width:20px;} .w40{width: 40px;} .w45{ width: 45px;} -.w50{ width:50px;} +.w50 {width:50px;} .w60{ width:60px;} .w70{ width:70px;} .w90{ width:90px;} @@ -107,6 +124,7 @@ h4{ font-size:14px; color:#3b3b3b;} .w280{ width:280px;} .w265{ width: 265px;} .w270{ width: 270px;} +.w350 {width:350px;} .w430{ width:470px;} .w520{ width:520px;} .w543{ width:543px;} @@ -122,6 +140,7 @@ h4{ font-size:14px; color:#3b3b3b;} .h50{ height:50px;} .h70{ height:70px;} .h150{ height:150px;} +.p10 {padding-left:10px; padding-right:10px;} /* Font & background Color */ a.b_grey{ background: #F5F5F5;} @@ -165,10 +184,46 @@ a.c_green{ color:#28be6c;} .b_green{background:#28be6c;} .b_w{ background:#fff;} +/*add by Tim*/ +.fontGrey {color:#cecece;} +.fontGrey2 {color:#888888;} +.fontGrey3 {color:#484848;} +.fontBlue {color:#3498db;} +a.underline {text-decoration:underline;} +a.fontBlue {color:#297fb8;} +a.fontGrey {color:#cecece;} +a.fontGrey2 {color:#888888;} +a.linkOrange {color:#ff7143;} +a.linkBlue {color:#269ac9;} +a.linkBlue:hover {color:#297fb8;} +a.linkBlue2 {color:#3498db;} +a.linkBlue2:hover {color:#297fb8;} +a.buttonBlue {background-color:#269ac9;} +a.buttonBlue:hover {background-color:#297fb8;} +a.linkGrey {color:#484848;} +a.linkGrey:hover {color:#269ac9;} +a.linkGrey2 {color:#888888;} +a.linkGrey2:hover {color:#484848;} +a.linkGrey3 {color:#484848;} +a.linkGrey3:hover {color:#000000;} +a.linkGrey4 {color:#484848;} +a.linkGrey4:hover {color:#297fb8;} +a.linkGrey5 {color:#484848;} +a.linkGrey5:hover {color:#3498db;} +a.linkGrey6 {color:#484848 !important;} +a.linkGrey6:hover {color:#ffffff !important;} +a.bBlue {background-color:#3498db;} +a.bBlue:hover {background-color:#297fb8;} +a.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;} +a.submit_btn:hover {background-color:#3498db; color:#ffffff;} + /* commonBtn */ .grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;} a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;} a:hover.grey_btn{ background:#717171; color:#fff;} +.grey_n_btn{ background:#d9d9d9; color:#656565; font-weight:normal;padding:2px 10px; text-align:center;} +a.grey_n_btn{background:#d9d9d9; color:#656565;font-weight:normal; padding:2px 10px; text-align:center;} +a:hover.grey_n_btn{ background:#717171; color:#fff;} .green_btn{ background:#28be6c; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;} a.green_btn{background:#28be6c;color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;} a:hover.green_btn{ background:#14ad5a;} @@ -196,6 +251,15 @@ a:hover.blue_u_btn{background:#64bdd9; color:#fff;} .blue_n_btn{ background:#64bdd9; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;} a.blue_n_btn{background:#64bdd9;color:#fff;font-weight:normal; padding:2px 10px; text-align:center;} a:hover.blue_n_btn{ background:#329cbd;} +.green_n_btn{background:#3cb761; padding:2px 10px; color:#fff;} +a.green_n_btn{background:#3cb761; padding:2px 10px; color:#fff;} +a:hover.green_n_btn{ background:#14ad5a;} +.orange_n_btn{background:#ff5d31; padding:2px 10px; color:#fff;} +a.orange_n_btn{background:#ff5d31; padding:2px 10px; color:#fff;} +a:hover.orange_n_btn{background:#d63502;} +.bgreen_n_btn{background:#1abc9c; padding:2px 10px; color:#fff;} +a.bgreen_n_btn{background:#1abc9c; padding:2px 10px; color:#fff;} +a:hover.bgreen_n_btn{background:#08a384;} .nolink_btn{ background:#BCBCBC; color: #fff; padding:2px 5px;} .more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;} @@ -225,7 +289,7 @@ a:hover.blue_n_btn{ background:#329cbd;} /*框架主类容*/ -#Container{ width:940px; margin:0 auto; } +#Container{ width:1000px; margin:0 auto; } /*头部导航*/ #Header{ margin:10px 0; background:#15bccf; height:40px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; } @@ -234,6 +298,18 @@ a:hover.blue_n_btn{ background:#329cbd;} #TopNav ul li{ margin-top:8px;} .topnav_a a{ font-size:14px; font-weight:bold; color:#fff; margin-right:10px;} .topnav_a a:hover{color: #a1ebff;} +#userInfo {float:right; display:inline-block; width:130px; padding-top:5px;} +.userInfoRow2 {margin-top:-5px;} +.myPractice {display:inline-block;} +a.parent {background: url(../images/arrowList.png) -30px 3px no-repeat; width:95px; padding-right:50px;} +a.parent:hover {background: url(../images/arrowList.png) -30px -14px no-repeat; width:95px; padding-right:50px; color:#fe7d68;} +a.linkToOrange:hover {color:#fe7d68;} +#userInfo ul li {positon: relative;} +#userInfo ul li ul {display:none;} +#userInfo ul li:hover ul {display:block; position:absolute;} +#userInfo ul li:hover ul li ul {display:none;} +#userInfo ul li:hover ul li:hover ul {display:block; position:absolute; left:110px; top:6px; width:148px; border:1px solid #15bccf; background-color:#ffffff; padding:5px 0px;} +#userInfo ul li:hover ul li:hover ul li {max-width:148px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block; padding: 0 10px; line-height:1.5; color:#15bccf;} #TopUser{} #TopUser ul li{ margin-top:8px;} .topuser_a a{ font-size:14px; font-weight:bold; color:#fff; margin-right:10px;} @@ -275,6 +351,22 @@ div#menu ul ul li {width: 100%;} div#menu ul ul ul {padding: 0;margin: -38px 0 0 90px !important; width:200px; } div#menu ul ul ul li a{ width:185px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf;} +/*myctrip*/ +.userImage{position:absolute; right:140px; top:5px; width:30px;height:30px; background: url(../images/item.png) 2px 4px no-repeat; line-height:1.4;} +a.topnav_login_a{color:#fff; display:inline-block;} +a.topnav_login_a:hover {color:#a1ebff;} +a.topnav_login_mes{color:#fff; width:10px;height:20px; padding-left:15px; background: url(../images/item.png) -84px -145px no-repeat; display:inline-block; vertical-align:top;} +a.topnav_login_mes:hover {color:#a1ebff;} +a.topnav_login_box{ color:#fff; font-size:14px; font-weight:bold; width:90px; display:inline-block;} +.menuArrow {background:url(../images/item.png) -20px -40px no-repeat;} +li.menuArrow:hover {background:url(../images/item.png) -20px -70px no-repeat;} +a.topnav_login_box:hover {color:#a1ebff;} +.navRow1 {margin:0; padding:0;} +.navRow2 {margin:0; padding:0;} +.topnav_login_list{ border:1px solid #269ac9; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2;} +.topnav_login_list a{color:#15bccf;} +.topnav_login_list li{ } + /*主类容*/ #Main{ background:#fff; margin-bottom:10px;} #content{} @@ -294,10 +386,322 @@ a:hover.search_btn{ background: #0fa9bb;} #RSide{ width:670px; margin-left:10px; background:#fff; padding:10px; margin-bottom:10px;} +/*资源库*/ +.resources {width:728px; background-color:#ffffff; padding:10px 10px 20px 10px; border:1px solid #dddddd;} +.resourcesBanner {width:730px; height:40px; background-color:#eaeaea; margin-bottom:10px;} +.bannerName {background:#64bdd9; color:#ffffff; height:40px; line-height:40px; width:90px; text-align:center; font-weight:normal; vertical-align:middle; font-size: 16px; float:left;} +.resourcesSelect {width:30px; height:34px; float:right; position:relative; margin-top:-6px;} +.resourcesSelected {width:25px; height:20px; position:relative; background:url(../images/resource_icon_list.png) 0px 0px no-repeat;} +.resourcesSelected:hover { background:url(../images/resource_icon_list.png) 0px -25px no-repeat;} +.resourcesIcon {margin-top:15px; display:block; width:25px; height:20px;} +.resourcesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 20px; left:-90px; font-size:12px; color:#888888; display:none; line-height:2;} +a.resourcesTypeAll {background:url(../images/homepage_icon.png) -180px -89px no-repeat; padding-left:23px;} +a.resourcesTypeAtt {background:url(../images/homepage_icon.png) -180px -49px no-repeat; padding-left:23px;} +a.resourcesGrey {font-size:12px; color:#888888;} +a.resourcesGrey:hover {font-size:12px; color:#269ac9;} +.resourcesBanner ul li:hover ul.resourcesType {display:block;} +ul li:hover ul {display:block;} +.resourcesUploadBox {float:right; width:103px; height:34px; background-color:#269ac9; line-height:34px; vertical-align:middle; text-align:center; margin-left:12px;} +.resourcesUploadBox:hover {background-color:#297fb8;} +a.uploadBoxIcon {background:url(../images/resource_icon_list.png) -35px 10px no-repeat; float:left; display:block; width:81px; height:30px; padding-left:22px; font-size:14px; color:#ffffff;} +.resourcesSearchloadBox {border:1px solid #e6e6e6; width:225px; float:left; background-color:#ffffff;} +.searchResource {border:none; outline:none; background-color:#ffffff; width:184px; height:32px; padding-left:10px; display:block; float:left;} +.searchIcon{width:31px; height:32px; background-color:#ffffff; background:url(../images/resource_icon_list.png) -40px -15px no-repeat; display:block; float:left;} +.resourcesSearchBanner {width:710px; height:34px; margin-bottom:10px; margin-top:15px; margin-left:auto; margin-right:auto;} +.resourcesListTab {width:710px; height:40px; background-color:#f6f6f6; border-bottom:1px solid #eaeaea; font-size:14px; color:#7a7a7a; margin-left:auto; margin-right:auto;} +.resourcesListCheckbox {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle;} +.resourcesCheckbox {padding:0px; margin:0px; margin-top:14px; width:12px; height:12px;} +.resourcesListName {width:160px; height:40px; line-height:40px; text-align:left;} +.resourcesListSize {width:105px; height:40px; line-height:40px; text-align:center;} +.resourcesListType {width:150px; height:40px; line-height:40px; text-align:center;} +.resourcesListUploader {width:180px; height:40px; line-height:40px; text-align:center;} +.resourcesListTime {width:95px; height:40px; line-height:40px; text-align:center;} +.resourcesList {width:710px; height:39px; background-color:#ffffff; border-bottom:1px dashed #eaeaea; color:#9a9a9a; font-size:12px; margin-left:auto; margin-right:auto;} +.resourcesListOption {width:710px; height:40px; line-height:40px; vertical-align:middle; margin-left:auto; margin-right:auto; background-color:#f6f6f6;} +.resourcesCheckAll {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle; float:left;} +.resourcesSelectSend {float:right;} +.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; margin-top:5px; margin-right:10px; margin-left:15px; text-align:center; border:1px solid #269ac9; border-radius:5px; float:right;} +a.sendButtonBlue {color:#269ac9;} +a.sendButtonBlue:hover {color:#ffffff;} +.resourcesSelectSendButton:hover {background-color:#297fb8;} +a.resourcesBlack {font-size:12px; color:#4c4c4c;} +a.resourcesBlack:hover {font-size:12px; color:#000000;} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 80px; + padding: 5px 0; + margin: 2px 0 0; + font-size: 12px; + text-align: left; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); + box-shadow: 0 6px 12px rgba(0, 0, 0, .175); +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.5; + color:#616060; + white-space: nowrap; +} +.dropdown-menu > li > a:hover{ + color: #ffffff; + text-decoration: none; + background-color: #64bdd9; + outline:none; +} + +/*发送资源弹窗*/ +/*.resourceShareContainer {width:100%; height:100%; background:#666; filter:alpha(opacity=50); opacity:0.5; -moz-opacity:0.5; position:absolute; left:0; top:0; z-index:-999;}*/ +.resourceSharePopup {width:300px; height:auto; border:3px solid #269ac9; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-150px; z-index:1000;} +.sendText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; width:100px; display:inline-block; font-weight:bold;} +.resourcesSendTo {float:left; height:20px; margin-top:15px;} +.resourcesSendType {border:1px solid #e6e6e6; width:60px; height:24px; outline:none; font-size:14px; color:#888888;} +.resourcePopupClose {width:20px; height:20px; display:inline-block; float:right;} +.resourceClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block;} +.resourcesSearchBox {border:1px solid #e6e6e6; width:225px; height:25px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;} +.searchResourcePopup {border:none; outline:none; background-color:#ffffff; width:184px; height:25px; padding-left:10px; display:inline-block; float:left;} +.courseSend {width:260px; height:15px; line-height:15px; margin-bottom:10px;} +.courseSendCheckbox {padding:0px; margin:0px; width:12px; height:12px; margin-right:10px; display:inline-block; margin-top:2px;} +.sendCourseName {font-size:12px; color:#5f6060;} +.courseSendSubmit {width:50px; height:25px; line-height:25px; text-align:center; vertical-align:middle; background-color:#269ac9; margin-right:25px; float:left;} +.courseSendSubmit:hover {background-color:#297fb8;} +.courseSendCancel {width:50px; height:25px; line-height:25px; text-align:center; vertical-align:middle; background-color:#c1c1c1; float:left} +.courseSendCancel:hover {background-color:#717171;} +.courseReferContainer {float:left; max-height:120px; overflow:scroll; overflow-x:hidden; margin-right:16px; margin-bottom:10px;} +a.sendSourceText {font-size:14px; color:#ffffff; display:block;} + +/*上传资源弹窗*/ +.resourceUploadPopup {width:400px; height:auto; border:3px solid #269ac9; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-200px; z-index:1000;} +.uploadText {font-size:16px; color:#269ac9; line-height:16px; padding-top:15px; width:140px; display:inline-block;} +.uploadBoxContainer {height:33px; line-height:33px; margin-top:10px; position:relative;} +.uploadBox {width:100px; height:33px; line-height:33px; text-align:center; vertical-align:middle; background-color:#269ac9; border-radius:3px; float:left; margin-right:12px;} +.uploadBox:hover {background-color:#297fb8;} +a.uploadIcon {background:url(../images/resource_icon_list.png) 8px -60px no-repeat; width:100px; height:33px; display:block;} +.chooseFile {color:#ffffff; display:block; margin-left:32px;} +.uploadResourceIntr {width:250px; height:33px; float:left; line-height:33px; font-size:12px;} +.uploadResourceName {width:250px; display:inline-block; line-height:15px; font-size:12px; color:#444444; margin-bottom:2px;} +.uploadResourceIntr2 {width:250px; display:inline-block; line-height:15px; font-size:12px; color:#444444;} +.uploadType {margin:10px 0; border:1px solid #e6e6e6; width:100px; height:30px; outline:none; font-size:12px; color:#888888;} +.uploadKeyword {margin-bottom:10px; outline:none; border:1px solid #e6e6e6; height:30px; width:280px;} + +/*评分设置弹窗*/ +.markPopup {width:290px; height:auto; border:3px solid #269ac9; padding:0px 0px 15px 15px; background-color:#ffffff; z-index:1000;} +.markInput {margin-bottom:10px; outline:none; border:1px solid #e6e6e6; height:30px; width:95px; color:#3d3c3c;} +.markPercentage {margin:10px 0; border:1px solid #e6e6e6; width:60px; height:30px; outline:none; font-size:12px; color:#3d3c3c;} + + +/*新个人主页框架css*/ +.navContainer {width:100%; margin:0 auto; background-color:#269ac9;} +.homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;} +.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;} +.navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;} +.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;} +.navHomepageMenu {margin-right:20px; display:inline-block;height:54px; line-height:54px; vertical-align:middle;} +.navHomepageMenu:hover {background-color:#297fb8;} +.navHomepageSearchBoxcontainer {margin-top:11px; } +.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; background-color:#ffffff;} +.navHomepageSearchInput {width:345px; height:32px; outline:none; border:none; float:left; padding-left:5px;; margin:0;} +.homepageSearchIcon {width:30px; height:32px; background:url(../images/nav_icon.png) -8px 3px no-repeat; float:left;} +a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-repeat;} +.navSearchTypeBox {width:368px; height:35px; line-height:35px; vertical-align:middle; position:absolute; border:1px solid #98a1a6; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px; top:43px;} +#navSearchAlert {display:none;} +.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;} +.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;} +.newsActive {width:8px; height:8px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;} +.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;} +.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block;} +.homepageProfileMenuIcon:hover {background:url(../images/nav_icon.png) 30px -122px no-repeat;} +.navHomepageProfile ul li ul {display:none;} +.navHomepageProfile ul li:hover ul {display:block;} +.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px; margin-top:15px;} +.homepageRight {width:750px; float:left; margin-top:15px; margin-bottom:10px;} +.homepagePortraitContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; padding-bottom:15px;} +.homepagePortraitImage {width:206px; height:206px; padding:2px; margin:15px 14px 10px 14px; position:relative; border:1px solid #cbcbcb;} +.homepagePortraitImage:hover {border:1px solid #297fb8;} +.homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;} +.homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;} +.homepageEditProfile {width:16px; height:16px; border-radius:2px; background-color:#888888; position:absolute; right:5px; bottom:5px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;} +.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -14px -37px no-repeat; width:16px; height:16px; display:block;} +.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:25px; float:left;} +.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;} +.homepageImageSex2 {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -150px no-repeat; float:left;} +.homepageSignature {font-size:12px; color:#888888; margin-left:15px; margin-top:10px; margin-bottom:12px; width:208px;} +.homepageImageBlock {margin:0 auto; width:68px; float:left; text-align:center; display:inline-block;} +.homepageImageNumber {font-size:12px; color:#484848; font-weight:bold;} +a.homepageImageNumber:hover {color:#15bccf;} +.homepageImageText {font-size:12px; color:#888888;} +.homepageVerDiv {height:28px; vertical-align:middle; width:1px; float:left; display:inline-block; background-color:#d1d1d1; margin-top:3px;} +.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;} +.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;} +.homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;} +.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;} +.homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;} +a.coursesLineGrey {color:#15bccf; display:block;} +a.coursesLineGrey:hover {color:#ffffff;} +.homepageLeftMenuMore {height:18px;} +.homepageLeftMenuMore:hover {background-color:#b3e0ee;} +.homepageLeftMenuMoreIcon {background:url(../images/homepage_icon.png) -74px -240px no-repeat; display:block; height:18px;} +.homepageMenuSetting {display:inline-block; margin-left:155px;} +a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;} +.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;} +.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;} +.homepageRightBanner {width:720px; height:34px; margin:0px auto; border-bottom:1px solid #e9e9e9;} +.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; width:150px; float:left; margin-top:4px;} +.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;} +.newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;} +.homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;} +.homepageNewsPortrait {width:40px; display:block; margin-top:7px;} +.homepageNewsPublisher {width:80px; max-width:80px; margin-right:10px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } +.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;} +.homepageNewsContent {width:395px; max-width:395px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } +.homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;} +a.homepageWhite {color:#ffffff;} +a.homepageWhite:hover {color:#a1ebff} +a.newsGrey {color:#4b4b4b;} +a.newsGrey:hover {color:#000000;} +a.replyGrey {color:#888888; display:inline-block;} +a.replyGrey:hover {color:#4b4b4b;} +a.newsBlue {color:#269ac9;} +a.newsBlue:hover {color:#297fb8;} +a.menuGrey {color:#808080;} +a.menuGrey:hover {color:#fe7d68;} + +/*个人主页右部分*/ +.homepagePostType {width:180px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-170px; font-size:12px; color:#4b4b4b; line-height:2; z-index:9999; display:none;} +.homepagePostTypeHomework {width:100px;} +.homepagePostTypeProject {width:80px;} +a.homepagePostTypeAssignment {background:url(../images/homepage_icon.png) -93px -318px no-repeat; padding-left:23px;} +a.homepagePostTypeNotice {background:url(../images/homepage_icon.png) -87px -280px no-repeat; padding-left:23px;} +a.homepagePostTypeForum {background:url(../images/homepage_icon.png) -10px -310px no-repeat; padding-left:23px;} +a.homepagePostTypeQuiz {background:url(../images/homepage_icon.png) -90px -124px no-repeat; padding-left:23px;} +a.homepagePostTypeQuestion {background:url(../images/homepage_icon.png) -10px -273px no-repeat; padding-left:23px;} +a.homepagePostTypeAll {background:url(../images/homepage_icon.png) -10px -360px no-repeat; padding-left:23px;} +a.postTypeGrey {color:#888888;} +a.postTypeGrey:hover {color:#269ac9;} +.homepagePostBrief {width:710px; margin:20px auto 0px auto; position:relative;} +.homepagePostPortrait {float:left; width:90px;} +.homepagePostDes {float:left; width:600px; margin-left:20px;} +.homepagePostTo {font-size:14px; color:#484848; margin-bottom:8px;} +.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:10px; font-weight:bold;} +.homepagePostSubmitContainer {height:30px; margin-bottom:10px;} +.homepagePostSubmit {font-size:14px; color:#888888; width:80px; height:30px; text-align:center; vertical-align:middle; line-height:30px; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px;} +.homepagePostSubmit:hover {background-color:#d8d8d8;} +.homepagePostIntro {font-size:14px; color:#484848;} +.homepagePostDeadline {font-size:12px; color:#888888; float:left; height:30px; line-height:30px; vertical-align:middle;} +.homepagePostReply {width:720px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;} +.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;} +.borderBottomNone {border-bottom:none !important;} +.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;} +.homepagePostReplyBannerTime{width:85px; display:inline-block;} +.homepagePostReplyBannerMore{width:330px; display:inline-block; text-align:right;} +.homepagePostReplyInputContainer {width:690px; margin:0px auto;} +.homepagePostReplyInput {width:680px; height:40px; max-width:680px; max-height:40px; border:1px solid #d9d9d9; outline:none; margin:15px auto 10px auto; padding-left:8px; padding-top:5px;} +.homepagePostReplyEmotion {background:url(../images/homepage_icon.png) -90px -88px no-repeat; width:50px; height:24px; float:left; padding-left:30px;} +.homepagePostReplySubmit {float:right; width:45px; height:24px; text-align:center; line-height:24px; vertical-align:middle; font-size:12px; color:#ffffff; background-color:#269ac9;} +.homepagePostReplySubmit:hover {background-color:#297fb8;} +a.postReplySubmit {color:#ffffff; display:block;} +.homepagePostReplyCancel {float:right; width:45px; height:24px; text-align:center; line-height:24px; vertical-align:middle; font-size:12px; color:#888888; background-color:#cecece; margin-left:8px;} +.homepagePostReplyCancel:hover {background-color:#717171;} +a.postReplyCancel {color:#888888; display:block;} +a.postReplyCancel:hover {color:#ffffff;} +.homepagePostReplyInputContainer2 {width:620px; margin:0px auto;} +.homepagePostReplyInput2 {width:610px; height:25px; max-width:610px; max-height:25px; border:1px solid #d9d9d9; outline:none; margin:0px auto 10px auto; padding-left:8px; padding-top:5px;} +.homepagePostReplyContainer {border-bottom:1px solid #e3e3e3; width:690px; margin:0px auto; margin-top:15px; min-height:60px;} +.homepagePostSetting {position:absolute; width:20px; height:20px; right:0px; top:0px;} +.homepagePostSettingIcon {background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px;} +.homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;} +.homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;} +a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;} +a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;} +.homepagePostReplyPortrait {float:left; width:45px;} +.homepagePostReplyDes {float:left; width:620px; margin-left:15px;} +.homepagePostReplyPublisher {font-size:12px; color:#484848; margin-bottom:5px;} +.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;} +.homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} +.homepagePostAssignTo {float:left; font-size:14px; color:#15bccf; height:30px; line-height:30px; vertical-align:middle;} +.homepagePostFileAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -85px -150px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;} +.homepagePostImageAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -86px -195px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;} +.postAttSize {color:#888888; font-size:12px;} +a.postGrey {color:#484848;} +a.postGrey:hover {color:#000000;} + +/*课程主页css*/ +.homepageCoursesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-65px; font-size:12px; color:#4b4b4b; line-height:2; z-index:9999; display:none;} + +/*注册登陆页面*/ +#loginInBox {display:block; margin-top:143px;} +#signUpBox {display:none; margin-top:79px;} +#loginSignButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;} +#loginInButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;} +#loginSignButton:hover {background-color:#297fb8;} +#loginInButton:hover {background-color:#297fb8;} +.loginContentContainer {width:100%; background-color:#269ac9; margin-top:1px; height:580px;} +.loginContent {width:1000px; margin:0px auto;} +.loginLeft {width:595px; float:left;} +.loginLogo {padding-left:208px; padding-top:155px;} +.loginInro {width:465px; padding-top:55px; padding-left:50px; font-size:16px; color:#ffffff;} +.loginRight {width:405px; float:left;} +.loginChooseBox {width:405px; height:54px; background-color:#ffffff; padding-top:18px;} +.loginChooseList {width:350px; height:30px; font-size:14px; margin:0px auto;} +.loginChoose {width:55px; height:30px; border-bottom:1px solid #269ac9; text-align:center; font-weight:bold;} +a.loginChooseTab {color:#484848; height:30px; display:block;} +.loginInButton {width:315px; height:40px; background-color:#269ac9; margin-left:46px; font-size:14px; text-align:center; line-height:40px; vertical-align:middle; margin-top:20px;} +.loginInButton:hover {background-color:#297fb8;} +.loginUpButton {width:315px; height:40px; background-color:#269ac9; margin-left:46px; font-size:14px; text-align:center; line-height:40px; vertical-align:middle; margin-top:30px;} +.loginUpButton:hover {background-color:#297fb8;} +.loginChooseBorder {width:295px; height:30px; border-bottom:1px solid #e3e3e3;} +.loginSign {width:405px; background-color:#ffffff;} +.loginSignBox {width:308px; height:38px; margin-left:46px; border:1px solid #98a1a6; outline:none;} +.loginSignOption {margin-left:46px; margin-top:15px;} +.loginIn {width:405px; background-color:#ffffff; padding-bottom:30px;} +.loginSignAlert {font-size:12px; color:#fc0000; margin-left:60px;} +.loginSignRow {height:60px; min-height:60px;} + +/*课程选择弹窗*/ +.coursesChoosePopup {width:530px; height:auto; border:3px solid #269ac9; padding-left:20px; padding-bottom:35px; background-color:#ffffff; position:absolute; top:0; left:0; z-index:1000;} +.coursesSearchBox {border:1px solid #e6e6e6; width:515px; height:25px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;} +.searchCoursesPopup {border:none; outline:none; background-color:#ffffff; width:470px; height:25px; padding-left:10px; display:inline-block; float:left;} +.searchIconPopup{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon.png) -180px -273px no-repeat; display:inline-block; float:left;} +.searchIconPopup:hover {background:url(../images/homepage_icon.png) -180px -314px no-repeat;} + +/*导入作业弹窗*/ +.homeworkPublish {width:260px; height:15px; line-height:15px;} +.homeworkPublishTime {font-size:12px; color:#b1b1b1; margin-left:22px; margin-bottom:8px;} + +/*引用资源库弹窗*/ +.referenceResourcesPopup {width:710px; height:auto; border:3px solid #269ac9; padding-left:20px; padding-right:20px; padding-bottom:35px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-375px; z-index:1000;} +.referenceText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; display:inline-block; font-weight:bold;} +.referenceSearchBox {border:1px solid #e6e6e6; width:235px; height:32px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;} +.searchReferencePopup {border:none; outline:none; background-color:#ffffff; width:190px; height:32px; padding-left:10px; display:inline-block; float:left;} +.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon.png) -170px -135px no-repeat; display:inline-block; float:left;} +.referenceSearchIcon:hover {background:url(../images/homepage_icon.png) -170px -190px no-repeat;} +.referenceResourceType {font-size:14px; width:355px; height:34px; line-height:34px; vertical-align:middle; background-color:#f6f6f6; margin-top:15px;} +.referenceTypeActive {background-color:#269ac9; color:#ffffff !important;} +a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;} + + + /*底部*/ -#Footer{ padding-top:10px; background:#fff; margin-bottom:10px;} -.copyright{ width:780px; margin:0 auto;height:30px; } -.footlogo{ width:580px; margin:0 auto;height:50px; } +#Footer{background-color:#ffffff; margin-bottom:10px; padding-bottom:15px; color:#666666;} +.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} +.footerAbout{ width:585px; margin:0 auto;height:35px; line-height:35px; border-bottom:1px solid #efefef; } +.languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;} +.departments{ width:890px; margin:5px auto 0 auto;height:30px;line-height:30px;} +.copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;} +a.f_grey {color:#666666;} +a.f_grey:hover {color:#000000;} /*意见反馈*/ html{ overflow-x:hidden;} .scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; } From a184ab4b696d1404b32bf89da9d370c34ac67f7b Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 16 Sep 2015 15:40:05 +0800 Subject: [PATCH 19/58] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=8F=AA=E6=98=BE=E7=A4=BA=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E5=8A=A8=E6=80=81=E7=9A=84=E5=9B=9E=E5=A4=8D=E6=A1=86?= =?UTF-8?q?=EF=BC=8C=E5=85=B6=E5=AE=83=E7=9A=84=E9=9C=80=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=89=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_message.html.erb | 4 ++-- app/views/users/_course_news.html.erb | 4 ++-- app/views/users/_project_issue.html.erb | 4 ++-- app/views/users/_project_message.html.erb | 4 ++-- app/views/users/_user_activities.html.erb | 17 +++++++++++------ 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 114852a06..395afea53 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -49,7 +49,7 @@
          <% count=0 %> -
          回复( +
          回复( <% if activity.parent %> <% count=activity.parent.children.count%> <% else %> @@ -67,7 +67,7 @@ <% end %>
          -
          +
          <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index 54c1fd51d..f92b4e6b2 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -27,7 +27,7 @@
          <% count=activity.comments.count %> -
          +
          回复(<%= count %>)
          <%#= format_date(activity.updated_on) %>
          @@ -40,7 +40,7 @@ <% end %>
          -
          +
          <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 0413d6811..afe7560be 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -67,7 +67,7 @@
          <% count = activity.journals.count %> -
          回复(<%= count %>)
          +
          回复(<%= count %>)
          <%#= format_date(activity.updated_on) %>
          <% if count > 2 %>
          @@ -78,7 +78,7 @@ <% end %>
          -
          +
          <%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%> diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index ac96ee562..918a11bb2 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -39,7 +39,7 @@
          <% count = 0 %> -
          回复( +
          回复( <% if activity.parent %> <% count=activity.parent.children.count%> <% else %> @@ -53,7 +53,7 @@ <% end %>
          -
          +
          <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index 6955f5f69..443dbf3d5 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -10,6 +10,7 @@ div.ke-toolbar .ke-outline{border:none;} .ke-inline-block{display: none;} +<% first_user_activity = user_activities.first.id %> <% user_activities.each do |user_activity| if user_activities %> -
          - -
          - - -
          -
          -
          -
            -
          • 全部作品
          • -
          • 作业信息
          • -
          -
          -
          - -
          -
          -
          - - <%= link_to "所有作品(#{@stundet_works.count})".html_safe,student_work_index_path(:homework => @homework.id), :class => "fl"%> - - <% if @show_all%> - - <%= select_tag(:late_penalty,options_for_select(course_group_list(@course),@group), {:class => "fl h22 w100 ml10"}) if(@is_teacher && course_group_list(@course).count > 0) %> - 搜索 - <%= link_to("缺评情况",student_work_absence_penalty_student_work_index_path(:homework => @homework.id), :class => "student_work_search fl", :target => "_blank") if((@is_teacher || User.current.admin?) && @homework.homework_type == 1) %> - <% end%> - <% if @is_teacher%> -
          - <% unless @homework.homework_type == 2%> - <% if @homework.student_works.empty?%> - <%= link_to "附件", "javascript:void(0)", class: "down_btn fr zip_download_alert", :onclick => "alert('没有学生提交作业,无法下载附件')" %> - <% else%> - <%= link_to "附件", zipdown_assort_path(obj_class: @homework.class, obj_id: @homework, format: :json), - remote: true, class: "down_btn fr zip_download_alert", :id => "download_homework_attachments" %> - <% end%> -
          - 使用 - winzip - 工具进行解压可能会导致 - 下载文件乱码 - ,建议您使用 - winrar - 工具进行解压 -
          - <% end%> - <%= link_to("匿评", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr') if @homework.homework_type == 1%> - <%= link_to("缺评", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr') if @homework.homework_type == 1%> - <%= link_to l(:label_list), student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'down_btn fr'%> - 导出全部: -
          - <% end%> + +
          + +
          -
          -
          - - <% if @is_evaluation%> -
            - <%= render :partial => 'evaluation_work_title'%> -
          -
          - <% @stundet_works.each do |student_work|%> - <%= render :partial => "evaluation_work",:locals => {:student_work => student_work}%> -
          - <% end%> - <% else %> - <% if @homework.homework_type == 1 || @homework.homework_type == 2%> -
            - <%= render :partial => 'evaluation_student_work_title'%> -
          +
          +
          +
          +
          +
          + + 所有作品 + [共199份] + + +
          + + +
          - <% @stundet_works.each do |student_work|%> - <%= render :partial => "evaluation_student_work",:locals => {:student_work => student_work}%> -
          - <% end%> - <% else%> -
            - <%= render :partial => 'student_work_title'%> -
          +
          + +
          +
            +
          • + 作品信息 +
          • +
          • + 教师评分 + +
          • +
          • + 教辅评分 + +
          • +
          • + 系统评分 + +
          • +
          • + 匿评 + +
          • +
          • + 成绩 + +
          • +
          +
          + +
          +
            +
          • + +
          • +
          • 90
          • +
          • --
          • +
          • --
          • +
          • 100(3) +
          • +
          • 90
          • - <% @stundet_works.each do |student_work|%> - <%= render :partial => "student_work",:locals => {:student_work => student_work}%> -
            - <% end%> - <% end%> - <% end%> -
            -
          - -
          -
          - <%= link_to(image_tag(url_to_avatar(@homework.user), :width => "42", :height => "42"), user_path(@homework.user), :class => "problem_pic fl") %> -
          -

          - <%= @homework.name%> -

          - <% if @is_teacher%> - <%#= homework_anonymous_comment(@homework)%> - <% else%> - <%= student_anonymous_comment @homework %> - <%= student_new_homework @homework %> - <% end %> -
          +
        + +
        -
        - <%= @homework.description.html_safe %> + +
        + + + +
        +
        -
        - - <% if @homework.homework_type == 2 && @homework.homework_detail_programing%> - <% if @is_teacher%> - - - "> - - - - <% @homework.homework_tests.each do |test|%> - "> - - - - <% end%> - -
        - 输入 - - 输出 -
        - <%=test.input%> - - <%= test.output%> -
        -
        - <% end%> + -
        - 开发语言: -
        - <% if @homework.homework_detail_programing.language.to_i == 1%> - C - <% elsif @homework.homework_detail_programing.language.to_i == 2%> - C++ - <% end%> +
        +
        +
        +

        请以下同学重新提交作业ppt,只要更新附件,不要删除作否则否则否则评分就丢了

        +
        + +
        +
        +

        项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题

        + [展开] +
        + 截止时间:2015-04-02 +
        +
        + + 天 + + 小时 + + 分 + + 秒 +
        +

        作业提交还剩:

        +
        - <% end%> +
        + -
        - <% unless @homework.attachments.empty?%> - 附件: -
        - <%= render :partial => 'student_work/work_attachments', :locals => {:attachments => @homework.attachments} %> + -
        + +
        + +
        +
        + +
        + -
        -
        + + + +
        \ No newline at end of file From 5b6ac4564a0615ae7d0f05b2a673b8c141522f71 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 17 Sep 2015 08:46:43 +0800 Subject: [PATCH 21/58] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E6=A1=86=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E8=B7=AF=E5=BE=84=E6=94=B9=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_message.html.erb | 2 +- app/views/users/_course_news.html.erb | 2 +- app/views/users/_project_issue.html.erb | 2 +- app/views/users/_project_message.html.erb | 2 +- db/schema.rb | 3417 ++++++++++----------- 5 files changed, 1709 insertions(+), 1716 deletions(-) diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 0cc7739b1..2190a9977 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -98,7 +98,7 @@ <% end %>
        -
        <%= link_to image_tag(url_to_avatar(activity.author), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        +
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index 933b2b419..c540d38a9 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -69,7 +69,7 @@ <% end %>
        -
        <%= link_to image_tag(url_to_avatar(activity.author), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        +
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index fe857198f..301489510 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -114,7 +114,7 @@ <% end %>
        -
        <%= link_to image_tag(url_to_avatar(activity.author), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        +
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        <%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%> diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 304ac1428..ef4fa080f 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -83,7 +83,7 @@ <% end %>
        -
        <%= link_to image_tag(url_to_avatar(activity.author), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        +
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> diff --git a/db/schema.rb b/db/schema.rb index 3daf4743e..b696765f8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,1712 +1,1705 @@ -# encoding: UTF-8 -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). -# -# It's strongly recommended to check this file into your version control system. - -ActiveRecord::Schema.define(:version => 20150911031029) do - - create_table "activities", :force => true do |t| - t.integer "act_id", :null => false - t.string "act_type", :null => false - t.integer "user_id", :null => false - t.integer "activity_container_id" - t.string "activity_container_type", :default => "" - t.datetime "created_at" - end - - add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" - add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" - add_index "activities", ["user_id"], :name => "index_activities_on_user_id" - - create_table "activity_notifies", :force => true do |t| - t.integer "activity_container_id" - t.string "activity_container_type" - t.integer "activity_id" - t.string "activity_type" - t.integer "notify_to" - t.datetime "created_on" - t.integer "is_read" - end - - add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" - add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" - add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" - - create_table "api_keys", :force => true do |t| - t.string "access_token" - t.datetime "expires_at" - t.integer "user_id" - t.boolean "active", :default => true - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" - add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" - - create_table "applied_projects", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - end - - create_table "apply_project_masters", :force => true do |t| - t.integer "user_id" - t.string "apply_type" - t.integer "apply_id" - t.integer "status" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "attachments", :force => true do |t| - t.integer "container_id" - t.string "container_type", :limit => 30 - t.string "filename", :default => "", :null => false - t.string "disk_filename", :default => "", :null => false - t.integer "filesize", :default => 0, :null => false - t.string "content_type", :default => "" - t.string "digest", :limit => 40, :default => "", :null => false - t.integer "downloads", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.string "description" - t.string "disk_directory" - t.integer "attachtype", :default => 1 - t.integer "is_public", :default => 1 - t.integer "copy_from" - t.integer "quotes" - end - - add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" - add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" - add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" - - create_table "attachmentstypes", :force => true do |t| - t.integer "typeId", :null => false - t.string "typeName", :limit => 50 - end - - create_table "auth_sources", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 60, :default => "", :null => false - t.string "host", :limit => 60 - t.integer "port" - t.string "account" - t.string "account_password", :default => "" - t.string "base_dn" - t.string "attr_login", :limit => 30 - t.string "attr_firstname", :limit => 30 - t.string "attr_lastname", :limit => 30 - t.string "attr_mail", :limit => 30 - t.boolean "onthefly_register", :default => false, :null => false - t.boolean "tls", :default => false, :null => false - t.string "filter" - t.integer "timeout" - end - - add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" - - create_table "biding_projects", :force => true do |t| - t.integer "project_id" - t.integer "bid_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 "bids", :force => true do |t| - t.string "name" - t.string "budget", :null => false - t.integer "author_id" - t.date "deadline" - t.text "description" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.integer "commit" - t.integer "reward_type" - t.integer "homework_type" - t.integer "parent_id" - t.string "password" - t.integer "is_evaluation" - t.integer "proportion", :default => 60 - t.integer "comment_status", :default => 0 - t.integer "evaluation_num", :default => 3 - t.integer "open_anonymous_evaluation", :default => 1 - end - - create_table "boards", :force => true do |t| - t.integer "project_id", :null => false - t.string "name", :default => "", :null => false - t.string "description" - t.integer "position", :default => 1 - t.integer "topics_count", :default => 0, :null => false - t.integer "messages_count", :default => 0, :null => false - t.integer "last_message_id" - t.integer "parent_id" - t.integer "course_id" - end - - add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" - add_index "boards", ["project_id"], :name => "boards_project_id" - - create_table "bug_to_osps", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.string "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "changes", :force => true do |t| - t.integer "changeset_id", :null => false - t.string "action", :limit => 1, :default => "", :null => false - t.text "path", :null => false - t.text "from_path" - t.string "from_revision" - t.string "revision" - t.string "branch" - end - - add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" - - create_table "changeset_parents", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "parent_id", :null => false - end - - add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" - add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" - - create_table "changesets", :force => true do |t| - t.integer "repository_id", :null => false - t.string "revision", :null => false - t.string "committer" - t.datetime "committed_on", :null => false - t.text "comments" - t.date "commit_date" - t.string "scmid" - t.integer "user_id" - end - - add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" - add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true - add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" - add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" - add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" - - create_table "changesets_issues", :id => false, :force => true do |t| - t.integer "changeset_id", :null => false - t.integer "issue_id", :null => false - end - - add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true - - create_table "code_review_assignments", :force => true do |t| - t.integer "issue_id" - t.integer "change_id" - t.integer "attachment_id" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.string "action_type" - t.integer "changeset_id" - end - - create_table "code_review_project_settings", :force => true do |t| - t.integer "project_id" - t.integer "tracker_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "updated_by" - t.boolean "hide_code_review_tab", :default => false - t.integer "auto_relation", :default => 1 - t.integer "assignment_tracker_id" - t.text "auto_assign" - t.integer "lock_version", :default => 0, :null => false - t.boolean "tracker_in_review_dialog", :default => false - 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| - t.integer "project_id" - t.integer "change_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "line" - t.integer "updated_by_id" - t.integer "lock_version", :default => 0, :null => false - t.integer "status_changed_from" - t.integer "status_changed_to" - t.integer "issue_id" - t.string "action_type" - t.string "file_path" - t.string "rev" - t.string "rev_to" - t.integer "attachment_id" - t.integer "file_count", :default => 0, :null => false - t.boolean "diff_all" - end - - create_table "comments", :force => true do |t| - t.string "commented_type", :limit => 30, :default => "", :null => false - t.integer "commented_id", :default => 0, :null => false - t.integer "author_id", :default => 0, :null => false - t.text "comments" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "comments", ["author_id"], :name => "index_comments_on_author_id" - add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" - - 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 "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.string "name" - t.string "budget", :default => "" - t.integer "author_id" - t.date "deadline" - t.string "description" - t.integer "commit" - t.string "password" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - create_table "course_activities", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_act_id" - t.string "course_act_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_attachments", :force => true do |t| - t.string "filename" - t.string "disk_filename" - t.integer "filesize" - t.string "content_type" - t.string "digest" - t.integer "downloads" - t.string "author_id" - t.string "integer" - t.string "description" - t.string "disk_directory" - t.integer "attachtype" - t.integer "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "container_id", :default => 0 - end - - create_table "course_groups", :force => true do |t| - t.string "name" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_infos", :force => true do |t| - t.integer "course_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "course_messages", :force => true do |t| - t.integer "user_id" - t.integer "course_id" - t.integer "course_message_id" - t.string "course_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "content" - t.integer "status" - end - - create_table "course_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "course_id" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "courses", :force => true do |t| - t.integer "tea_id" - t.string "name" - t.integer "state" - t.string "code" - t.integer "time" - t.string "extra" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "location" - t.string "term" - t.string "string" - t.string "password" - t.string "setup_time" - t.string "endup_time" - t.string "class_period" - t.integer "school_id" - t.text "description" - 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 - end - - create_table "custom_fields", :force => true do |t| - t.string "type", :limit => 30, :default => "", :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.string "field_format", :limit => 30, :default => "", :null => false - t.text "possible_values" - t.string "regexp", :default => "" - t.integer "min_length", :default => 0, :null => false - t.integer "max_length", :default => 0, :null => false - t.boolean "is_required", :default => false, :null => false - t.boolean "is_for_all", :default => false, :null => false - t.boolean "is_filter", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "searchable", :default => false - t.text "default_value" - t.boolean "editable", :default => true - t.boolean "visible", :default => true, :null => false - t.boolean "multiple", :default => false - end - - add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" - - create_table "custom_fields_projects", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "project_id", :default => 0, :null => false - end - - add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true - - create_table "custom_fields_trackers", :id => false, :force => true do |t| - t.integer "custom_field_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true - - create_table "custom_values", :force => true do |t| - t.string "customized_type", :limit => 30, :default => "", :null => false - t.integer "customized_id", :default => 0, :null => false - t.integer "custom_field_id", :default => 0, :null => false - t.text "value" - end - - add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" - add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" - - create_table "delayed_jobs", :force => true do |t| - t.integer "priority", :default => 0, :null => false - t.integer "attempts", :default => 0, :null => false - t.text "handler", :null => false - t.text "last_error" - t.datetime "run_at" - t.datetime "locked_at" - t.datetime "failed_at" - t.string "locked_by" - t.string "queue" - t.datetime "created_at" - t.datetime "updated_at" - end - - 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| - t.integer "project_id", :default => 0, :null => false - t.integer "category_id", :default => 0, :null => false - t.string "title", :limit => 60, :default => "", :null => false - t.text "description" - t.datetime "created_on" - t.integer "user_id", :default => 0 - t.integer "is_public", :default => 1 - end - - add_index "documents", ["category_id"], :name => "index_documents_on_category_id" - 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" - t.string "File" - t.string "IPLine" - t.string "Review" - t.string "Category" - t.string "Defect" - t.string "PreConditions" - t.string "StartLine" - t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "enabled_modules", :force => true do |t| - t.integer "project_id" - t.string "name", :null => false - t.integer "course_id" - end - - add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" - - create_table "enumerations", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "is_default", :default => false, :null => false - t.string "type" - t.boolean "active", :default => true, :null => false - t.integer "project_id" - t.integer "parent_id" - t.string "position_name", :limit => 30 - end - - 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 "first_pages", :force => true do |t| - t.string "web_title" - t.string "title" - t.text "description" - t.string "page_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sort_type" - t.integer "image_width", :default => 107 - t.integer "image_height", :default => 63 - t.integer "show_course", :default => 1 - t.integer "show_contest", :default => 1 - end - - create_table "forge_activities", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_act_id" - t.string "forge_act_type" - t.integer "org_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" - - create_table "forge_messages", :force => true do |t| - t.integer "user_id" - t.integer "project_id" - t.integer "forge_message_id" - t.string "forge_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "forums", :force => true do |t| - t.string "name", :null => false - t.text "description" - t.integer "topic_count", :default => 0 - t.integer "memo_count", :default => 0 - t.integer "last_memo_id", :default => 0 - t.integer "creator_id", :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "sticky" - t.integer "locked" - end - - create_table "groups_users", :id => false, :force => true do |t| - t.integer "group_id", :null => false - t.integer "user_id", :null => false - end - - add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true - - create_table "homework_attaches", :force => true do |t| - t.integer "bid_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "reward" - t.string "name" - t.text "description" - t.integer "state" - t.integer "project_id", :default => 0 - t.float "score", :default => 0.0 - t.integer "is_teacher_score", :default => 0 - end - - add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" - - create_table "homework_commons", :force => true do |t| - t.string "name" - t.integer "user_id" - t.text "description" - t.date "publish_time" - t.date "end_time" - t.integer "homework_type", :default => 1 - t.string "late_penalty" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - 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.integer "evaluation_num" - t.integer "absence_penalty", :default => 1 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_detail_programings", :force => true do |t| - t.string "language" - t.text "standard_code", :limit => 2147483647 - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "ta_proportion", :default => 0.1 - t.integer "question_id" - end - - create_table "homework_evaluations", :force => true do |t| - t.string "user_id" - t.string "homework_attach_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "homework_for_courses", :force => true do |t| - t.integer "course_id" - t.integer "bid_id" - end - - 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_tests", :force => true do |t| - t.text "input" - t.text "output" - t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "result" - t.text "error_msg" - end - - create_table "homework_users", :force => true do |t| - t.string "homework_attach_id" - t.string "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "invite_lists", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "issue_categories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :limit => 30, :default => "", :null => false - t.integer "assigned_to_id" - end - - add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" - add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" - - create_table "issue_relations", :force => true do |t| - t.integer "issue_from_id", :null => false - t.integer "issue_to_id", :null => false - t.string "relation_type", :default => "", :null => false - t.integer "delay" - end - - add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true - add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" - add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" - - create_table "issue_statuses", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_closed", :default => false, :null => false - t.boolean "is_default", :default => false, :null => false - t.integer "position", :default => 1 - t.integer "default_done_ratio" - end - - add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" - add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" - add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" - - create_table "issues", :force => true do |t| - t.integer "tracker_id", :null => false - t.integer "project_id", :null => false - t.string "subject", :default => "", :null => false - t.text "description" - t.date "due_date" - t.integer "category_id" - t.integer "status_id", :null => false - t.integer "assigned_to_id" - t.integer "priority_id", :null => false - t.integer "fixed_version_id" - t.integer "author_id", :null => false - t.integer "lock_version", :default => 0, :null => false - t.datetime "created_on" - t.datetime "updated_on" - t.date "start_date" - t.integer "done_ratio", :default => 0, :null => false - t.float "estimated_hours" - t.integer "parent_id" - t.integer "root_id" - t.integer "lft" - t.integer "rgt" - t.boolean "is_private", :default => false, :null => false - t.datetime "closed_on" - t.integer "project_issues_index" - end - - add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" - add_index "issues", ["author_id"], :name => "index_issues_on_author_id" - add_index "issues", ["category_id"], :name => "index_issues_on_category_id" - add_index "issues", ["created_on"], :name => "index_issues_on_created_on" - add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" - add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" - add_index "issues", ["project_id"], :name => "issues_project_id" - add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" - add_index "issues", ["status_id"], :name => "index_issues_on_status_id" - add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" - - create_table "join_in_competitions", :force => true do |t| - t.integer "user_id" - t.integer "competition_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "join_in_contests", :force => true do |t| - t.integer "user_id" - t.integer "bid_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "journal_details", :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", ["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" - t.integer "reply_id" - end - - add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" - add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" - add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" - - create_table "journals", :force => true do |t| - t.integer "journalized_id", :default => 0, :null => false - t.string "journalized_type", :limit => 30, :default => "", :null => false - t.integer "user_id", :default => 0, :null => false - t.text "notes" - t.datetime "created_on", :null => false - t.boolean "private_notes", :default => false, :null => false - end - - add_index "journals", ["created_on"], :name => "index_journals_on_created_on" - add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" - add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" - add_index "journals", ["user_id"], :name => "index_journals_on_user_id" - - create_table "journals_for_messages", :force => true do |t| - t.integer "jour_id" - t.string "jour_type" - t.integer "user_id" - t.text "notes" - t.integer "status" - t.integer "reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.string "m_parent_id" - t.boolean "is_readed" - t.integer "m_reply_count" - t.integer "m_reply_id" - t.integer "is_comprehensive_evaluation" - end - - create_table "kindeditor_assets", :force => true do |t| - t.string "asset" - t.integer "file_size" - t.string "file_type" - t.integer "owner_id" - t.string "asset_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "owner_type", :default => 0 - end - - create_table "member_roles", :force => true do |t| - t.integer "member_id", :null => false - t.integer "role_id", :null => false - t.integer "inherited_from" - end - - add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" - add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" - - create_table "members", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.integer "project_id", :default => 0 - t.datetime "created_on" - t.boolean "mail_notification", :default => false, :null => false - t.integer "course_id", :default => -1 - t.integer "course_group_id", :default => 0 - end - - add_index "members", ["project_id"], :name => "index_members_on_project_id" - add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true - add_index "members", ["user_id"], :name => "index_members_on_user_id" - - create_table "memo_messages", :force => true do |t| - t.integer "user_id" - t.integer "forum_id" - t.integer "memo_id" - t.string "memo_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "memos", :force => true do |t| - t.integer "forum_id", :null => false - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :null => false - t.integer "author_id", :null => false - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count", :default => 0 - end - - create_table "message_alls", :force => true do |t| - t.integer "user_id" - t.integer "message_id" - t.string "message_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "messages", :force => true do |t| - t.integer "board_id", :null => false - t.integer "parent_id" - t.string "subject", :default => "", :null => false - t.text "content" - t.integer "author_id" - t.integer "replies_count", :default => 0, :null => false - t.integer "last_reply_id" - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - t.boolean "locked", :default => false - t.integer "sticky", :default => 0 - end - - add_index "messages", ["author_id"], :name => "index_messages_on_author_id" - add_index "messages", ["board_id"], :name => "messages_board_id" - add_index "messages", ["created_on"], :name => "index_messages_on_created_on" - add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" - add_index "messages", ["parent_id"], :name => "messages_parent_id" - - create_table "news", :force => true do |t| - t.integer "project_id" - t.string "title", :limit => 60, :default => "", :null => false - t.string "summary", :default => "" - t.text "description" - t.integer "author_id", :default => 0, :null => false - t.datetime "created_on" - t.integer "comments_count", :default => 0, :null => false - t.integer "course_id" - end - - add_index "news", ["author_id"], :name => "index_news_on_author_id" - add_index "news", ["created_on"], :name => "index_news_on_created_on" - add_index "news", ["project_id"], :name => "news_project_id" - - create_table "no_uses", :force => true do |t| - t.integer "user_id", :null => false - t.string "no_use_type" - t.integer "no_use_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "notificationcomments", :force => true do |t| - t.string "notificationcommented_type" - t.integer "notificationcommented_id" - t.integer "author_id" - t.text "notificationcomments" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "onclick_times", :force => true do |t| - t.integer "user_id" - t.datetime "onclick_time" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "open_id_authentication_associations", :force => true do |t| - t.integer "issued" - t.integer "lifetime" - t.string "handle" - t.string "assoc_type" - t.binary "server_url" - t.binary "secret" - end - - create_table "open_id_authentication_nonces", :force => true do |t| - t.integer "timestamp", :null => false - t.string "server_url" - t.string "salt", :null => false - end - - create_table "open_source_projects", :force => true do |t| - t.string "name" - t.text "description" - t.integer "commit_count", :default => 0 - t.integer "code_line", :default => 0 - t.integer "users_count", :default => 0 - t.date "last_commit_time" - t.string "url" - t.date "date_collected" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "option_numbers", :force => true do |t| - t.integer "user_id" - t.integer "memo" - t.integer "messages_for_issues" - t.integer "issues_status" - t.integer "replay_for_message" - t.integer "replay_for_memo" - t.integer "follow" - t.integer "tread" - t.integer "praise_by_one" - t.integer "praise_by_two" - t.integer "praise_by_three" - t.integer "tread_by_one" - t.integer "tread_by_two" - t.integer "tread_by_three" - t.integer "changeset" - t.integer "document" - t.integer "attachment" - t.integer "issue_done_ratio" - t.integer "post_issue" - t.integer "score_type" - t.integer "total_score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - end - - create_table "organizations", :force => true do |t| - t.string "name" - t.string "logo_link" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "phone_app_versions", :force => true do |t| - t.string "version" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_answers", :force => true do |t| - t.integer "poll_question_id" - t.text "answer_text" - t.integer "answer_position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_questions", :force => true do |t| - t.string "question_title" - t.integer "question_type" - t.integer "is_necessary" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "question_number" - end - - create_table "poll_users", :force => true do |t| - t.integer "user_id" - t.integer "poll_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "poll_votes", :force => true do |t| - t.integer "user_id" - t.integer "poll_question_id" - t.integer "poll_answer_id" - t.text "vote_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "polls", :force => true do |t| - t.string "polls_name" - t.string "polls_type" - t.integer "polls_group_id" - t.integer "polls_status" - t.integer "user_id" - t.datetime "published_at" - t.datetime "closed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.text "polls_description" - t.integer "show_result", :default => 1 - end - - create_table "praise_tread_caches", :force => true do |t| - t.integer "object_id", :null => false - t.string "object_type" - t.integer "praise_num" - t.integer "tread_num" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "praise_treads", :force => true do |t| - t.integer "user_id", :null => false - t.integer "praise_tread_object_id" - t.string "praise_tread_object_type" - t.integer "praise_or_tread" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_infos", :force => true do |t| - t.integer "project_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "project_scores", :force => true do |t| - t.string "project_id" - t.integer "score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "issue_num", :default => 0 - t.integer "issue_journal_num", :default => 0 - t.integer "news_num", :default => 0 - t.integer "documents_num", :default => 0 - t.integer "changeset_num", :default => 0 - t.integer "board_message_num", :default => 0 - end - - create_table "project_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "project_id" - t.integer "project_type" - t.float "grade", :default => 0.0 - t.integer "course_ac_para", :default => 0 - end - - add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" - - create_table "projecting_softapplictions", :force => true do |t| - t.integer "user_id" - t.integer "softapplication_id" - t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "projects", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "description" - 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 "lft" - t.integer "rgt" - 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.integer "user_id" - t.integer "dts_test", :default => 0 - t.string "enterprise_name" - t.integer "organization_id" - t.integer "project_new_type" - end - - add_index "projects", ["lft"], :name => "index_projects_on_lft" - add_index "projects", ["rgt"], :name => "index_projects_on_rgt" - - create_table "projects_trackers", :id => false, :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.integer "tracker_id", :default => 0, :null => false - end - - add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true - add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" - - create_table "queries", :force => true do |t| - t.integer "project_id" - t.string "name", :default => "", :null => false - t.text "filters" - t.integer "user_id", :default => 0, :null => false - t.boolean "is_public", :default => false, :null => false - t.text "column_names" - t.text "sort_criteria" - t.string "group_by" - t.string "type" - end - - add_index "queries", ["project_id"], :name => "index_queries_on_project_id" - add_index "queries", ["user_id"], :name => "index_queries_on_user_id" - - create_table "relative_memo_to_open_source_projects", :force => true do |t| - t.integer "osp_id" - t.integer "relative_memo_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "relative_memos", :force => true do |t| - t.integer "osp_id" - t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :limit => 16777215, :null => false - t.integer "author_id" - t.integer "replies_count", :default => 0 - t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.boolean "is_quote", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count_crawl", :default => 0 - t.integer "viewed_count_local", :default => 0 - t.string "url" - t.string "username" - t.string "userhomeurl" - t.date "date_collected" - t.string "topic_resource" - end - - create_table "repositories", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "url", :default => "", :null => false - t.string "login", :limit => 60, :default => "" - t.string "password", :default => "" - t.string "root_url", :default => "" - t.string "type" - t.string "path_encoding", :limit => 64 - t.string "log_encoding", :limit => 64 - t.text "extra_info" - t.string "identifier" - t.boolean "is_default", :default => false - t.boolean "hidden", :default => false - end - - 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| - t.string "name", :limit => 30, :default => "", :null => false - t.integer "position", :default => 1 - t.boolean "assignable", :default => true - t.integer "builtin", :default => 0, :null => false - t.text "permissions" - t.string "issues_visibility", :limit => 30, :default => "default", :null => false - end - - create_table "schools", :force => true do |t| - t.string "name" - t.string "province" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "logo_link" - end - - create_table "seems_rateable_cached_ratings", :force => true do |t| - t.integer "cacheable_id", :limit => 8 - t.string "cacheable_type" - t.float "avg", :null => false - t.integer "cnt", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "seems_rateable_rates", :force => true do |t| - t.integer "rater_id", :limit => 8 - t.integer "rateable_id" - t.string "rateable_type" - t.float "stars", :null => false - t.string "dimension" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "is_teacher_score", :default => 0 - end - - create_table "settings", :force => true do |t| - t.string "name", :default => "", :null => false - t.text "value" - t.datetime "updated_on" - end - - add_index "settings", ["name"], :name => "index_settings_on_name" - - create_table "shares", :force => true do |t| - t.date "created_on" - t.string "url" - t.string "title" - t.integer "share_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "project_id" - t.integer "user_id" - t.string "description" - end - - create_table "softapplications", :force => true do |t| - t.string "name" - t.text "description" - t.integer "app_type_id" - t.string "app_type_name" - t.string "android_min_version_available" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "contest_id" - t.integer "softapplication_id" - t.integer "is_public" - t.string "application_developers" - t.string "deposit_project_url" - t.string "deposit_project" - t.integer "project_id" - end - - create_table "student_work_tests", :force => true do |t| - t.integer "student_work_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "status", :default => 9 - t.text "results" - t.text "src" - end - - create_table "student_works", :force => true do |t| - t.string "name" - t.text "description", :limit => 2147483647 - t.integer "homework_common_id" - t.integer "user_id" - t.float "final_score" - t.float "teacher_score" - t.float "student_score" - t.float "teaching_asistant_score" - t.integer "project_id", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "late_penalty", :default => 0 - t.integer "absence_penalty", :default => 0 - t.integer "system_score" - t.boolean "is_test", :default => false - end - - create_table "student_works_evaluation_distributions", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "student_works_scores", :force => true do |t| - t.integer "student_work_id" - t.integer "user_id" - t.integer "score" - t.text "comment" - t.integer "reviewer_role" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "students_for_courses", :force => true do |t| - t.integer "student_id" - t.integer "course_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" - add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" - - create_table "system_messages", :force => true do |t| - t.integer "user_id" - t.string "content" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "taggings", :force => true do |t| - t.integer "tag_id" - t.integer "taggable_id" - t.string "taggable_type" - t.integer "tagger_id" - t.string "tagger_type" - t.string "context", :limit => 128 - t.datetime "created_at" - end - - add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" - add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" - add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" - - create_table "tags", :force => true do |t| - t.string "name" - end - - create_table "teachers", :force => true do |t| - t.string "tea_name" - t.string "location" - t.integer "couurse_time" - t.integer "course_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "extra" - end - - create_table "time_entries", :force => true do |t| - t.integer "project_id", :null => false - t.integer "user_id", :null => false - t.integer "issue_id" - t.float "hours", :null => false - t.string "comments" - t.integer "activity_id", :null => false - t.date "spent_on", :null => false - t.integer "tyear", :null => false - t.integer "tmonth", :null => false - t.integer "tweek", :null => false - t.datetime "created_on", :null => false - t.datetime "updated_on", :null => false - end - - add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" - add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" - add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" - add_index "time_entries", ["project_id"], :name => "time_entries_project_id" - add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" - - create_table "tokens", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.string "action", :limit => 30, :default => "", :null => false - t.string "value", :limit => 40, :default => "", :null => false - t.datetime "created_on", :null => false - end - - add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" - add_index "tokens", ["value"], :name => "tokens_value", :unique => true - - create_table "trackers", :force => true do |t| - t.string "name", :limit => 30, :default => "", :null => false - t.boolean "is_in_chlog", :default => false, :null => false - t.integer "position", :default => 1 - t.boolean "is_in_roadmap", :default => true, :null => false - t.integer "fields_bits", :default => 0 - end - - create_table "user_activities", :force => true do |t| - t.string "act_type" - t.integer "act_id" - t.string "container_type" - t.integer "container_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "user_id" - end - - create_table "user_extensions", :force => true do |t| - t.integer "user_id", :null => false - t.date "birthday" - t.string "brief_introduction" - t.integer "gender" - t.string "location" - t.string "occupation" - t.integer "work_experience" - t.integer "zip_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "technical_title" - t.integer "identity" - t.string "student_id" - t.string "teacher_realname" - t.string "student_realname" - t.string "location_city" - t.integer "school_id" - t.string "description", :default => "" - end - - create_table "user_feedback_messages", :force => true do |t| - t.integer "user_id" - t.integer "journals_for_message_id" - t.string "journals_for_message_type" - t.integer "viewed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_grades", :force => true do |t| - t.integer "user_id", :null => false - t.integer "project_id", :null => false - t.float "grade", :default => 0.0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" - add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" - add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" - - create_table "user_levels", :force => true do |t| - t.integer "user_id" - t.integer "level" - end - - create_table "user_preferences", :force => true do |t| - t.integer "user_id", :default => 0, :null => false - t.text "others" - t.boolean "hide_mail", :default => false - t.string "time_zone" - end - - add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" - - create_table "user_score_details", :force => true do |t| - t.integer "current_user_id" - t.integer "target_user_id" - t.string "score_type" - t.string "score_action" - t.integer "user_id" - t.integer "old_score" - t.integer "new_score" - t.integer "current_user_level" - t.integer "target_user_level" - t.integer "score_changeable_obj_id" - t.string "score_changeable_obj_type" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_scores", :force => true do |t| - t.integer "user_id", :null => false - t.integer "collaboration" - t.integer "influence" - t.integer "skill" - t.integer "active" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "user_statuses", :force => true do |t| - t.integer "changesets_count" - t.integer "watchers_count" - t.integer "user_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.float "grade", :default => 0.0 - end - - add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" - add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" - add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" - - create_table "users", :force => true do |t| - t.string "login", :default => "", :null => false - t.string "hashed_password", :limit => 40, :default => "", :null => false - t.string "firstname", :limit => 30, :default => "", :null => false - t.string "lastname", :default => "", :null => false - t.string "mail", :limit => 60, :default => "", :null => false - t.boolean "admin", :default => false, :null => false - t.integer "status", :default => 1, :null => false - t.datetime "last_login_on" - t.string "language", :limit => 5, :default => "" - t.integer "auth_source_id" - t.datetime "created_on" - t.datetime "updated_on" - t.string "type" - t.string "identity_url" - t.string "mail_notification", :default => "", :null => false - t.string "salt", :limit => 64 - 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 "versions", :force => true do |t| - t.integer "project_id", :default => 0, :null => false - t.string "name", :default => "", :null => false - t.string "description", :default => "" - t.date "effective_date" - t.datetime "created_on" - t.datetime "updated_on" - t.string "wiki_page_title" - t.string "status", :default => "open" - t.string "sharing", :default => "none", :null => false - end - - add_index "versions", ["project_id"], :name => "versions_project_id" - add_index "versions", ["sharing"], :name => "index_versions_on_sharing" - - create_table "visitors", :force => true do |t| - t.integer "user_id" - t.integer "master_id" - t.datetime "updated_on" - t.datetime "created_on" - end - - add_index "visitors", ["master_id"], :name => "index_visitors_master_id" - add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" - add_index "visitors", ["user_id"], :name => "index_visitors_user_id" - - create_table "watchers", :force => true do |t| - t.string "watchable_type", :default => "", :null => false - t.integer "watchable_id", :default => 0, :null => false - t.integer "user_id" - end - - add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" - add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" - add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" - - create_table "web_footer_companies", :force => true do |t| - t.string "name" - t.string "logo_size" - t.string "url" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "web_footer_oranizers", :force => true do |t| - t.string "name" - t.text "description" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "wiki_content_versions", :force => true do |t| - t.integer "wiki_content_id", :null => false - t.integer "page_id", :null => false - t.integer "author_id" - t.binary "data", :limit => 2147483647 - t.string "compression", :limit => 6, :default => "" - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" - add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" - - create_table "wiki_contents", :force => true do |t| - t.integer "page_id", :null => false - t.integer "author_id" - t.text "text", :limit => 2147483647 - t.string "comments", :default => "" - t.datetime "updated_on", :null => false - t.integer "version", :null => false - end - - add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" - add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" - - create_table "wiki_pages", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title", :null => false - t.datetime "created_on", :null => false - t.boolean "protected", :default => false, :null => false - t.integer "parent_id" - end - - add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" - add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" - add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" - - create_table "wiki_redirects", :force => true do |t| - t.integer "wiki_id", :null => false - t.string "title" - t.string "redirects_to" - t.datetime "created_on", :null => false - end - - add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" - add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" - - create_table "wikis", :force => true do |t| - t.integer "project_id", :null => false - t.string "start_page", :null => false - t.integer "status", :default => 1, :null => false - end - - add_index "wikis", ["project_id"], :name => "wikis_project_id" - - create_table "workflows", :force => true do |t| - t.integer "tracker_id", :default => 0, :null => false - t.integer "old_status_id", :default => 0, :null => false - t.integer "new_status_id", :default => 0, :null => false - t.integer "role_id", :default => 0, :null => false - t.boolean "assignee", :default => false, :null => false - t.boolean "author", :default => false, :null => false - t.string "type", :limit => 30 - t.string "field_name", :limit => 30 - t.string "rule", :limit => 30 - end - - add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" - add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" - add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" - add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" - - create_table "works_categories", :force => true do |t| - t.string "category" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "zip_packs", :force => true do |t| - t.integer "user_id" - t.integer "homework_id" - t.string "file_digest" - t.string "file_path" - t.integer "pack_times", :default => 1 - t.integer "pack_size", :default => 0 - t.text "file_digests" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - -end +# encoding: UTF-8 +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended to check this file into your version control system. + +ActiveRecord::Schema.define(:version => 20150911064528) do + + create_table "activities", :force => true do |t| + t.integer "act_id", :null => false + t.string "act_type", :null => false + t.integer "user_id", :null => false + t.integer "activity_container_id" + t.string "activity_container_type", :default => "" + t.datetime "created_at" + end + + add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" + add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" + add_index "activities", ["user_id"], :name => "index_activities_on_user_id" + + create_table "activity_notifies", :force => true do |t| + t.integer "activity_container_id" + t.string "activity_container_type" + t.integer "activity_id" + t.string "activity_type" + t.integer "notify_to" + t.datetime "created_on" + t.integer "is_read" + end + + add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id" + add_index "activity_notifies", ["created_on"], :name => "index_an_created_on" + add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to" + + create_table "api_keys", :force => true do |t| + t.string "access_token" + t.datetime "expires_at" + t.integer "user_id" + t.boolean "active", :default => true + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" + add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" + + create_table "applied_projects", :force => true do |t| + t.integer "project_id", :null => false + t.integer "user_id", :null => false + end + + create_table "apply_project_masters", :force => true do |t| + t.integer "user_id" + t.string "apply_type" + t.integer "apply_id" + t.integer "status" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "attachments", :force => true do |t| + t.integer "container_id" + t.string "container_type", :limit => 30 + t.string "filename", :default => "", :null => false + t.string "disk_filename", :default => "", :null => false + t.integer "filesize", :default => 0, :null => false + t.string "content_type", :default => "" + t.string "digest", :limit => 40, :default => "", :null => false + t.integer "downloads", :default => 0, :null => false + t.integer "author_id", :default => 0, :null => false + t.datetime "created_on" + t.string "description" + t.string "disk_directory" + t.integer "attachtype", :default => 1 + t.integer "is_public", :default => 1 + t.integer "copy_from" + t.integer "quotes" + end + + add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" + add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type" + add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on" + + create_table "attachmentstypes", :force => true do |t| + t.integer "typeId", :null => false + t.string "typeName", :limit => 50 + end + + create_table "auth_sources", :force => true do |t| + t.string "type", :limit => 30, :default => "", :null => false + t.string "name", :limit => 60, :default => "", :null => false + t.string "host", :limit => 60 + t.integer "port" + t.string "account" + t.string "account_password", :default => "" + t.string "base_dn" + t.string "attr_login", :limit => 30 + t.string "attr_firstname", :limit => 30 + t.string "attr_lastname", :limit => 30 + t.string "attr_mail", :limit => 30 + t.boolean "onthefly_register", :default => false, :null => false + t.boolean "tls", :default => false, :null => false + t.string "filter" + t.integer "timeout" + end + + add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type" + + create_table "biding_projects", :force => true do |t| + t.integer "project_id" + t.integer "bid_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 "bids", :force => true do |t| + t.string "name" + t.string "budget", :null => false + t.integer "author_id" + t.date "deadline" + t.text "description" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.integer "commit" + t.integer "reward_type" + t.integer "homework_type" + t.integer "parent_id" + t.string "password" + t.integer "is_evaluation" + t.integer "proportion", :default => 60 + t.integer "comment_status", :default => 0 + t.integer "evaluation_num", :default => 3 + t.integer "open_anonymous_evaluation", :default => 1 + end + + create_table "boards", :force => true do |t| + t.integer "project_id", :null => false + t.string "name", :default => "", :null => false + t.string "description" + t.integer "position", :default => 1 + t.integer "topics_count", :default => 0, :null => false + t.integer "messages_count", :default => 0, :null => false + t.integer "last_message_id" + t.integer "parent_id" + t.integer "course_id" + end + + add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" + add_index "boards", ["project_id"], :name => "boards_project_id" + + create_table "bug_to_osps", :force => true do |t| + t.integer "osp_id" + t.integer "relative_memo_id" + t.string "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "changes", :force => true do |t| + t.integer "changeset_id", :null => false + t.string "action", :limit => 1, :default => "", :null => false + t.text "path", :null => false + t.text "from_path" + t.string "from_revision" + t.string "revision" + t.string "branch" + end + + add_index "changes", ["changeset_id"], :name => "changesets_changeset_id" + + create_table "changeset_parents", :id => false, :force => true do |t| + t.integer "changeset_id", :null => false + t.integer "parent_id", :null => false + end + + add_index "changeset_parents", ["changeset_id"], :name => "changeset_parents_changeset_ids" + add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" + + create_table "changesets", :force => true do |t| + t.integer "repository_id", :null => false + t.string "revision", :null => false + t.string "committer" + t.datetime "committed_on", :null => false + t.text "comments" + t.date "commit_date" + t.string "scmid" + t.integer "user_id" + end + + add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" + add_index "changesets", ["repository_id", "revision"], :name => "changesets_repos_rev", :unique => true + add_index "changesets", ["repository_id", "scmid"], :name => "changesets_repos_scmid" + add_index "changesets", ["repository_id"], :name => "index_changesets_on_repository_id" + add_index "changesets", ["user_id"], :name => "index_changesets_on_user_id" + + create_table "changesets_issues", :id => false, :force => true do |t| + t.integer "changeset_id", :null => false + t.integer "issue_id", :null => false + end + + add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true + + create_table "code_review_assignments", :force => true do |t| + t.integer "issue_id" + t.integer "change_id" + t.integer "attachment_id" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.string "action_type" + t.integer "changeset_id" + end + + create_table "code_review_project_settings", :force => true do |t| + t.integer "project_id" + t.integer "tracker_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "updated_by" + t.boolean "hide_code_review_tab", :default => false + t.integer "auto_relation", :default => 1 + t.integer "assignment_tracker_id" + t.text "auto_assign" + t.integer "lock_version", :default => 0, :null => false + t.boolean "tracker_in_review_dialog", :default => false + 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| + t.integer "project_id" + t.integer "change_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "line" + t.integer "updated_by_id" + t.integer "lock_version", :default => 0, :null => false + t.integer "status_changed_from" + t.integer "status_changed_to" + t.integer "issue_id" + t.string "action_type" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.integer "attachment_id" + t.integer "file_count", :default => 0, :null => false + t.boolean "diff_all" + end + + create_table "comments", :force => true do |t| + t.string "commented_type", :limit => 30, :default => "", :null => false + t.integer "commented_id", :default => 0, :null => false + t.integer "author_id", :default => 0, :null => false + t.text "comments" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + add_index "comments", ["author_id"], :name => "index_comments_on_author_id" + add_index "comments", ["commented_id", "commented_type"], :name => "index_comments_on_commented_id_and_commented_type" + + 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 "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.string "name" + t.string "budget", :default => "" + t.integer "author_id" + t.date "deadline" + t.string "description" + t.integer "commit" + t.string "password" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + create_table "course_activities", :force => true do |t| + t.integer "user_id" + t.integer "course_id" + t.integer "course_act_id" + t.string "course_act_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_attachments", :force => true do |t| + t.string "filename" + t.string "disk_filename" + t.integer "filesize" + t.string "content_type" + t.string "digest" + t.integer "downloads" + t.string "author_id" + t.string "integer" + t.string "description" + t.string "disk_directory" + t.integer "attachtype" + t.integer "is_public" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "container_id", :default => 0 + end + + create_table "course_groups", :force => true do |t| + t.string "name" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_infos", :force => true do |t| + t.integer "course_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "course_messages", :force => true do |t| + t.integer "user_id" + t.integer "course_id" + t.integer "course_message_id" + t.string "course_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "content" + t.integer "status" + end + + create_table "course_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "course_id" + t.float "grade", :default => 0.0 + t.integer "course_ac_para", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "courses", :force => true do |t| + t.integer "tea_id" + t.string "name" + t.integer "state" + t.string "code" + t.integer "time" + t.string "extra" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "location" + t.string "term" + t.string "string" + t.string "password" + t.string "setup_time" + t.string "endup_time" + t.string "class_period" + t.integer "school_id" + t.text "description" + 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 + end + + create_table "custom_fields", :force => true do |t| + t.string "type", :limit => 30, :default => "", :null => false + t.string "name", :limit => 30, :default => "", :null => false + t.string "field_format", :limit => 30, :default => "", :null => false + t.text "possible_values" + t.string "regexp", :default => "" + t.integer "min_length", :default => 0, :null => false + t.integer "max_length", :default => 0, :null => false + t.boolean "is_required", :default => false, :null => false + t.boolean "is_for_all", :default => false, :null => false + t.boolean "is_filter", :default => false, :null => false + t.integer "position", :default => 1 + t.boolean "searchable", :default => false + t.text "default_value" + t.boolean "editable", :default => true + t.boolean "visible", :default => true, :null => false + t.boolean "multiple", :default => false + end + + add_index "custom_fields", ["id", "type"], :name => "index_custom_fields_on_id_and_type" + + create_table "custom_fields_projects", :id => false, :force => true do |t| + t.integer "custom_field_id", :default => 0, :null => false + t.integer "project_id", :default => 0, :null => false + end + + add_index "custom_fields_projects", ["custom_field_id", "project_id"], :name => "index_custom_fields_projects_on_custom_field_id_and_project_id", :unique => true + + create_table "custom_fields_trackers", :id => false, :force => true do |t| + t.integer "custom_field_id", :default => 0, :null => false + t.integer "tracker_id", :default => 0, :null => false + end + + add_index "custom_fields_trackers", ["custom_field_id", "tracker_id"], :name => "index_custom_fields_trackers_on_custom_field_id_and_tracker_id", :unique => true + + create_table "custom_values", :force => true do |t| + t.string "customized_type", :limit => 30, :default => "", :null => false + t.integer "customized_id", :default => 0, :null => false + t.integer "custom_field_id", :default => 0, :null => false + t.text "value" + end + + add_index "custom_values", ["custom_field_id"], :name => "index_custom_values_on_custom_field_id" + add_index "custom_values", ["customized_type", "customized_id"], :name => "custom_values_customized" + + create_table "delayed_jobs", :force => true do |t| + t.integer "priority", :default => 0, :null => false + t.integer "attempts", :default => 0, :null => false + t.text "handler", :null => false + t.text "last_error" + t.datetime "run_at" + t.datetime "locked_at" + t.datetime "failed_at" + t.string "locked_by" + t.string "queue" + t.datetime "created_at" + t.datetime "updated_at" + end + + 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| + t.integer "project_id", :default => 0, :null => false + t.integer "category_id", :default => 0, :null => false + t.string "title", :limit => 60, :default => "", :null => false + t.text "description" + t.datetime "created_on" + t.integer "user_id", :default => 0 + t.integer "is_public", :default => 1 + end + + add_index "documents", ["category_id"], :name => "index_documents_on_category_id" + add_index "documents", ["created_on"], :name => "index_documents_on_created_on" + add_index "documents", ["project_id"], :name => "documents_project_id" + + 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 "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" + t.datetime "updated_at" + t.integer "id", :null => false + end + + create_table "enabled_modules", :force => true do |t| + t.integer "project_id" + t.string "name", :null => false + t.integer "course_id" + end + + add_index "enabled_modules", ["project_id"], :name => "enabled_modules_project_id" + + create_table "enumerations", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "is_default", :default => false, :null => false + t.string "type" + t.boolean "active", :default => true, :null => false + t.integer "project_id" + t.integer "parent_id" + t.string "position_name", :limit => 30 + end + + 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 "first_pages", :force => true do |t| + t.string "web_title" + t.string "title" + t.text "description" + t.string "page_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sort_type" + t.integer "image_width", :default => 107 + t.integer "image_height", :default => 63 + t.integer "show_course", :default => 1 + t.integer "show_contest", :default => 1 + end + + create_table "forge_activities", :force => true do |t| + t.integer "user_id" + t.integer "project_id" + t.integer "forge_act_id" + t.string "forge_act_type" + t.integer "org_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "forge_activities", ["forge_act_id"], :name => "index_forge_activities_on_forge_act_id" + + create_table "forge_messages", :force => true do |t| + t.integer "user_id" + t.integer "project_id" + t.integer "forge_message_id" + t.string "forge_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "forums", :force => true do |t| + t.string "name", :null => false + t.text "description" + t.integer "topic_count", :default => 0 + t.integer "memo_count", :default => 0 + t.integer "last_memo_id", :default => 0 + t.integer "creator_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "sticky" + t.integer "locked" + end + + create_table "groups_users", :id => false, :force => true do |t| + t.integer "group_id", :null => false + t.integer "user_id", :null => false + end + + add_index "groups_users", ["group_id", "user_id"], :name => "groups_users_ids", :unique => true + + create_table "homework_attaches", :force => true do |t| + t.integer "bid_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "reward" + t.string "name" + t.text "description" + t.integer "state" + t.integer "project_id", :default => 0 + t.float "score", :default => 0.0 + t.integer "is_teacher_score", :default => 0 + end + + add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id" + + create_table "homework_commons", :force => true do |t| + t.string "name" + t.integer "user_id" + t.text "description" + t.date "publish_time" + t.date "end_time" + t.integer "homework_type", :default => 1 + t.string "late_penalty" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + 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.integer "evaluation_num" + t.integer "absence_penalty", :default => 1 + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "homework_detail_programings", :force => true do |t| + t.string "language" + t.text "standard_code", :limit => 2147483647 + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.float "ta_proportion", :default => 0.1 + t.integer "question_id" + end + + create_table "homework_evaluations", :force => true do |t| + t.string "user_id" + t.string "homework_attach_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "homework_for_courses", :force => true do |t| + t.integer "course_id" + t.integer "bid_id" + end + + 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_tests", :force => true do |t| + t.text "input" + t.text "output" + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "result" + t.text "error_msg" + end + + create_table "homework_users", :force => true do |t| + t.string "homework_attach_id" + t.string "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "invite_lists", :force => true do |t| + t.integer "project_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "issue_categories", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "name", :limit => 30, :default => "", :null => false + t.integer "assigned_to_id" + end + + add_index "issue_categories", ["assigned_to_id"], :name => "index_issue_categories_on_assigned_to_id" + add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id" + + create_table "issue_relations", :force => true do |t| + t.integer "issue_from_id", :null => false + t.integer "issue_to_id", :null => false + t.string "relation_type", :default => "", :null => false + t.integer "delay" + end + + add_index "issue_relations", ["issue_from_id", "issue_to_id"], :name => "index_issue_relations_on_issue_from_id_and_issue_to_id", :unique => true + add_index "issue_relations", ["issue_from_id"], :name => "index_issue_relations_on_issue_from_id" + add_index "issue_relations", ["issue_to_id"], :name => "index_issue_relations_on_issue_to_id" + + create_table "issue_statuses", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.boolean "is_closed", :default => false, :null => false + t.boolean "is_default", :default => false, :null => false + t.integer "position", :default => 1 + t.integer "default_done_ratio" + end + + add_index "issue_statuses", ["is_closed"], :name => "index_issue_statuses_on_is_closed" + add_index "issue_statuses", ["is_default"], :name => "index_issue_statuses_on_is_default" + add_index "issue_statuses", ["position"], :name => "index_issue_statuses_on_position" + + create_table "issues", :force => true do |t| + t.integer "tracker_id", :null => false + t.integer "project_id", :null => false + t.string "subject", :default => "", :null => false + t.text "description" + t.date "due_date" + t.integer "category_id" + t.integer "status_id", :null => false + t.integer "assigned_to_id" + t.integer "priority_id", :null => false + t.integer "fixed_version_id" + t.integer "author_id", :null => false + t.integer "lock_version", :default => 0, :null => false + t.datetime "created_on" + t.datetime "updated_on" + t.date "start_date" + t.integer "done_ratio", :default => 0, :null => false + t.float "estimated_hours" + t.integer "parent_id" + t.integer "root_id" + t.integer "lft" + t.integer "rgt" + t.boolean "is_private", :default => false, :null => false + t.datetime "closed_on" + t.integer "project_issues_index" + end + + add_index "issues", ["assigned_to_id"], :name => "index_issues_on_assigned_to_id" + add_index "issues", ["author_id"], :name => "index_issues_on_author_id" + add_index "issues", ["category_id"], :name => "index_issues_on_category_id" + add_index "issues", ["created_on"], :name => "index_issues_on_created_on" + add_index "issues", ["fixed_version_id"], :name => "index_issues_on_fixed_version_id" + add_index "issues", ["priority_id"], :name => "index_issues_on_priority_id" + add_index "issues", ["project_id"], :name => "issues_project_id" + add_index "issues", ["root_id", "lft", "rgt"], :name => "index_issues_on_root_id_and_lft_and_rgt" + add_index "issues", ["status_id"], :name => "index_issues_on_status_id" + add_index "issues", ["tracker_id"], :name => "index_issues_on_tracker_id" + + create_table "join_in_competitions", :force => true do |t| + t.integer "user_id" + t.integer "competition_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "join_in_contests", :force => true do |t| + t.integer "user_id" + t.integer "bid_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "journal_details", :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", ["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" + t.integer "reply_id" + end + + add_index "journal_replies", ["journal_id"], :name => "index_journal_replies_on_journal_id" + add_index "journal_replies", ["reply_id"], :name => "index_journal_replies_on_reply_id" + add_index "journal_replies", ["user_id"], :name => "index_journal_replies_on_user_id" + + create_table "journals", :force => true do |t| + t.integer "journalized_id", :default => 0, :null => false + t.string "journalized_type", :limit => 30, :default => "", :null => false + t.integer "user_id", :default => 0, :null => false + t.text "notes" + t.datetime "created_on", :null => false + t.boolean "private_notes", :default => false, :null => false + end + + add_index "journals", ["created_on"], :name => "index_journals_on_created_on" + add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id" + add_index "journals", ["journalized_id"], :name => "index_journals_on_journalized_id" + add_index "journals", ["user_id"], :name => "index_journals_on_user_id" + + create_table "journals_for_messages", :force => true do |t| + t.integer "jour_id" + t.string "jour_type" + t.integer "user_id" + t.text "notes" + t.integer "status" + t.integer "reply_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.string "m_parent_id" + t.boolean "is_readed" + t.integer "m_reply_count" + t.integer "m_reply_id" + t.integer "is_comprehensive_evaluation" + end + + create_table "kindeditor_assets", :force => true do |t| + t.string "asset" + t.integer "file_size" + t.string "file_type" + t.integer "owner_id" + t.string "asset_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "owner_type", :default => 0 + end + + create_table "member_roles", :force => true do |t| + t.integer "member_id", :null => false + t.integer "role_id", :null => false + t.integer "inherited_from" + end + + add_index "member_roles", ["member_id"], :name => "index_member_roles_on_member_id" + add_index "member_roles", ["role_id"], :name => "index_member_roles_on_role_id" + + create_table "members", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.integer "project_id", :default => 0 + t.datetime "created_on" + t.boolean "mail_notification", :default => false, :null => false + t.integer "course_id", :default => -1 + t.integer "course_group_id", :default => 0 + end + + add_index "members", ["project_id"], :name => "index_members_on_project_id" + add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true + add_index "members", ["user_id"], :name => "index_members_on_user_id" + + create_table "memo_messages", :force => true do |t| + t.integer "user_id" + t.integer "forum_id" + t.integer "memo_id" + t.string "memo_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "memos", :force => true do |t| + t.integer "forum_id", :null => false + t.integer "parent_id" + t.string "subject", :null => false + t.text "content", :null => false + t.integer "author_id", :null => false + t.integer "replies_count", :default => 0 + t.integer "last_reply_id" + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count", :default => 0 + end + + create_table "message_alls", :force => true do |t| + t.integer "user_id" + t.integer "message_id" + t.string "message_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "messages", :force => true do |t| + t.integer "board_id", :null => false + t.integer "parent_id" + t.string "subject", :default => "", :null => false + t.text "content" + t.integer "author_id" + t.integer "replies_count", :default => 0, :null => false + t.integer "last_reply_id" + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + t.boolean "locked", :default => false + t.integer "sticky", :default => 0 + end + + add_index "messages", ["author_id"], :name => "index_messages_on_author_id" + add_index "messages", ["board_id"], :name => "messages_board_id" + add_index "messages", ["created_on"], :name => "index_messages_on_created_on" + add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id" + add_index "messages", ["parent_id"], :name => "messages_parent_id" + + create_table "news", :force => true do |t| + t.integer "project_id" + t.string "title", :limit => 60, :default => "", :null => false + t.string "summary", :default => "" + t.text "description" + t.integer "author_id", :default => 0, :null => false + t.datetime "created_on" + t.integer "comments_count", :default => 0, :null => false + t.integer "course_id" + end + + add_index "news", ["author_id"], :name => "index_news_on_author_id" + add_index "news", ["created_on"], :name => "index_news_on_created_on" + add_index "news", ["project_id"], :name => "news_project_id" + + create_table "no_uses", :force => true do |t| + t.integer "user_id", :null => false + t.string "no_use_type" + t.integer "no_use_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "notificationcomments", :force => true do |t| + t.string "notificationcommented_type" + t.integer "notificationcommented_id" + t.integer "author_id" + t.text "notificationcomments" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "onclick_times", :force => true do |t| + t.integer "user_id" + t.datetime "onclick_time" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "open_id_authentication_associations", :force => true do |t| + t.integer "issued" + t.integer "lifetime" + t.string "handle" + t.string "assoc_type" + t.binary "server_url" + t.binary "secret" + end + + create_table "open_id_authentication_nonces", :force => true do |t| + t.integer "timestamp", :null => false + t.string "server_url" + t.string "salt", :null => false + end + + create_table "open_source_projects", :force => true do |t| + t.string "name" + t.text "description" + t.integer "commit_count", :default => 0 + t.integer "code_line", :default => 0 + t.integer "users_count", :default => 0 + t.date "last_commit_time" + t.string "url" + t.date "date_collected" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "option_numbers", :force => true do |t| + t.integer "user_id" + t.integer "memo" + t.integer "messages_for_issues" + t.integer "issues_status" + t.integer "replay_for_message" + t.integer "replay_for_memo" + t.integer "follow" + t.integer "tread" + t.integer "praise_by_one" + t.integer "praise_by_two" + t.integer "praise_by_three" + t.integer "tread_by_one" + t.integer "tread_by_two" + t.integer "tread_by_three" + t.integer "changeset" + t.integer "document" + t.integer "attachment" + t.integer "issue_done_ratio" + t.integer "post_issue" + t.integer "score_type" + t.integer "total_score" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "project_id" + end + + create_table "organizations", :force => true do |t| + t.string "name" + t.string "logo_link" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "phone_app_versions", :force => true do |t| + t.string "version" + t.text "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_answers", :force => true do |t| + t.integer "poll_question_id" + t.text "answer_text" + t.integer "answer_position" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_questions", :force => true do |t| + t.string "question_title" + t.integer "question_type" + t.integer "is_necessary" + t.integer "poll_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "question_number" + end + + create_table "poll_users", :force => true do |t| + t.integer "user_id" + t.integer "poll_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "poll_votes", :force => true do |t| + t.integer "user_id" + t.integer "poll_question_id" + t.integer "poll_answer_id" + t.text "vote_text" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "polls", :force => true do |t| + t.string "polls_name" + t.string "polls_type" + t.integer "polls_group_id" + t.integer "polls_status" + t.integer "user_id" + t.datetime "published_at" + t.datetime "closed_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.text "polls_description" + t.integer "show_result", :default => 1 + end + + create_table "praise_tread_caches", :force => true do |t| + t.integer "object_id", :null => false + t.string "object_type" + t.integer "praise_num" + t.integer "tread_num" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "praise_treads", :force => true do |t| + t.integer "user_id", :null => false + t.integer "praise_tread_object_id" + t.string "praise_tread_object_type" + t.integer "praise_or_tread" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "project_infos", :force => true do |t| + t.integer "project_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "project_scores", :force => true do |t| + t.string "project_id" + t.integer "score" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "issue_num", :default => 0 + t.integer "issue_journal_num", :default => 0 + t.integer "news_num", :default => 0 + t.integer "documents_num", :default => 0 + t.integer "changeset_num", :default => 0 + t.integer "board_message_num", :default => 0 + end + + create_table "project_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "project_id" + t.integer "project_type" + t.float "grade", :default => 0.0 + t.integer "course_ac_para", :default => 0 + end + + add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade" + + create_table "projecting_softapplictions", :force => true do |t| + t.integer "user_id" + t.integer "softapplication_id" + t.integer "project_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "projects", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "description" + 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 "lft" + t.integer "rgt" + 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.integer "user_id" + t.integer "dts_test", :default => 0 + t.string "enterprise_name" + t.integer "organization_id" + t.integer "project_new_type" + end + + add_index "projects", ["lft"], :name => "index_projects_on_lft" + add_index "projects", ["rgt"], :name => "index_projects_on_rgt" + + create_table "projects_trackers", :id => false, :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.integer "tracker_id", :default => 0, :null => false + end + + add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true + add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id" + + create_table "queries", :force => true do |t| + t.integer "project_id" + t.string "name", :default => "", :null => false + t.text "filters" + t.integer "user_id", :default => 0, :null => false + t.boolean "is_public", :default => false, :null => false + t.text "column_names" + t.text "sort_criteria" + t.string "group_by" + t.string "type" + end + + add_index "queries", ["project_id"], :name => "index_queries_on_project_id" + add_index "queries", ["user_id"], :name => "index_queries_on_user_id" + + create_table "relative_memo_to_open_source_projects", :force => true do |t| + t.integer "osp_id" + t.integer "relative_memo_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "relative_memos", :force => true do |t| + t.integer "osp_id" + t.integer "parent_id" + t.string "subject", :null => false + t.text "content", :limit => 16777215, :null => false + t.integer "author_id" + t.integer "replies_count", :default => 0 + t.integer "last_reply_id" + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.boolean "is_quote", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count_crawl", :default => 0 + t.integer "viewed_count_local", :default => 0 + t.string "url" + t.string "username" + t.string "userhomeurl" + t.date "date_collected" + t.string "topic_resource" + end + + create_table "repositories", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "url", :default => "", :null => false + t.string "login", :limit => 60, :default => "" + t.string "password", :default => "" + t.string "root_url", :default => "" + t.string "type" + t.string "path_encoding", :limit => 64 + t.string "log_encoding", :limit => 64 + t.text "extra_info" + t.string "identifier" + t.boolean "is_default", :default => false + t.boolean "hidden", :default => false + end + + 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| + t.string "name", :limit => 30, :default => "", :null => false + t.integer "position", :default => 1 + t.boolean "assignable", :default => true + t.integer "builtin", :default => 0, :null => false + t.text "permissions" + t.string "issues_visibility", :limit => 30, :default => "default", :null => false + end + + create_table "schools", :force => true do |t| + t.string "name" + t.string "province" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "logo_link" + end + + create_table "seems_rateable_cached_ratings", :force => true do |t| + t.integer "cacheable_id", :limit => 8 + t.string "cacheable_type" + t.float "avg", :null => false + t.integer "cnt", :null => false + t.string "dimension" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "seems_rateable_rates", :force => true do |t| + t.integer "rater_id", :limit => 8 + t.integer "rateable_id" + t.string "rateable_type" + t.float "stars", :null => false + t.string "dimension" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "is_teacher_score", :default => 0 + end + + create_table "settings", :force => true do |t| + t.string "name", :default => "", :null => false + t.text "value" + t.datetime "updated_on" + end + + add_index "settings", ["name"], :name => "index_settings_on_name" + + create_table "shares", :force => true do |t| + t.date "created_on" + t.string "url" + t.string "title" + t.integer "share_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "project_id" + t.integer "user_id" + t.string "description" + end + + create_table "softapplications", :force => true do |t| + t.string "name" + t.text "description" + t.integer "app_type_id" + t.string "app_type_name" + t.string "android_min_version_available" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "contest_id" + t.integer "softapplication_id" + t.integer "is_public" + t.string "application_developers" + t.string "deposit_project_url" + t.string "deposit_project" + t.integer "project_id" + end + + create_table "student_work_tests", :force => true do |t| + t.integer "student_work_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "status", :default => 9 + t.text "results" + t.text "src" + end + + create_table "student_works", :force => true do |t| + t.string "name" + t.text "description", :limit => 2147483647 + t.integer "homework_common_id" + t.integer "user_id" + t.float "final_score" + t.float "teacher_score" + t.float "student_score" + t.float "teaching_asistant_score" + t.integer "project_id", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "late_penalty", :default => 0 + t.integer "absence_penalty", :default => 0 + t.integer "system_score" + t.boolean "is_test", :default => false + end + + create_table "student_works_evaluation_distributions", :force => true do |t| + t.integer "student_work_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "student_works_scores", :force => true do |t| + t.integer "student_work_id" + t.integer "user_id" + t.integer "score" + t.text "comment" + t.integer "reviewer_role" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "students_for_courses", :force => true do |t| + t.integer "student_id" + t.integer "course_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" + add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" + + create_table "system_messages", :force => true do |t| + t.integer "user_id" + t.string "content" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "taggings", :force => true do |t| + t.integer "tag_id" + t.integer "taggable_id" + t.string "taggable_type" + t.integer "tagger_id" + t.string "tagger_type" + t.string "context", :limit => 128 + t.datetime "created_at" + end + + add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" + add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" + add_index "taggings", ["taggable_type"], :name => "index_taggings_on_taggable_type" + + create_table "tags", :force => true do |t| + t.string "name" + end + + create_table "teachers", :force => true do |t| + t.string "tea_name" + t.string "location" + t.integer "couurse_time" + t.integer "course_code" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "extra" + end + + create_table "time_entries", :force => true do |t| + t.integer "project_id", :null => false + t.integer "user_id", :null => false + t.integer "issue_id" + t.float "hours", :null => false + t.string "comments" + t.integer "activity_id", :null => false + t.date "spent_on", :null => false + t.integer "tyear", :null => false + t.integer "tmonth", :null => false + t.integer "tweek", :null => false + t.datetime "created_on", :null => false + t.datetime "updated_on", :null => false + end + + add_index "time_entries", ["activity_id"], :name => "index_time_entries_on_activity_id" + add_index "time_entries", ["created_on"], :name => "index_time_entries_on_created_on" + add_index "time_entries", ["issue_id"], :name => "time_entries_issue_id" + add_index "time_entries", ["project_id"], :name => "time_entries_project_id" + add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id" + + create_table "tokens", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.string "action", :limit => 30, :default => "", :null => false + t.string "value", :limit => 40, :default => "", :null => false + t.datetime "created_on", :null => false + end + + add_index "tokens", ["user_id"], :name => "index_tokens_on_user_id" + add_index "tokens", ["value"], :name => "tokens_value", :unique => true + + create_table "trackers", :force => true do |t| + t.string "name", :limit => 30, :default => "", :null => false + t.boolean "is_in_chlog", :default => false, :null => false + t.integer "position", :default => 1 + t.boolean "is_in_roadmap", :default => true, :null => false + t.integer "fields_bits", :default => 0 + end + + create_table "user_activities", :force => true do |t| + t.string "act_type" + t.integer "act_id" + t.string "container_type" + t.integer "container_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "user_id" + end + + create_table "user_extensions", :force => true do |t| + t.integer "user_id", :null => false + t.date "birthday" + t.string "brief_introduction" + t.integer "gender" + t.string "location" + t.string "occupation" + t.integer "work_experience" + t.integer "zip_code" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "technical_title" + t.integer "identity" + t.string "student_id" + t.string "teacher_realname" + t.string "student_realname" + t.string "location_city" + t.integer "school_id" + t.string "description", :default => "" + end + + create_table "user_feedback_messages", :force => true do |t| + t.integer "user_id" + t.integer "journals_for_message_id" + t.string "journals_for_message_type" + t.integer "viewed" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_grades", :force => true do |t| + t.integer "user_id", :null => false + t.integer "project_id", :null => false + t.float "grade", :default => 0.0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "user_grades", ["grade"], :name => "index_user_grades_on_grade" + add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id" + add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id" + + create_table "user_levels", :force => true do |t| + t.integer "user_id" + t.integer "level" + end + + create_table "user_preferences", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.text "others" + t.boolean "hide_mail", :default => false + t.string "time_zone" + end + + add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id" + + create_table "user_score_details", :force => true do |t| + t.integer "current_user_id" + t.integer "target_user_id" + t.string "score_type" + t.string "score_action" + t.integer "user_id" + t.integer "old_score" + t.integer "new_score" + t.integer "current_user_level" + t.integer "target_user_level" + t.integer "score_changeable_obj_id" + t.string "score_changeable_obj_type" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_scores", :force => true do |t| + t.integer "user_id", :null => false + t.integer "collaboration" + t.integer "influence" + t.integer "skill" + t.integer "active" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "user_statuses", :force => true do |t| + t.integer "changesets_count" + t.integer "watchers_count" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.float "grade", :default => 0.0 + end + + add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count" + add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" + add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" + + create_table "users", :force => true do |t| + t.string "login", :default => "", :null => false + t.string "hashed_password", :limit => 40, :default => "", :null => false + t.string "firstname", :limit => 30, :default => "", :null => false + t.string "lastname", :default => "", :null => false + t.string "mail", :limit => 60, :default => "", :null => false + t.boolean "admin", :default => false, :null => false + t.integer "status", :default => 1, :null => false + t.datetime "last_login_on" + t.string "language", :limit => 5, :default => "" + t.integer "auth_source_id" + t.datetime "created_on" + t.datetime "updated_on" + t.string "type" + t.string "identity_url" + t.string "mail_notification", :default => "", :null => false + t.string "salt", :limit => 64 + 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 "versions", :force => true do |t| + t.integer "project_id", :default => 0, :null => false + t.string "name", :default => "", :null => false + t.string "description", :default => "" + t.date "effective_date" + t.datetime "created_on" + t.datetime "updated_on" + t.string "wiki_page_title" + t.string "status", :default => "open" + t.string "sharing", :default => "none", :null => false + end + + add_index "versions", ["project_id"], :name => "versions_project_id" + add_index "versions", ["sharing"], :name => "index_versions_on_sharing" + + create_table "visitors", :force => true do |t| + t.integer "user_id" + t.integer "master_id" + t.datetime "updated_on" + t.datetime "created_on" + end + + add_index "visitors", ["master_id"], :name => "index_visitors_master_id" + add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" + add_index "visitors", ["user_id"], :name => "index_visitors_user_id" + + create_table "watchers", :force => true do |t| + t.string "watchable_type", :default => "", :null => false + t.integer "watchable_id", :default => 0, :null => false + t.integer "user_id" + end + + add_index "watchers", ["user_id", "watchable_type"], :name => "watchers_user_id_type" + add_index "watchers", ["user_id"], :name => "index_watchers_on_user_id" + add_index "watchers", ["watchable_id", "watchable_type"], :name => "index_watchers_on_watchable_id_and_watchable_type" + + create_table "web_footer_companies", :force => true do |t| + t.string "name" + t.string "logo_size" + t.string "url" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "web_footer_oranizers", :force => true do |t| + t.string "name" + t.text "description" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "wiki_content_versions", :force => true do |t| + t.integer "wiki_content_id", :null => false + t.integer "page_id", :null => false + t.integer "author_id" + t.binary "data", :limit => 2147483647 + t.string "compression", :limit => 6, :default => "" + t.string "comments", :default => "" + t.datetime "updated_on", :null => false + t.integer "version", :null => false + end + + add_index "wiki_content_versions", ["updated_on"], :name => "index_wiki_content_versions_on_updated_on" + add_index "wiki_content_versions", ["wiki_content_id"], :name => "wiki_content_versions_wcid" + + create_table "wiki_contents", :force => true do |t| + t.integer "page_id", :null => false + t.integer "author_id" + t.text "text", :limit => 2147483647 + t.string "comments", :default => "" + t.datetime "updated_on", :null => false + t.integer "version", :null => false + end + + add_index "wiki_contents", ["author_id"], :name => "index_wiki_contents_on_author_id" + add_index "wiki_contents", ["page_id"], :name => "wiki_contents_page_id" + + create_table "wiki_pages", :force => true do |t| + t.integer "wiki_id", :null => false + t.string "title", :null => false + t.datetime "created_on", :null => false + t.boolean "protected", :default => false, :null => false + t.integer "parent_id" + end + + add_index "wiki_pages", ["parent_id"], :name => "index_wiki_pages_on_parent_id" + add_index "wiki_pages", ["wiki_id", "title"], :name => "wiki_pages_wiki_id_title" + add_index "wiki_pages", ["wiki_id"], :name => "index_wiki_pages_on_wiki_id" + + create_table "wiki_redirects", :force => true do |t| + t.integer "wiki_id", :null => false + t.string "title" + t.string "redirects_to" + t.datetime "created_on", :null => false + end + + add_index "wiki_redirects", ["wiki_id", "title"], :name => "wiki_redirects_wiki_id_title" + add_index "wiki_redirects", ["wiki_id"], :name => "index_wiki_redirects_on_wiki_id" + + create_table "wikis", :force => true do |t| + t.integer "project_id", :null => false + t.string "start_page", :null => false + t.integer "status", :default => 1, :null => false + end + + add_index "wikis", ["project_id"], :name => "wikis_project_id" + + create_table "workflows", :force => true do |t| + t.integer "tracker_id", :default => 0, :null => false + t.integer "old_status_id", :default => 0, :null => false + t.integer "new_status_id", :default => 0, :null => false + t.integer "role_id", :default => 0, :null => false + t.boolean "assignee", :default => false, :null => false + t.boolean "author", :default => false, :null => false + t.string "type", :limit => 30 + t.string "field_name", :limit => 30 + t.string "rule", :limit => 30 + end + + add_index "workflows", ["new_status_id"], :name => "index_workflows_on_new_status_id" + add_index "workflows", ["old_status_id"], :name => "index_workflows_on_old_status_id" + add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status" + add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id" + + create_table "works_categories", :force => true do |t| + t.string "category" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "zip_packs", :force => true do |t| + t.integer "user_id" + t.integer "homework_id" + t.string "file_digest" + t.string "file_path" + t.integer "pack_times", :default => 1 + t.integer "pack_size", :default => 0 + t.text "file_digests" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + +end From 1085c9c53f5088599627711acf331a01f6f02990 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 17 Sep 2015 09:06:01 +0800 Subject: [PATCH 22/58] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=8C=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E5=85=B3=E6=B3=A8=E5=9B=BE=E6=A0=87=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/new_user.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index ac5d2d622..54b766de9 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -478,9 +478,9 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no- .homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;} a.UsersEditBtn{ display:block; width:55px; height:20px; border:1px solid #6d6d6d; color:#fff; background:#888888 url(../images/homepage_icon.png) -11px -35px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon.png) -11px -74px no-repeat;} -a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} +a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} a:hover.UsersAttBtn{border:1px solid #888888; } -a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} +a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} a:hover.UsersApBtn{border:1px solid #888888; } .homepageSignatureTextarea {width:207px; height:80px; max-width:207px; max-height:80px; border:1px solid #d9d9d9; outline:none; margin:0px 0px 12px 0px;} .homepageSignature {font-size:12px; color:#888888; margin:10px 0; width:208px;} @@ -931,9 +931,9 @@ a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflo a.UsersEditBtn{ display:block; width:55px; height:20px; border:1px solid #6d6d6d; color:#fff; background:#888888 url(../images/homepage_icon.png) -11px -35px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon.png) -11px -74px no-repeat;} -a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} +a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} a:hover.UsersAttBtn{border:1px solid #888888; } -a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} +a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;} a:hover.UsersApBtn{border:1px solid #888888; } /*20150906编程作业设置弹框 LB*/ .C_lgrey{ color:#a5a5a5;} From 9a859d28bf24e516ebbc3bc76f0f35742d8dc1c2 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 09:20:35 +0800 Subject: [PATCH 23/58] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E6=97=B6=E4=BD=9C=E5=93=81=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 1 + .../_evaluation_student_work_title.html.erb | 47 ---- .../student_work/_evaluation_title.html.erb | 8 + .../_evaluation_un_title.html.erb | 27 +++ .../student_work/_evaluation_un_work.html.erb | 0 .../student_work/_evaluation_work.html.erb | 70 ++++-- .../_evaluation_work_title.html.erb | 12 - .../student_work/_student_work_title.html.erb | 37 --- app/views/student_work/index.html.erb | 210 ++---------------- public/stylesheets/courses.css | 5 +- 10 files changed, 104 insertions(+), 313 deletions(-) delete mode 100644 app/views/student_work/_evaluation_student_work_title.html.erb create mode 100644 app/views/student_work/_evaluation_title.html.erb create mode 100644 app/views/student_work/_evaluation_un_title.html.erb create mode 100644 app/views/student_work/_evaluation_un_work.html.erb delete mode 100644 app/views/student_work/_evaluation_work_title.html.erb delete mode 100644 app/views/student_work/_student_work_title.html.erb diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index d570a31fc..a039038e2 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -77,6 +77,7 @@ class StudentWorkController < ApplicationController @stundet_works = @homework.student_works @homework_commons = @course.homework_commons.order("created_at desc") @is_teacher = User.current.allowed_to?(:as_teacher,@course) + @is_evaluation = @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评 respond_to do |format| format.html diff --git a/app/views/student_work/_evaluation_student_work_title.html.erb b/app/views/student_work/_evaluation_student_work_title.html.erb deleted file mode 100644 index f19438f78..000000000 --- a/app/views/student_work/_evaluation_student_work_title.html.erb +++ /dev/null @@ -1,47 +0,0 @@ -
      • - 学号 -
      • -
      • - <%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% if @show_all && @order == "name"%> - <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> - <% end%> -
      • -
      • - 作品名称 -
      • -
      • - <%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% if @show_all && @order == "created_at"%> - <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> - <% end%> -
      • -
      • - <%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% if @show_all && @order == "teacher_score"%> - <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> - <% end%> -
      • -
      • - <%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% if @show_all && @order == "teaching_asistant_score"%> - <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> - - <% end%> -
      • -
      • - <% if @homework.homework_type == 1%> - <%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% elsif @homework.homework_type == 2%> - <%= link_to "系统",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% end %> - <% if @show_all && @order == "student_score"%> - <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> - <% end%> -
      • -
      • - <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% if @show_all && @order == "score"%> - <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> - <% end%> -
      • \ No newline at end of file diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb new file mode 100644 index 000000000..f7d2904a7 --- /dev/null +++ b/app/views/student_work/_evaluation_title.html.erb @@ -0,0 +1,8 @@ +
          +
        • + 作品信息 +
        • +
        • + 我的评分 +
        • +
        \ No newline at end of file diff --git a/app/views/student_work/_evaluation_un_title.html.erb b/app/views/student_work/_evaluation_un_title.html.erb new file mode 100644 index 000000000..fa2383d48 --- /dev/null +++ b/app/views/student_work/_evaluation_un_title.html.erb @@ -0,0 +1,27 @@ +
          +
        • + 作品信息 +
        • +
        • + 教师评分 + +
        • +
        • + 教辅评分 + +
        • + <% if @homework.homework_type == 2%> +
        • + 系统评分 + +
        • + <% end%> +
        • + 匿评 + +
        • +
        • + 成绩 + +
        • +
        \ No newline at end of file diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/student_work/_evaluation_work.html.erb b/app/views/student_work/_evaluation_work.html.erb index be07269c3..b428d79f8 100644 --- a/app/views/student_work/_evaluation_work.html.erb +++ b/app/views/student_work/_evaluation_work.html.erb @@ -1,29 +1,51 @@ -
          " id="student_work_<%= student_work.id%>"> +
            <% is_my_work = student_work.user == User.current%> -
          • - <% if is_my_work%> - - <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> - - <% else%> - -- - <% end%> -
          • -
          • - <% if is_my_work%> - <%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02" %> - <% else%> - <%= link_to "匿名","javascript:void(0)", :class => "c_blue02"%> - <% end%> -
          • -
          • - <% student_work_name = student_work.name.nil? || student_work.name.empty? ? '匿名的作品' : student_work.name%> - <%= link_to student_work_name, student_work_path(student_work),:remote => true, :title => student_work.name, :class => "c_blue02"%> +
          • +
              +
            • + <% if is_my_work%> + <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%> + <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14"%> + <% else%> + <%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14"%> + <% end%> +
            • +
              +
            • +
                +
              • + 姓名: + <% if is_my_work%> + <%= student_work.user.show_name%> + <% else%> + 匿名 + <% end%> +
              • +
              • + 学号: + <% if is_my_work%> + + <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> + + <% else%> + -- + <% end%> +
              • +
              • + 时间: + <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %> + 迟交 + <% else%> + <%= format_time student_work.created_at%> + <% end %> +
              • +
              +
            • +
          • <% my_score = student_work_score(student_work,User.current) %> -
          • - <%= my_score.nil? ? "--" : format("%.2f",my_score.score)%> +
          • + <%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
          • -
            -
          \ No newline at end of file +
        \ No newline at end of file diff --git a/app/views/student_work/_evaluation_work_title.html.erb b/app/views/student_work/_evaluation_work_title.html.erb deleted file mode 100644 index 0be6228bb..000000000 --- a/app/views/student_work/_evaluation_work_title.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -
      • - 学号 -
      • -
      • - 学生姓名 -
      • -
      • - 作品名称 -
      • -
      • - <%= link_to "我的评分","javascript:void(0)",:class => "c_dark f14 fb fl"%> -
      • \ No newline at end of file diff --git a/app/views/student_work/_student_work_title.html.erb b/app/views/student_work/_student_work_title.html.erb deleted file mode 100644 index 24e6a1b37..000000000 --- a/app/views/student_work/_student_work_title.html.erb +++ /dev/null @@ -1,37 +0,0 @@ -
      • - 学号 -
      • -
      • - <%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% if @show_all && @order == "name"%> - <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> - <% end%> -
      • -
      • - 作品名称 -
      • -
      • - <%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% if @show_all && @order == "created_at"%> - <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> - <% end%> -
      • -
      • - <%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% if @show_all && @order == "teacher_score"%> - <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> - <% end%> -
      • -
      • - <%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% if @show_all && @order == "teaching_asistant_score"%> - <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> - - <% end%> -
      • -
      • - <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% if @show_all && @order == "score"%> - <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> - <% end%> -
      • \ No newline at end of file diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index a5c7c3486..665cbc0f7 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -1,11 +1,12 @@
        -
        +
        -
          -
        • - 作品信息 -
        • -
        • - 教师评分 - -
        • -
        • - 教辅评分 - -
        • -
        • - 系统评分 - -
        • -
        • - 匿评 - -
        • -
        • - 成绩 - -
        • -
        + <% if @is_evaluation && !@stundet_works.empty?%> + <%= render :partial => "evaluation_title"%> + <% else%> + <%= render :partial => "evaluation_un_title"%> + <% end%>
        - - -
        - - -
        - - - -
        - -
        - - -
        -
        -
        -

        请以下同学重新提交作业ppt,只要更新附件,不要删除作否则否则否则评分就丢了

        -
        - -
        -
        -

        项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题

        - [展开] + <% @stundet_works.each do |student_work|%> + <% if @is_evaluation%> + <%= render :partial => "evaluation_work", :locals => {:student_work => student_work}%> + <% else%> + <%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work}%> + <% end%>
        - 截止时间:2015-04-02 -
        -
        - - 天 - - 小时 - - 分 - - 秒 -
        -

        作业提交还剩:

        -
        -
        - -
        -
        - - - - - + <% end%>
        - -
        -
        -
        - - - -
        \ No newline at end of file diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 073eaf56b..f46607967 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -50,7 +50,7 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;} .hworkList80 {width:80px; text-align:center;} .hworkList50 {width:50px; text-align:center;} .codeList{ float:right; font-size:12px; color:#484848; padding:0px 3px; width:714px; margin-bottom:10px; } -.hworkName {width:380px; max-width:380px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:16px; line-height:16px;} +.hworkName {max-width:380px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:16px; line-height:16px;} .hworkDetail {max-width:100px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:14px; line-height:14px; font-size:12px; color:#888888;} .hworkDate {max-width:150px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:14px; line-height:14px; font-size:12px; color:#888888;} .hworkMenu {width:100px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 20px; left:-110px; font-size:12px; color:#888888; display:none; line-height:2;} @@ -60,6 +60,9 @@ a.hworkSetting {background:url(../images/homepage_icon2.png) -10px -450px no-rep .infoNi{ width:100px; padding:5px;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left; line-height:2; position:absolute; margin-top:-24px;margin-left: 40px;} .problemTxt {width:660px; margin-left:10px; color:#777777; position:relative;} .rTxtTit{width:560px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#269ac9; font-size:14px;} +.width620{width: 620px;} +.width455{width: 455px;} +.m_width620{max-width: 620px;} /*邮件邀请*/ From fa9008d396acdae53e3688a16ebb8e58636c59dd Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 10:00:41 +0800 Subject: [PATCH 24/58] =?UTF-8?q?=E4=BD=9C=E5=93=81=E5=9C=A8=E9=9D=9E?= =?UTF-8?q?=E5=8C=BF=E8=AF=84=E9=98=B6=E6=AE=B5=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_work/_evaluation_un_work.html.erb | 62 +++++++++++++++++++ .../student_work/_evaluation_work.html.erb | 2 +- 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index e69de29bb..4a70015de 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -0,0 +1,62 @@ + +
          +
        • +
            +
          • + <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%> + <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14"%> +
          • +
            +
          • +
              +
            • + 姓名:<%= student_work.user.show_name%> +
            • +
            • + 学号: + <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> +
            • +
            • + 时间: + <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %> + 迟交 + <% else%> + <%= format_time student_work.created_at%> + <% end %> +
            • +
            +
          • +
          +
        • +
        • + <%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%> +
        • +
        • + <%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%> +
        • + + <% if @homework.homework_type == 2%> + +
        • + <%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%> +
        • + <% end%> + +
        • + <%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%> + <% unless student_work.student_score.nil? || student_work.homework_common.homework_type == 2%> + + (<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>) + +
          + 现共有 +  <%= student_work.student_works_scores.where(:reviewer_role => 3).count%>  + 名学生进行了匿评,平均分为 +  <%= format("%.1f",student_work.student_score)%> 分。 +
          + <% end%> +
        • + + +
        • 90
        • +
        \ No newline at end of file diff --git a/app/views/student_work/_evaluation_work.html.erb b/app/views/student_work/_evaluation_work.html.erb index b428d79f8..f8b9addbd 100644 --- a/app/views/student_work/_evaluation_work.html.erb +++ b/app/views/student_work/_evaluation_work.html.erb @@ -29,7 +29,7 @@ <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> <% else%> - -- + -- <% end%>
      • From 036129a6221eb08af1a6ba80612dabc80529f420 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 17 Sep 2015 10:02:28 +0800 Subject: [PATCH 25/58] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E5=90=8E=E7=9A=84=E5=9B=9E=E5=A4=8D=E6=A1=86=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=B8=8D=E6=94=B9=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/comments/create.js.erb | 4 ++-- app/views/issues/add_journal.js.erb | 4 ++-- app/views/messages/reply.js.erb | 6 +++--- app/views/users/_course_news.html.erb | 1 + app/views/users/_project_issue.html.erb | 1 + app/views/users/_project_message.html.erb | 1 + 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/views/comments/create.js.erb b/app/views/comments/create.js.erb index dd3c3dfb2..f0e7a6a11 100644 --- a/app/views/comments/create.js.erb +++ b/app/views/comments/create.js.erb @@ -1,3 +1,3 @@ -$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); +$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>"); -init_KindEditor_data('<%= @user_activity_id%>'); +init_KindEditor_data('<%= @user_activity_id%>',"30px","85%"); diff --git a/app/views/issues/add_journal.js.erb b/app/views/issues/add_journal.js.erb index efa5750c2..c5b698702 100644 --- a/app/views/issues/add_journal.js.erb +++ b/app/views/issues/add_journal.js.erb @@ -1,3 +1,3 @@ -$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id}) %>"); +$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>"); -init_KindEditor_data(<%= @user_activity_id%>); \ No newline at end of file +init_KindEditor_data(<%= @user_activity_id%>,"30px","85%"); \ No newline at end of file diff --git a/app/views/messages/reply.js.erb b/app/views/messages/reply.js.erb index 9d3d68855..883051365 100644 --- a/app/views/messages/reply.js.erb +++ b/app/views/messages/reply.js.erb @@ -1,6 +1,6 @@ <%if @project%> - $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); + $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>"); <%elsif @course%> - $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); + $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>"); <%end%> -init_KindEditor_data(<%= @user_activity_id%>); \ No newline at end of file +init_KindEditor_data(<%= @user_activity_id%>,"30px","85%"); \ No newline at end of file diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index c540d38a9..9cf72276e 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -77,6 +77,7 @@
        发送 +

        <% end%> diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 301489510..97930795f 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -122,6 +122,7 @@
        发送 +

        <% end%> diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index ef4fa080f..01842c28b 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -92,6 +92,7 @@
        发送 +

        <% end%> From 22d4499f8f7a7db48f02b4b0c8b04d1f14e068c1 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 10:06:04 +0800 Subject: [PATCH 26/58] =?UTF-8?q?=E7=BC=BA=E8=AF=84=E3=80=81=E8=BF=9F?= =?UTF-8?q?=E4=BA=A4=E6=89=A3=E5=88=86=E8=BF=98=E6=98=AF=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=20=E7=9B=B4=E6=8E=A5=E6=89=A3=E5=A4=9A=E5=B0=91=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_common_controller.rb | 4 ++-- app/controllers/student_work_controller.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 293346365..bab2cbf12 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -218,11 +218,11 @@ class HomeworkCommonController < ApplicationController #关闭匿评 def stop_anonymous_comment @homework_detail_manual.update_column('comment_status', 3) - #计算缺评扣分---->计算缺评数量 + #计算缺评扣分 work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")" @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 - student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count : 0 + student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0 student_work.save end diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index a039038e2..cc51e5cf7 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -116,7 +116,7 @@ class StudentWorkController < ApplicationController render_attachment_warning_if_needed(student_work) #提交作品时,计算是否迟交 if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d") - student_work.late_penalty = 1 + student_work.late_penalty = @homework.late_penalty else student_work.late_penalty = 0 end From 1ed1957899ff2aac8d6ff572ea67bb0a51bd7cdd Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 10:21:01 +0800 Subject: [PATCH 27/58] =?UTF-8?q?=E6=95=99=E8=BE=85=E8=AF=84=E5=88=86?= =?UTF-8?q?=E3=80=81=E7=B3=BB=E7=BB=9F=E8=AF=84=E5=88=86=E3=80=81=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E5=8C=BF=E8=AF=84=20=E6=AF=94=E4=BE=8B=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_common_controller.rb | 1 - app/controllers/users_controller.rb | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index bab2cbf12..fa2ce04cf 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -156,7 +156,6 @@ class HomeworkCommonController < ApplicationController if @homework.homework_type == 2 @homework.homework_detail_programing ||= HomeworkDetailPrograming.new @homework_detail_programing = @homework.homework_detail_programing - @homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6 @homework_detail_programing.language = params[:language_type].to_i @homework.homework_tests.delete_all diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 4796d0c0c..59a50a904 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -444,7 +444,7 @@ class UsersController < ApplicationController homework.end_time = params[:homework_common][:end_time] || Time.now homework.publish_time = Time.now homework.homework_type = params[:homework_type].to_i || 1 - homework.late_penalty = 2 + homework.late_penalty = 10 homework.user_id = User.current.id homework.course_id = params[:course_id] @@ -452,19 +452,19 @@ class UsersController < ApplicationController render_attachment_warning_if_needed(homework) homework_detail_manual = HomeworkDetailManual.new - homework_detail_manual.ta_proportion = params[:ta_proportion] || 0.6 + homework_detail_manual.ta_proportion = homework.homework_type == 1 ? 0.6 : 0.2 homework_detail_manual.comment_status = 1 homework_detail_manual.evaluation_start = Time.now homework_detail_manual.evaluation_end = Time.now homework_detail_manual.evaluation_num = params[:evaluation_num] || 3 - homework_detail_manual.absence_penalty = 2 + homework_detail_manual.absence_penalty = 5 homework.homework_detail_manual = homework_detail_manual #编程作业相关属性 if homework.homework_type == 2 homework_detail_programing = HomeworkDetailPrograming.new homework.homework_detail_programing = homework_detail_programing - homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6 + homework_detail_programing.ta_proportion = 0.5 homework_detail_programing.language = params[:language_type].to_i inputs = params[:program][:input] From 84bb5af86f3252cc0ec8c900407d8e07bdebc371 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 10:24:37 +0800 Subject: [PATCH 28/58] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=95=99=E5=B8=88?= =?UTF-8?q?=E4=BC=98=E5=85=88=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 1 + .../20150917022239_add_teacher_priority_to_homework.rb | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 db/migrate/20150917022239_add_teacher_priority_to_homework.rb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 59a50a904..cf6305e4d 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -445,6 +445,7 @@ class UsersController < ApplicationController homework.publish_time = Time.now homework.homework_type = params[:homework_type].to_i || 1 homework.late_penalty = 10 + homework.teacher_priority = 1 homework.user_id = User.current.id homework.course_id = params[:course_id] diff --git a/db/migrate/20150917022239_add_teacher_priority_to_homework.rb b/db/migrate/20150917022239_add_teacher_priority_to_homework.rb new file mode 100644 index 000000000..20ab421bc --- /dev/null +++ b/db/migrate/20150917022239_add_teacher_priority_to_homework.rb @@ -0,0 +1,5 @@ +class AddTeacherPriorityToHomework < ActiveRecord::Migration + def change + add_column :homework_commons,:teacher_priority,:integer,:default => 1 + end +end From 09308150862990d8d01aee131385c95e62a40d05 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 17 Sep 2015 10:25:26 +0800 Subject: [PATCH 29/58] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E6=A8=A1=E7=B3=8A=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_message.html.erb | 2 +- app/views/users/_course_news.html.erb | 2 +- app/views/users/_project_issue.html.erb | 2 +- app/views/users/_project_message.html.erb | 2 +- public/stylesheets/new_user.css | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 2190a9977..e98d8fe79 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -98,7 +98,7 @@ <% end %>
        -
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        +
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index c540d38a9..f4be1fdbf 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -69,7 +69,7 @@ <% end %>
        -
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        +
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 301489510..ddc113f06 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -114,7 +114,7 @@ <% end %>
        -
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        +
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        <%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%> diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index ef4fa080f..93786d80f 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -83,7 +83,7 @@ <% end %>
        -
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        +
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 54b766de9..219418a37 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -588,6 +588,7 @@ a.postReplyCancel:hover {color:#ffffff;} a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;} a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;} .homepagePostReplyPortrait {float:left; width:33px;} +.imageFuzzy {filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5;opacity: 0.5;} .homepagePostReplyDes {float:left; width:632px; margin-left:15px;} .homepagePostReplyPublisher {font-size:12px; color:#888888; margin-bottom:5px;} .homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;} From 3573179403b53eb0dd3b30ed4927c8064a804f57 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 10:32:41 +0800 Subject: [PATCH 30/58] =?UTF-8?q?=E5=8C=BF=E8=AF=84=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E5=88=97=E8=A1=A8=20=20=E6=A0=87=E9=A2=98=E5=A4=B4=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_evaluation_title.html.erb | 2 +- public/stylesheets/courses.css | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb index f7d2904a7..bb1919472 100644 --- a/app/views/student_work/_evaluation_title.html.erb +++ b/app/views/student_work/_evaluation_title.html.erb @@ -1,5 +1,5 @@
          -
        • +
        • 作品信息
        • diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index f46607967..adad76d3d 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -61,6 +61,7 @@ a.hworkSetting {background:url(../images/homepage_icon2.png) -10px -450px no-rep .problemTxt {width:660px; margin-left:10px; color:#777777; position:relative;} .rTxtTit{width:560px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#269ac9; font-size:14px;} .width620{width: 620px;} +.width625{width: 625px;} .width455{width: 455px;} .m_width620{max-width: 620px;} From 9a735c71571223a2861e71a9f745a7f30901a85b Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 17 Sep 2015 11:13:36 +0800 Subject: [PATCH 31/58] =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_programing_attr.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/users/_user_programing_attr.html.erb b/app/views/users/_user_programing_attr.html.erb index 6a3b4a773..0ebe997e2 100644 --- a/app/views/users/_user_programing_attr.html.erb +++ b/app/views/users/_user_programing_attr.html.erb @@ -29,6 +29,7 @@ <% end %>
          + 温馨提示:您可以在发布作业后,在作业“模拟答题”中进行标准代码的检测和提交。 确  定
          From efdd717c3c555c2d7c9317b4992c7d5bd7c19c75 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 11:41:24 +0800 Subject: [PATCH 32/58] =?UTF-8?q?=E6=88=90=E7=BB=A9=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E7=AE=97=E6=B3=95=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 101 +++++++++++++++++++++ app/views/student_work/index.html.erb | 2 +- 2 files changed, 102 insertions(+), 1 deletion(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index cc51e5cf7..cf61f7d12 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -580,4 +580,105 @@ class StudentWorkController < ApplicationController end JSON.parse(res.body) end + + #成绩计算 + def set_final_score + homework = HomeworkCommon.first + student_work = StudentWork.first + if homework && homework.homework_detail_manual + if homework.homework_type == 1 #匿评作业 + if homework.teacher_priority == 1 #教师优先 + if student_work.teacher_score + student_work.final_score = student_work.teacher_score + else + if student_work.teaching_asistant_score.nil? + student_work.final_score = student_work.student_score + elsif student_work.student_score.nil? + student_work.final_score = student_work.teaching_asistant_score + else + ta_proportion = homework.homework_detail_manual.ta_proportion + final_ta_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * BigDecimal.new("#{ta_proportion}") + final_s_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) + final_score = final_ta_score + final_s_score + student_work.final_score = format("%.2f",final_score.to_f) + end + end + else #不考虑教师评分 + if student_work.teaching_asistant_score.nil? + student_work.final_score = student_work.student_score + elsif student_work.student_score.nil? + student_work.final_score = student_work.teaching_asistant_score + else + ta_proportion = homework.homework_detail_manual.ta_proportion + final_ta_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * BigDecimal.new("#{ta_proportion}") + final_s_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) + final_score = final_ta_score + final_s_score + student_work.final_score = format("%.2f",final_score.to_f) + end + end + elsif homework.homework_type == 2 && homework.homework_detail_programing #编程作业-----设定:系统评分必定不为空 + if homework.teacher_priority == 1 #教师优先 + if student_work.teacher_score + student_work.final_score = student_work.teacher_score + else + if student_work.teaching_asistant_score.nil? #教辅未评分 + if student_work.student_score.nil? + student_work.final_score = student_work.system_score + else + ta_proportion = homework.homework_detail_programing.ta_proportion + homework.homework_detail_manual.ta_proportion / 2 + final_sy_score = BigDecimal.new("#{student_work.system_score}") * BigDecimal.new("#{ta_proportion}") + final_st_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) + final_score = final_sy_score + final_st_score + student_work.final_score = format("%.2f",final_score.to_f) + end + elsif student_work.student_score.nil? #学生未评分 + if student_work.teaching_asistant_score.nil? + student_work.final_score = student_work.system_score + else + ta_proportion = homework.homework_detail_programing.ta_proportion + (1.0 - homework.homework_detail_manual.ta_proportion - homework.homework_detail_programing.ta_proportion) / 2 + final_sy_score = BigDecimal.new("#{student_work.system_score}") * BigDecimal.new("#{ta_proportion}") + final_ts_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) + final_score = final_sy_score + final_ts_score + student_work.final_score = format("%.2f",final_score.to_f) + end + else + final_sy_score = BigDecimal.new("#{student_work.system_score}") * BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") + final_ts_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * BigDecimal.new("#{homework.homework_detail_manual.ta_proportion}") + final_st_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") - BigDecimal.new("#{homework.homework_detail_manual.ta_proportion}")) + final_score = final_sy_score + final_ts_score + final_st_score + student_work.final_score = format("%.2f",final_score.to_f) + end + end + else #不考虑教师评分 + if student_work.teaching_asistant_score.nil? #教辅未评分 + if student_work.student_score.nil? + student_work.final_score = student_work.system_score + else + ta_proportion = homework.homework_detail_programing.ta_proportion + homework.homework_detail_manual.ta_proportion / 2 + final_sy_score = BigDecimal.new("#{student_work.system_score}") * BigDecimal.new("#{ta_proportion}") + final_st_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) + final_score = final_sy_score + final_st_score + student_work.final_score = format("%.2f",final_score.to_f) + end + elsif student_work.student_score.nil? #学生未评分 + if student_work.teaching_asistant_score.nil? + student_work.final_score = student_work.system_score + else + ta_proportion = homework.homework_detail_programing.ta_proportion + (1.0 - homework.homework_detail_manual.ta_proportion - homework.homework_detail_programing.ta_proportion) / 2 + final_sy_score = BigDecimal.new("#{student_work.system_score}") * BigDecimal.new("#{ta_proportion}") + final_ts_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) + final_score = final_sy_score + final_ts_score + student_work.final_score = format("%.2f",final_score.to_f) + end + else + final_sy_score = BigDecimal.new("#{student_work.system_score}") * BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") + final_ts_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * BigDecimal.new("#{homework.homework_detail_manual.ta_proportion}") + final_st_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") - BigDecimal.new("#{homework.homework_detail_manual.ta_proportion}")) + final_score = final_sy_score + final_ts_score + final_st_score + student_work.final_score = format("%.2f",final_score.to_f) + end + end + end + end + end end \ No newline at end of file diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 665cbc0f7..409c064c8 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -86,7 +86,7 @@ <% end%>
          -
          +
          <% end%>
        From 53d6c6853d769df57c20c88e5befea71079040a1 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 14:16:13 +0800 Subject: [PATCH 33/58] =?UTF-8?q?=E4=BD=9C=E5=93=81=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 39 ++++++++++++++------ app/views/student_work/index.html.erb | 41 ++++++++++++---------- 2 files changed, 51 insertions(+), 29 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index cf61f7d12..a3f02cbb9 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -72,12 +72,29 @@ class StudentWorkController < ApplicationController query.update_attributes(:viewed => true) end end - ################################################################################################################## - @stundet_works = @homework.student_works + @order,@b_sort,@name,@group = params[:order] || "score",params[:sort] || "desc",params[:name] || "",params[:group] @homework_commons = @course.homework_commons.order("created_at desc") - @is_teacher = User.current.allowed_to?(:as_teacher,@course) + @is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin? @is_evaluation = @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评 + if @is_teacher #老师 || 超级管理员 显示所有列表 + @stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name + elsif @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的 + @stundet_works = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id) + elsif @homework.homework_detail_manual.comment_status == 2 #学生 && 开启匿评 看到匿评列表 + my_work = @homework.student_works.where(:user_id => User.current.id) + @stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id} + elsif @homework.homework_detail_manual.comment_status == 3 #学生 && 关闭匿评 未提交作品之前只看到自己的,提交了作品看到所有的 + my_work = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id) + if my_work.empty? + @stundet_works = [] + else + @stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name + end + else + @stundet_works = [] + end + @score = @b_sort == "desc" ? "asc" : "desc" respond_to do |format| format.html @@ -415,10 +432,14 @@ class StudentWorkController < ApplicationController #根据条件过滤作业结果 def search_homework_member homeworks,name - name = name.downcase - select_homework = homeworks.select{ |homework| - homework.user[:login].to_s.downcase.include?(name) || homework.user.user_extensions[:student_id].to_s.downcase.include?(name) || (homework.user[:lastname].to_s.downcase + homework.user[:firstname].to_s.downcase).include?(name) - } + if name == "" + select_homework = homeworks + else + name = name.downcase + select_homework = homeworks.select{ |homework| + homework.user[:login].to_s.downcase.include?(name) || homework.user.user_extensions[:student_id].to_s.downcase.include?(name) || (homework.user[:lastname].to_s.downcase + homework.user[:firstname].to_s.downcase).include?(name) + } + end select_homework end @@ -582,9 +603,7 @@ class StudentWorkController < ApplicationController end #成绩计算 - def set_final_score - homework = HomeworkCommon.first - student_work = StudentWork.first + def set_final_score homework,student_work if homework && homework.homework_detail_manual if homework.homework_type == 1 #匿评作业 if homework.teacher_priority == 1 #教师优先 diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 409c064c8..4979c5c95 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -38,19 +38,22 @@
        - +
        + <% end%>
        @@ -58,14 +61,14 @@
        - 所有作品 - [共199份] - + <%= link_to "所有作品[共#{@homework.student_works.count}份]".html_safe,student_work_index_path(:homework => @homework.id),:class => "fl f14"%> -
        - - -
        + <%if @is_teacher || @homework.homework_detail_manual.comment_status == 3%> +
        + + +
        + <% end%>
        From 47cdf1231d8d748c6cdb78767666cb2995267265 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 14:26:41 +0800 Subject: [PATCH 34/58] =?UTF-8?q?=E5=8C=BF=E8=AF=84=E8=AF=84=E5=88=86?= =?UTF-8?q?=EF=BC=8C=E6=88=90=E7=BB=A9=E6=8F=90=E7=A4=BA=E6=A1=86=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_work/_evaluation_un_work.html.erb | 28 ++++++++++++++----- public/javascripts/course.js | 24 ++++------------ 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index 4a70015de..232edc908 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -41,13 +41,12 @@ <%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
      • <% end%> - -
      • +
      • <%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%> - <% unless student_work.student_score.nil? || student_work.homework_common.homework_type == 2%> - - (<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>) - + <% unless student_work.student_score.nil?%> + + (<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>) +
        现共有  <%= student_work.student_works_scores.where(:reviewer_role => 3).count%>  @@ -58,5 +57,20 @@
      • -
      • 90
      • + <% score = student_work.respond_to?("score") ? student_work.score : student_work.final_score - student_work.absence_penalty - student_work.late_penalty%> +
      • + <%= score.nil? ? "--" : format("%.1f",score)%> + <% unless score.nil?%> +
        + 作品最终评分为 +  <%= student_work.final_score%> 分。 + 迟交扣分 +  <%= student_work.late_penalty%> 分, + 缺评扣分 +  <%= student_work.absence_penalty%> 分, + 最终成绩为 +  <%= format("%.1f",score)%> 分。 +
        + <% end%> +
      \ No newline at end of file diff --git a/public/javascripts/course.js b/public/javascripts/course.js index fc52ef87a..ea9501371 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -881,39 +881,27 @@ function goTopEx() { $(function(){ //匿评评分提示 - $(".student_score_info").bind("mouseover",function(e){ - //alert($(this).html()); + $(".student_score_info").live("mouseover",function(){ $(this).find("div").show(); - //$(this).find("div").css("top",e.pageY); - //$(this).find("div").css("left",e.pageX); }); - $(".student_score_info").bind("mouseout",function(e){ - //alert($(this).html()); + $(".student_score_info").live("mouseout",function(){ $(this).find("div").hide(); }); //最终成绩提示 - $(".student_final_scor_info").bind("mouseover",function(e){ - //alert($(this).html()); + $(".student_final_scor_info").live("mouseover",function(){ $(this).find("div").show(); - //$(this).find("div").css("top",e.pageY); - //$(this).find("div").css("left",e.pageX); }); - $(".student_final_scor_info").bind("mouseout",function(e){ - //alert($(this).html()); + $(".student_final_scor_info").live("mouseout",function(){ $(this).find("div").hide(); }); $("#about_project label").eq(1).remove(); //附件下载提示 - $(".zip_download_alert").bind("mouseover",function(e){ - //alert($(this).html()); + $(".zip_download_alert").bind("mouseover",function(){ $(this).next("div").show(); - //$(this).next("div").css("top",e.pageY); - //$(this).next("div").css("left",e.pageX); }); - $(".zip_download_alert").bind("mouseout",function(e){ - //alert($(this).html()); + $(".zip_download_alert").bind("mouseout",function(){ $(this).next("div").hide(); }); }); From 3f7c69e8e11a3c5aa259644daa461a14d314b4d0 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 17 Sep 2015 14:58:10 +0800 Subject: [PATCH 35/58] =?UTF-8?q?=E5=8A=A8=E6=80=81=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_activities.html.erb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index bbef67e6d..9eefbd1f1 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -11,7 +11,7 @@ .ke-inline-block{display: none;} div.ke-container{float:left;} -<% first_user_activity = user_activities.first.id %> +<% first_user_activity = user_activities.first.id unless user_activities.first.nil? %> <% user_activities.each do |user_activity| if user_activities %>
      diff --git a/app/views/student_work/show.js.erb b/app/views/student_work/show.js.erb index 1c8874c2f..e6b99c146 100644 --- a/app/views/student_work/show.js.erb +++ b/app/views/student_work/show.js.erb @@ -1,11 +1,11 @@ -if($("#about_hwork_<%= @work.id%>").children().length > 0) - {$("#about_hwork_<%= @work.id%>").html("");} -else - { - <% if @homework.homework_type == 2%> - $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show') %>"); - <% else%> - $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show') %>"); - <% end%> - $('#score_<%= @work.id%>').peSlider({range: 'min'}); - } \ No newline at end of file +if($("#about_hwork_<%= @work.id%>").children().length > 0){ + $("#about_hwork_<%= @work.id%>").html(""); +} +else{ + <% if @homework.homework_type == 2%> + $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show') %>"); + <% else%> + $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show') %>"); + <% end%> + $('#score_<%= @work.id%>').peSlider({range: 'min'}); +} \ No newline at end of file diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index adad76d3d..72ccc33c1 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -692,15 +692,15 @@ a.hwork_center{ display:block; width:60px; text-align:center; margin-right:5px;} .tit_fb{ font-weight:bold; width:66px; text-align:right; display:block; float:left;} .ml160{ margin-left:160px;} .show_hwork_p{ width:580px; float:left;} -.hwork_ping_text{ float:left; border:1px solid #e4e4e4; padding:5px; width:568px; height:35px;} -.ping_box{ width:626px; padding:10px; background:#f5f3f3; } +.hwork_ping_text{ float:left; border:1px solid #e4e4e4; padding:5px; width:615px; height:35px;} +.ping_box{ width:676px; padding:10px; background:#f5f3f3; } a.ping_pic{ display:block; width:34px; height:34px; padding:2px; border:1px solid #e3e3e3;} a:hover.ping_pic{border:1px solid #64bdd9;} .ping_box_tit{ float:left; width:575px; margin-left:10px;} .ping_box_ul{} .ping_line{ border-bottom:1px dashed #CCCCCC; padding-bottom:8px; margin-bottom:8px;} -.ping_text{border:1px solid #CCCCCC; margin:5px; padding:5px; width:560px; height:20px; } -.ping_back_tit{ float:left; width:523px; margin-left:10px; } +.ping_text{border:1px solid #CCCCCC; margin:5px; padding:5px; width:610px; height:20px; } +.ping_back_tit{ float:left; width:578px; margin-left:10px; } a.down_btn{ border:1px solid #CCC; color:#999; padding:0px 5px; font-size:12px; text-align:center; display:block;} a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;} .fr{ float:right;} @@ -800,8 +800,8 @@ a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;} .T_C{ text-align:center;} .SearchIcon{background:url(../images/homepage_icon2.png) 676px -393px no-repeat; } .SearchIcon:hover{background:url(../images/homepage_icon2.png) 676px -419px no-repeat; } -a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; } -a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;} +a.link_file_a{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; } +a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;} a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;} a.FilesName{ max-width:540px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;} a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;} @@ -847,7 +847,7 @@ a.pro_mes_w{ height:20px; display:block; color:#999999;} .rside_work_con{ width:650px;} a.c_grey{ color:#999999;} a:hover.c_grey{ color:#333;} -.link_file{ display:block; max-width:300px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.link_file_a{ display:block; max-width:450px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .last_time{width:auto; text-align:right; margin-right:70px;} .link_file_box{ width:360px;} From 3dccf8f77d1b72530aa65153ac1247b514ae6b67 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 17 Sep 2015 16:04:27 +0800 Subject: [PATCH 38/58] =?UTF-8?q?=E5=8A=A8=E6=80=81=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=A0=8F=E5=9B=BE=E6=A0=87=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=EF=BC=9B=20=E6=8F=90=E4=BA=A4=E4=BD=9C=E4=B8=9A=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=9B=BE=E6=A0=87=E5=AE=BD=E5=BA=A6=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_new_homework_detail_manual_form.html.erb | 148 +++++++++--------- .../users/_user_homework_attachment.html.erb | 4 +- app/views/users/show.html.erb | 2 +- public/images/homepage_icon.png | Bin 12533 -> 13042 bytes public/stylesheets/new_user.css | 11 +- 5 files changed, 82 insertions(+), 83 deletions(-) diff --git a/app/views/homework_common/_new_homework_detail_manual_form.html.erb b/app/views/homework_common/_new_homework_detail_manual_form.html.erb index 7fb728ad0..af5a8bf50 100644 --- a/app/views/homework_common/_new_homework_detail_manual_form.html.erb +++ b/app/views/homework_common/_new_homework_detail_manual_form.html.erb @@ -1,74 +1,74 @@ -
      -
      -
      -
      发布作业
      -
      -
      -
      - -
      -
      - 导入作业 - -
      - -
      -
      -
      -
      - <% if edit_mode %> - <%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %> - <% else %> - <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> - <%= f.kindeditor :description,:editor_id => 'homework_description_editor' %> - <% end %> -
      -
      - -
      - - -
      - 高级功能 -
      -
      -
      - -
      - 发布 - <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'fr mr10 mt3'%> -
      -
      -
      -
      - -
      - - - +
      +
      +
      +
      发布作业
      +
      +
      +
      + +
      +
      + 导入作业 + +
      + +
      +
      +
      +
      + <% if edit_mode %> + <%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %> + <% else %> + <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> + <%= f.kindeditor :description,:editor_id => 'homework_description_editor' %> + <% end %> +
      +
      + +
      + + +
      + 高级功能 +
      +
      +
      + +
      + 发布 + <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'fr mr10 mt3'%> +
      +
      +
      +
      + +
      + + + diff --git a/app/views/users/_user_homework_attachment.html.erb b/app/views/users/_user_homework_attachment.html.erb index 08927ab8f..9b7c6c06a 100644 --- a/app/views/users/_user_homework_attachment.html.erb +++ b/app/views/users/_user_homework_attachment.html.erb @@ -47,8 +47,8 @@
      - 上传附件 - <%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mt3",:remote => true%> + 上传附件 + <%= link_to "资源库",{:controller => 'users',:action=>'user_import_resource',:id=>User.current.id,:homework_id=>container.id},:class => "FilesBtn fl mt3 mr20",:remote => true%> <% if defined?(has_program) && has_program %> 编程 diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index aab715b16..de166b4e7 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -29,7 +29,7 @@
      • 更多
      • -
      • <%= link_to "我的动态", {:controller => "users", :action => "show", :type => "current_user"}, :class =>"homepagePostTypeAll postTypeGrey"%> +
      • <%= link_to "我的动态", {:controller => "users", :action => "show", :type => "current_user"}, :class =>"homepagePostTypeMine postTypeGrey"%>
      • <%= link_to "全部动态", {:controller => "users", :action => "show", :type => nil}, :class =>"homepagePostTypeAll postTypeGrey"%>
    • diff --git a/public/images/homepage_icon.png b/public/images/homepage_icon.png index a6f3223b6d26e4d4e5f428fd52e40d28b54c3d23..46f96a36ff00506b63eebe34ff99fd55c34b18e9 100644 GIT binary patch delta 9871 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 Q1N!@Cq;IBIql=3AKlD+;y#N3J delta 9306 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 QAmC45+vHZMmebS!1A}b2+5i9m diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 219418a37..54802251e 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -547,7 +547,8 @@ a.homepagePostTypeNotice {background:url(../images/homepage_icon.png) -87px -280 a.homepagePostTypeForum {background:url(../images/homepage_icon.png) -10px -310px no-repeat; padding-left:23px;} a.homepagePostTypeQuiz {background:url(../images/homepage_icon.png) -90px -124px no-repeat; padding-left:23px;} a.homepagePostTypeQuestion {background:url(../images/homepage_icon.png) -10px -273px no-repeat; padding-left:23px;} -a.homepagePostTypeAll {background:url(../images/homepage_icon2.png) -10px -360px no-repeat; padding-left:23px;} +a.homepagePostTypeMine {background:url(../images/homepage_icon.png) -187px -277px no-repeat; padding-left:23px;} +a.homepagePostTypeAll {background:url(../images/homepage_icon.png) -185px -308px no-repeat; padding-left:23px;} a.postTypeGrey {color:#888888;} a.postTypeGrey:hover {color:#269ac9;} .homepagePostBrief {width:710px; margin:0px auto; position:relative;} @@ -869,8 +870,6 @@ a:hover.BlueCirBtn{ background:#269ac9; color:#fff;} .w720{width:721px;} .w709{width: 709px;} .w701{width: 701px;} -a.AnnexBtn{ background: url(../images/homepage_icon2.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} -a:hover.AnnexBtn{background: url(../images/homepage_icon2.png) -90px -343px no-repeat; color:#269ac9;} a.FilesBtn{ background: url(../images/homepage_icon2.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} a:hover.FilesBtn{background: url(../images/homepage_icon2.png) -89px -372px no-repeat; color:#269ac9;} a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #269ac9; color:#269ac9; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} @@ -887,13 +886,13 @@ a:hover.BlueCirBtn{ background:#3598db; color:#fff;} .W440{ width:440px;} .W120{ width:110px;} .W700{ width:700px;} -a.AnnexBtn{ background: url(../images/homepage_icon.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} +a.AnnexBtn{ background: url(../images/homepage_icon.png) 0px -343px no-repeat; width:50px; height:20px; display:block; padding-left:20px; color:#888888;} a:hover.AnnexBtn{background: url(../images/homepage_icon.png) -90px -343px no-repeat; color:#3598db;} -a.FilesBtn{ background: url(../images/homepage_icon.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} +a.FilesBtn{ background: url(../images/homepage_icon.png) 0px -373px no-repeat; width:38px; height:20px; display:block; padding-left:20px; color:#888888;} a:hover.FilesBtn{background: url(../images/homepage_icon.png) -89px -372px no-repeat; color:#3598db;} a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} a:hover.BlueCirBtnMini{ background:#3598db; color:#fff;} -a.ProBtn{background: url(../images/homepage_icon.png) -86px -396px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;} +a.ProBtn{background: url(../images/homepage_icon.png) -86px -396px no-repeat; width:30px; height:20px; display:block; padding-left:20px; color:#888888;} a:hover.ProBtn{background: url(../images/homepage_icon.png) -86px -426px no-repeat; color:#3598db;} a.DropBtn{background: url(../images/homepage_icon.png) -125px -339px no-repeat; width:85px; height:20px; display:block; color:#888888; font-size:14px;} From 062a9ff231ca642ed35ecfc6ab8a0c6a49f0f865 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 17 Sep 2015 16:12:31 +0800 Subject: [PATCH 39/58] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E7=A1=AE=E5=AE=9A=EF=BC=8C=E5=8F=96=E6=B6=88=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=AD=97=E5=8F=B7=E5=A4=A7=E5=B0=8F=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_users_new.html.erb | 4 ++-- app/views/layouts/new_base_user.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/layouts/base_users_new.html.erb b/app/views/layouts/base_users_new.html.erb index 91357d09a..807fb2caa 100644 --- a/app/views/layouts/base_users_new.html.erb +++ b/app/views/layouts/base_users_new.html.erb @@ -331,8 +331,8 @@ 48px*48px
      - 取  消 - 确  定 + 取  消 + 确  定
      diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 7f8b4c69e..77d54b3c0 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -195,8 +195,8 @@ 48px*48px
      - 取  消 - 确  定 + 取  消 + 确  定
      From f6f3d83c5ec93a37f5793b1b3024b8416ebdbd26 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 16:31:32 +0800 Subject: [PATCH 40/58] =?UTF-8?q?1=E3=80=81=E8=80=81=E5=B8=88=E3=80=81?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=89=93=E5=88=86=202=E3=80=81=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=8F=8A=E8=AF=84=E8=AE=BA=E7=9A=84=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 6 +- .../student_work/_add_score_reply.html.erb | 1 + .../student_work/_evaluation_un_work.html.erb | 2 +- .../student_work/_student_work_score.html.erb | 2 +- app/views/student_work/add_score.js.erb | 31 +----- app/views/student_work/add_score_reply.js.erb | 2 +- db/schema.rb | 99 +++++++------------ public/stylesheets/courses.css | 1 + 8 files changed, 49 insertions(+), 95 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 91a6fb706..ffec0a282 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -212,8 +212,9 @@ class StudentWorkController < ApplicationController #添加评分,已评分则为修改评分 def add_score + @is_last = params[:is_last] == "true" render_403 and return if User.current == @work.user #不可以匿评自己的作品 - @is_teacher = User.current.allowed_to?(:as_teacher,@course) + @is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin? #老师、教辅可以随时评分,学生只能在匿评作业的匿评阶段进行评分 render_403 and return unless @is_teacher || @homework.homework_detail_manual.comment_status == 2 @score = student_work_score @work,User.current @@ -254,7 +255,7 @@ class StudentWorkController < ApplicationController when 3 #学生评分 学生评分显示平均分 @work.student_score = @work.student_works_scores.where(:reviewer_role => 3).average(:score).try(:round, 2).to_f end - + set_final_score @homework,@work if @work.save respond_to do |format| format.js @@ -266,6 +267,7 @@ class StudentWorkController < ApplicationController #添加评分的回复 def add_score_reply @score = StudentWorksScore.find params[:score_id] + @is_last = params[:is_last] == "true" @jour = @score.journals_for_messages.new(:user_id => User.current.id,:notes =>params[:message], :reply_id => 0) if @jour.save @status = 1 diff --git a/app/views/student_work/_add_score_reply.html.erb b/app/views/student_work/_add_score_reply.html.erb index 2866b2da6..417d3d2c1 100644 --- a/app/views/student_work/_add_score_reply.html.erb +++ b/app/views/student_work/_add_score_reply.html.erb @@ -1,4 +1,5 @@ <%= form_for('', :remote => true, :method => :post,:url => add_score_reply_student_work_index_path(:score_id => score.id)) do |f|%> <%= f.text_area 'message', :class => 'ping_text', :placeholder => l(:text_caracters_maximum,:count=>250),:maxlength => 250 %> + 回复 <% end%> \ No newline at end of file diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index 232edc908..a170f39ab 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -61,7 +61,7 @@
    • <%= score.nil? ? "--" : format("%.1f",score)%> <% unless score.nil?%> -
      +
      作品最终评分为  <%= student_work.final_score%> 分。 迟交扣分 diff --git a/app/views/student_work/_student_work_score.html.erb b/app/views/student_work/_student_work_score.html.erb index d4d319fa2..c800ae8d0 100644 --- a/app/views/student_work/_student_work_score.html.erb +++ b/app/views/student_work/_student_work_score.html.erb @@ -25,7 +25,7 @@
      - <%= render :partial => 'add_score_reply',:locals => {:score => score}%> + <%= render :partial => 'add_score_reply',:locals => {:score => score,:is_last => is_last}%>
      diff --git a/app/views/student_work/add_score.js.erb b/app/views/student_work/add_score.js.erb index 1de92b51a..6cb5bd6d8 100644 --- a/app/views/student_work/add_score.js.erb +++ b/app/views/student_work/add_score.js.erb @@ -2,39 +2,16 @@ $("#add_student_score_<%= @work.id%>").html("<%= escape_javascript(render :parti $('#score_<%= @work.id%>').peSlider({range: 'min'}); <% if @is_new%> - $("#score_list_<%= @work.id%>").prepend("
      <%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>
      "); + $("#score_list_<%= @work.id%>").find("div:last").find("ul").addClass("ping_line"); + $("#score_list_<%= @work.id%>").prepend("
      <%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => true}) %>
      "); <% else %> - $("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>"); + $("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => @is_last}) %>"); <% end%> $("#score_list_<%= @work.id%>").removeAttr("style"); <% if @is_teacher %> - <% if @homework.homework_type == 1%> - $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_student_work',:locals => {:student_work => @work}) %>"); - <% elsif @homework.homework_type == 2%> - $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_student_work',:locals => {:student_work => @work}) %>"); - <% else%> - $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'student_work',:locals => {:student_work => @work}) %>"); - <% end%> + $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_un_work',:locals => {:student_work => @work}) %>"); <% else %> $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work}) %>"); <% end%> - - -$(function(){ - //匿评评分提示 - $(".student_score_info").bind("mouseover",function(e){ - $(this).find("div").show(); - }); - $(".student_score_info").bind("mouseout",function(e){ - $(this).find("div").hide(); - }); - //最终成绩提示 - $(".student_final_scor_info").bind("mouseover",function(e){ - $(this).find("div").show(); - }); - $(".student_final_scor_info").bind("mouseout",function(e){ - $(this).find("div").hide(); - }); -}); diff --git a/app/views/student_work/add_score_reply.js.erb b/app/views/student_work/add_score_reply.js.erb index 28704630f..f21870cd5 100644 --- a/app/views/student_work/add_score_reply.js.erb +++ b/app/views/student_work/add_score_reply.js.erb @@ -1,4 +1,4 @@ -$("#add_score_reply_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'add_score_reply', :locals => {:score => @score}) %>"); +$("#add_score_reply_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'add_score_reply', :locals => {:score => @score,:is_last => @is_last}) %>"); <% if @status && @status == 1%> $("#replay_histroy_<%= @score.id%>").prepend("<%= escape_javascript(render :partial => 'jour_replay', :locals => {:jour => @jour}) %>"); $("#add_score_reply_<%= @score.id%>").hide(); diff --git a/db/schema.rb b/db/schema.rb index b696765f8..772c68cf5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150911064528) do +ActiveRecord::Schema.define(:version => 20150917022239) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -236,13 +236,6 @@ ActiveRecord::Schema.define(:version => 20150911064528) do t.boolean "tracker_in_review_dialog", :default => false 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| t.integer "project_id" t.integer "change_id" @@ -476,13 +469,6 @@ ActiveRecord::Schema.define(:version => 20150911064528) do 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| t.integer "project_id", :default => 0, :null => false t.integer "category_id", :default => 0, :null => false @@ -497,26 +483,23 @@ ActiveRecord::Schema.define(:version => 20150911064528) do add_index "documents", ["created_on"], :name => "index_documents_on_created_on" add_index "documents", ["project_id"], :name => "documents_project_id" - 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 "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 + create_table "dts", :force => true do |t| + t.string "IPLineCode" t.string "Description" - t.text "PreConditions", :limit => 2147483647 - t.text "TraceInfo", :limit => 2147483647 - t.text "Code", :limit => 2147483647 + t.string "Num" + t.string "Variable" + t.string "TraceInfo" + t.string "Method" + t.string "File" + t.string "IPLine" + t.string "Review" + t.string "Category" + t.string "Defect" + t.string "PreConditions" + t.string "StartLine" t.integer "project_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "enabled_modules", :force => true do |t| @@ -619,11 +602,12 @@ ActiveRecord::Schema.define(:version => 20150911064528) do t.text "description" t.date "publish_time" t.date "end_time" - t.integer "homework_type", :default => 1 + t.integer "homework_type", :default => 1 t.string "late_penalty" t.integer "course_id" - 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.integer "teacher_priority", :default => 1 end create_table "homework_detail_manuals", :force => true do |t| @@ -1179,18 +1163,18 @@ ActiveRecord::Schema.define(:version => 20150911064528) do create_table "relative_memos", :force => true do |t| t.integer "osp_id" t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :limit => 16777215, :null => false + t.string "subject", :null => false + t.text "content", :null => false t.integer "author_id" - t.integer "replies_count", :default => 0 + t.integer "replies_count", :default => 0 t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.boolean "is_quote", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count_crawl", :default => 0 - t.integer "viewed_count_local", :default => 0 + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.boolean "is_quote", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count_crawl", :default => 0 + t.integer "viewed_count_local", :default => 0 t.string "url" t.string "username" t.string "userhomeurl" @@ -1215,19 +1199,6 @@ ActiveRecord::Schema.define(:version => 20150911064528) do 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| t.string "name", :limit => 30, :default => "", :null => false t.integer "position", :default => 1 @@ -1279,11 +1250,10 @@ ActiveRecord::Schema.define(:version => 20150911064528) do t.string "url" t.string "title" t.integer "share_type" - 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.integer "project_id" t.integer "user_id" - t.string "description" end create_table "softapplications", :force => true do |t| @@ -1453,8 +1423,8 @@ ActiveRecord::Schema.define(:version => 20150911064528) do t.integer "zip_code" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.string "technical_title" t.integer "identity" + t.string "technical_title" t.string "student_id" t.string "teacher_realname" t.string "student_realname" @@ -1522,6 +1492,9 @@ ActiveRecord::Schema.define(:version => 20150911064528) do t.integer "active" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false + t.integer "level" + t.integer "file" + t.integer "issue" end create_table "user_statuses", :force => true do |t| diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 72ccc33c1..125016994 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -64,6 +64,7 @@ a.hworkSetting {background:url(../images/homepage_icon2.png) -10px -450px no-rep .width625{width: 625px;} .width455{width: 455px;} .m_width620{max-width: 620px;} +.width180{width: 180px;} /*邮件邀请*/ From 9c20368274f1ff54f4d9e67153db42a64db24c97 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 16:53:38 +0800 Subject: [PATCH 41/58] =?UTF-8?q?1=E3=80=81=E7=B3=BB=E7=BB=9F=E8=AF=84?= =?UTF-8?q?=E5=88=86=E7=9A=84=E6=97=B6=E5=80=99=E5=AF=B9=E6=88=90=E7=BB=A9?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E8=B5=8B=E5=80=BC=202=E3=80=81=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E9=94=99=E8=AF=AF=E7=9A=84=E7=BC=96=E7=A8=8B=E5=BE=97?= =?UTF-8?q?=E5=88=86=E8=AE=A1=E7=AE=97=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 41 ---------------------- app/models/student_work.rb | 1 + config/routes.rb | 2 +- 3 files changed, 2 insertions(+), 42 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index ffec0a282..d076481d3 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -8,7 +8,6 @@ class StudentWorkController < ApplicationController before_filter :member_of_course, :only => [:index, :new, :create, :show, :add_score, :praise_student_work] before_filter :author_of_work, :only => [:edit, :update, :destroy] before_filter :teacher_of_course, :only => [:student_work_absence_penalty, :absence_penalty_list, :evaluation_list] - protect_from_forgery :except => :set_program_score ### def program_test @@ -360,46 +359,6 @@ class StudentWorkController < ApplicationController end end - #设置编程作业得分 - def set_program_score - stundet_work = StudentWork.find_by_id params[:student_work_id] - @course = stundet_work.homework_common.course - student_score_count = 0 - if stundet_work && params[:results] && params[:results].class.to_s == "Array" - homework_common = stundet_work.homework_common - params[:results].each do |result| - homework_tests = homework_common.homework_tests.where("input = '#{result[:input]}' AND output = '#{result[:output]}'") - homework_tests.each do |homework_test| - student_work_test = StudentWorkTest.new - student_work_test.student_work = stundet_work - student_work_test.homework_test = homework_test - student_work_test.result = result[:status] - if student_work_test.result == 0 - student_score_count += 1 - end - student_work_test.error_msg = params[:compile_error_msg] - student_work_test.save! - end - end - unless homework_common.homework_tests.empty? - stundet_work.student_score = student_score_count * 100.0 / homework_common.homework_tests.count - - if stundet_work.teacher_score.nil? - if stundet_work.teaching_asistant_score.nil? - stundet_work.final_score = stundet_work.student_score - else - final_ta_score = BigDecimal.new("#{stundet_work.teaching_asistant_score}") * BigDecimal.new("#{homework_common.homework_detail_programing.ta_proportion}") - final_s_score = BigDecimal.new("#{stundet_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{homework_common.homework_detail_programing.ta_proportion}")) - final_score = final_ta_score + final_s_score - stundet_work.final_score = format("%.1f",final_score.to_f) - end - end - - stundet_work.save! - end - end - end - private #获取作业 def find_homework diff --git a/app/models/student_work.rb b/app/models/student_work.rb index 0a5c1b65c..83a701f43 100644 --- a/app/models/student_work.rb +++ b/app/models/student_work.rb @@ -31,6 +31,7 @@ class StudentWork < ActiveRecord::Base else self.system_score = last_test.test_score end + self.final_score = self.system_score end end diff --git a/config/routes.rb b/config/routes.rb index 1d2393764..96b193862 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -119,7 +119,7 @@ RedmineApp::Application.routes.draw do get 'student_work_absence_penalty' get 'absence_penalty_list' get 'evaluation_list' - post 'set_program_score' + # post 'set_program_score' post 'program_test' end end From b8cb422268fa43482531d4185f001e0113a66305 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 17:06:08 +0800 Subject: [PATCH 42/58] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 5 +++- .../_evaluation_un_title.html.erb | 30 ++++++++++++------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index d076481d3..4264f1439 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -76,19 +76,22 @@ class StudentWorkController < ApplicationController @homework_commons = @course.homework_commons.order("created_at desc") @is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin? @is_evaluation = @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评 + @show_all = false if @is_teacher #老师 || 超级管理员 显示所有列表 @stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name + @show_all = true elsif @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的 @stundet_works = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id) elsif @homework.homework_detail_manual.comment_status == 2 #学生 && 开启匿评 看到匿评列表 my_work = @homework.student_works.where(:user_id => User.current.id) @stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id} - elsif @homework.homework_detail_manual.comment_status == 3 #学生 && 关闭匿评 未提交作品之前只看到自己的,提交了作品看到所有的 + elsif @homework.homework_detail_manual.comment_status == 3 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的 my_work = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id) if my_work.empty? @stundet_works = [] else @stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name + @show_all = true end else @stundet_works = [] diff --git a/app/views/student_work/_evaluation_un_title.html.erb b/app/views/student_work/_evaluation_un_title.html.erb index fa2383d48..8ca855e9b 100644 --- a/app/views/student_work/_evaluation_un_title.html.erb +++ b/app/views/student_work/_evaluation_un_title.html.erb @@ -3,25 +3,35 @@ 作品信息
    • - 教师评分 - + <%= link_to "教师评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%> + <% if @show_all && @order == "teacher_score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%> + <% end%>
    • - 教辅评分 - + <%= link_to "教辅评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%> + <% if @show_all && @order == "teaching_asistant_score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%> + <% end%>
    • <% if @homework.homework_type == 2%>
    • - 系统评分 - + <%= link_to "系统评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%> + <% if @show_all && @order == "system_score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%> + <% end%>
    • <% end%>
    • - 匿评 - + <%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%> + <% if @show_all && @order == "student_score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%> + <% end%>
    • - 成绩 - + <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%> + <% if @show_all && @order == "score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%> + <% end%>
    \ No newline at end of file From 210425277e20c3651e73af0c5097272562fcba1d Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 17 Sep 2015 17:17:36 +0800 Subject: [PATCH 43/58] =?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=A0=8F=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E8=8F=9C=E5=8D=95=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/header.css | 234 ++++++++++++++++---------------- public/stylesheets/new_user.css | 2 +- 2 files changed, 118 insertions(+), 118 deletions(-) diff --git a/public/stylesheets/header.css b/public/stylesheets/header.css index 2d6f5e0b8..998ae6fbd 100644 --- a/public/stylesheets/header.css +++ b/public/stylesheets/header.css @@ -1,117 +1,117 @@ -/*新个人主页框架css*/ -.navContainer {width:100%; background-color:#269ac9;} -.homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;} -.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;} -.navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;} -.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;} -.navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle; padding:0px 10px;} -.navHomepageMenu:hover {background-color:#297fb8;} -.navHomepageSearchBoxcontainer {margin-top:11px; } -.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; margin-top:11px; background-color:#ffffff;} -.navHomepageSearchInput {width:345px; height:32px; outline:none; border:none !important; float:left;padding: 0 0 0 5px !important; margin:0;} -.homepageSearchIcon {width:30px; height:32px; background:url(../images/nav_icon.png) -8px 3px no-repeat; float:left;} -a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-repeat;} -#navSearchAlert {display:none;} -.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;} -.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;} -.newsActive {width:10px; height:10px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;} -.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;} -.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;} -.homepageProfileMenuIconhover {background:url(../images/nav_icon.png) 30px -122px no-repeat;} -/*.navHomepageProfile ul li ul {display:none;} -.navHomepageProfile ul li:hover ul {display:block;}*/ -.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;} -.homepageRight {width:750px; float:left; margin-top:15px; margin-bottom:10px;} -.homepagePortraitContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:15px; padding-bottom:15px;} -.homepagePortraitImage {width:206px; height:206px; padding:2px; margin:15px 14px 10px 14px; position:relative; border:1px solid #cbcbcb;} -.homepagePortraitImage:hover {border:1px solid #15bccf;} -.homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;} -.homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;} -.homepageEditProfile {width:20px; height:20px; border-radius:2px; background-color:#888888; position:absolute; right:9px; bottom:9px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;} -.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -11px -35px no-repeat; width:20px; height:20px; display:block;} -.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:21px; float:left;} -.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;} -.homepageImageSexMan {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;} -.homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;} -.homepageSignatureTextarea {width:207px; height:80px; max-width:207px; max-height:80px; border:1px solid #d9d9d9; outline:none; margin:0px 0px 12px 15px;;} -.homepageSignature {font-size:12px; color:#888888; margin-left:15px; margin-top:10px; margin-bottom:12px; width:208px;} -.homepageImageBlock {margin:0 auto; width:78px; float:left; text-align:center; display:inline-block;} -.homepageImageNumber {font-size:12px; color:#484848;} -a.homepageImageNumber:hover {color:#15bccf;} -.homepageImageText {font-size:12px; color:#888888;} -.homepageVerDiv {height:28px; vertical-align:middle; width:1px; float:left; display:inline-block; background-color:#d1d1d1; margin-top:3px;} -.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;} -.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;} -.homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;} -.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;} -.homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;} -a.coursesLineGrey {color:#808080; display:block;} -a.coursesLineGrey:hover {color:#ffffff;} -.homepageLeftMenuMore {height:18px;} -.homepageLeftMenuMore:hover {background-color:#b3e0ee;} -.homepageLeftMenuMoreIcon {background:url(../images/homepage_icon.png) -74px -240px no-repeat; display:block; height:18px;} -.homepageMenuSetting {display:inline-block; margin-right: 17px; margin-top: 18px;} -a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;} -.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;} -.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;} -.homepageRightBanner {width:720px; height:34px; margin:0px auto; border-bottom:1px solid #e9e9e9;} -.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; background:url(../images/homepage_icon.png) -18px -230px no-repeat; width:150px; float:left; padding-left:15px; margin-top:4px;} -.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;} -.newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;} -.homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;} -.homepageNewsPortrait {width:40px; display:block; margin-top:7px;} -.homepageNewsPublisher {width:80px; max-width:80px; margin-right:10px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } -.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;} -.homepageNewsContent {width:395px; max-width:395px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } -.homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;} -a.homepageWhite {color:#ffffff !important;} -a.homepageWhite:hover {color:#a1ebff !important;} -a.newsGrey {color:#4b4b4b;} -a.newsGrey:hover {color:#000000;} -a.replyGrey {color:#888888; display:inline-block;} -a.replyGrey:hover {color:#4b4b4b;} -a.replyGrey1 {color:#888888;} -a.replyGrey1:hover {color:#4b4b4b;} -a.newsBlue {color:#15bccf;} -a.newsBlue:hover {color:#0781b4;} -a.menuGrey {color:#808080;} -a.menuGrey:hover {color:#fe7d68;} -.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #e1e1e1; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;} -#navSearchAlert {display:none;} -.none{display: none;} -.db {display:block !important;} - -/*myctrip*/ -.userImage{position:absolute; right:140px; top:5px; width:30px;height:30px; background: url(../images/item.png) 2px 4px no-repeat; line-height:1.4;} -a.topnav_login_a{color:#fff; display:inline-block;} -a.topnav_login_a:hover {color:#a1ebff;} -a.topnav_login_mes{color:#fff; width:10px;height:20px; padding-left:15px; background: url(../images/item.png) -84px -145px no-repeat; display:inline-block; vertical-align:top;} -a.topnav_login_mes:hover {color:#a1ebff;} -a.topnav_login_box{ color:#fff; font-size:14px; font-weight:bold; width:90px; display:inline-block;} -.menuArrow {background:url(../images/item.png) -20px -40px no-repeat;} -li.menuArrow:hover {background:url(../images/item.png) -20px -70px no-repeat;} -a.topnav_login_box:hover {color:#a1ebff;} -.navRow1 {margin:0; padding:0;} -.navRow2 {margin:0; padding:0;} -.topnav_login_list{ border:1px solid #269ac9; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2;} -.topnav_login_list a{color:#269ac9;} -.topnav_login_list li{ } -.portraitRadius {border-radius: 3px;} - -/*底部*/ -#Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/ -.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} -.footerAbout{ width:485px; margin:0 auto;height:35px; line-height:35px; padding-top: 10px;} -.languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;} -.departments{ width:950px; margin:5px auto 0 auto;height:30px;line-height:30px;} -.copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;} -a.f_grey {color:#666666 !important;} -a.f_grey:hover {color:#000000 !important;} -.mr30 {margin-right: 30px;} - - -/*注册登陆页面*/ -#loginSignButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;} -#loginInButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;} -#loginSignButton:hover {background-color:#297fb8;} -#loginInButton:hover {background-color:#297fb8;} +/*新个人主页框架css*/ +.navContainer {width:100%; background-color:#269ac9;} +.homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;} +.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;} +.navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;} +.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;} +.navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle; padding:0px 10px;} +.navHomepageMenu:hover {background-color:#297fb8;} +.navHomepageSearchBoxcontainer {margin-top:11px; } +.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; margin-top:11px; background-color:#ffffff;} +.navHomepageSearchInput {width:345px; height:32px; outline:none; border:none !important; float:left;padding: 0 0 0 5px !important; margin:0;} +.homepageSearchIcon {width:30px; height:32px; background:url(../images/nav_icon.png) -8px 3px no-repeat; float:left;} +a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-repeat;} +#navSearchAlert {display:none;} +.navHomepageNews {width:30px; display:block; float:right; margin-top:8px; position:relative;} +.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;} +.newsActive {width:10px; height:10px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;} +.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;} +.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;} +.homepageProfileMenuIconhover {background:url(../images/nav_icon.png) 30px -122px no-repeat;} +/*.navHomepageProfile ul li ul {display:none;} +.navHomepageProfile ul li:hover ul {display:block;}*/ +.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;} +.homepageRight {width:750px; float:left; margin-top:15px; margin-bottom:10px;} +.homepagePortraitContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:15px; padding-bottom:15px;} +.homepagePortraitImage {width:206px; height:206px; padding:2px; margin:15px 14px 10px 14px; position:relative; border:1px solid #cbcbcb;} +.homepagePortraitImage:hover {border:1px solid #15bccf;} +.homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;} +.homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;} +.homepageEditProfile {width:20px; height:20px; border-radius:2px; background-color:#888888; position:absolute; right:9px; bottom:9px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;} +.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -11px -35px no-repeat; width:20px; height:20px; display:block;} +.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:21px; float:left;} +.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;} +.homepageImageSexMan {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;} +.homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;} +.homepageSignatureTextarea {width:207px; height:80px; max-width:207px; max-height:80px; border:1px solid #d9d9d9; outline:none; margin:0px 0px 12px 15px;;} +.homepageSignature {font-size:12px; color:#888888; margin-left:15px; margin-top:10px; margin-bottom:12px; width:208px;} +.homepageImageBlock {margin:0 auto; width:78px; float:left; text-align:center; display:inline-block;} +.homepageImageNumber {font-size:12px; color:#484848;} +a.homepageImageNumber:hover {color:#15bccf;} +.homepageImageText {font-size:12px; color:#888888;} +.homepageVerDiv {height:28px; vertical-align:middle; width:1px; float:left; display:inline-block; background-color:#d1d1d1; margin-top:3px;} +.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;} +.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;} +.homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;} +.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;} +.homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;} +a.coursesLineGrey {color:#808080; display:block;} +a.coursesLineGrey:hover {color:#ffffff;} +.homepageLeftMenuMore {height:18px;} +.homepageLeftMenuMore:hover {background-color:#b3e0ee;} +.homepageLeftMenuMoreIcon {background:url(../images/homepage_icon.png) -74px -240px no-repeat; display:block; height:18px;} +.homepageMenuSetting {display:inline-block; margin-right: 17px; margin-top: 18px;} +a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;} +.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;} +.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;} +.homepageRightBanner {width:720px; height:34px; margin:0px auto; border-bottom:1px solid #e9e9e9;} +.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; background:url(../images/homepage_icon.png) -18px -230px no-repeat; width:150px; float:left; padding-left:15px; margin-top:4px;} +.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;} +.newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;} +.homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;} +.homepageNewsPortrait {width:40px; display:block; margin-top:7px;} +.homepageNewsPublisher {width:80px; max-width:80px; margin-right:10px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } +.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;} +.homepageNewsContent {width:395px; max-width:395px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } +.homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;} +a.homepageWhite {color:#ffffff !important;} +a.homepageWhite:hover {color:#a1ebff !important;} +a.newsGrey {color:#4b4b4b;} +a.newsGrey:hover {color:#000000;} +a.replyGrey {color:#888888; display:inline-block;} +a.replyGrey:hover {color:#4b4b4b;} +a.replyGrey1 {color:#888888;} +a.replyGrey1:hover {color:#4b4b4b;} +a.newsBlue {color:#15bccf;} +a.newsBlue:hover {color:#0781b4;} +a.menuGrey {color:#808080 !important;} +a.menuGrey:hover {color:#fe7d68 !important;} +.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #e1e1e1; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;} +#navSearchAlert {display:none;} +.none{display: none;} +.db {display:block !important;} + +/*myctrip*/ +.userImage{position:absolute; right:140px; top:5px; width:30px;height:30px; background: url(../images/item.png) 2px 4px no-repeat; line-height:1.4;} +a.topnav_login_a{color:#fff; display:inline-block;} +a.topnav_login_a:hover {color:#a1ebff;} +a.topnav_login_mes{color:#fff; width:10px;height:20px; padding-left:15px; background: url(../images/item.png) -84px -145px no-repeat; display:inline-block; vertical-align:top;} +a.topnav_login_mes:hover {color:#a1ebff;} +a.topnav_login_box{ color:#fff; font-size:14px; font-weight:bold; width:90px; display:inline-block;} +.menuArrow {background:url(../images/item.png) -20px -40px no-repeat;} +li.menuArrow:hover {background:url(../images/item.png) -20px -70px no-repeat;} +a.topnav_login_box:hover {color:#a1ebff;} +.navRow1 {margin:0; padding:0;} +.navRow2 {margin:0; padding:0;} +.topnav_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 1px; font-size: 12px;} +.topnav_login_list a{color:#269ac9;} +.topnav_login_list li{ } +.portraitRadius {border-radius: 3px;} + +/*底部*/ +#Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/ +.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} +.footerAbout{ width:485px; margin:0 auto;height:35px; line-height:35px; padding-top: 10px;} +.languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;} +.departments{ width:950px; margin:5px auto 0 auto;height:30px;line-height:30px;} +.copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;} +a.f_grey {color:#666666 !important;} +a.f_grey:hover {color:#000000 !important;} +.mr30 {margin-right: 30px;} + + +/*注册登陆页面*/ +#loginSignButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;} +#loginInButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;} +#loginSignButton:hover {background-color:#297fb8;} +#loginInButton:hover {background-color:#297fb8;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 54802251e..7d7566903 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -261,7 +261,7 @@ li.menuArrow:hover {background:url(../images/item.png) -20px -70px no-repeat;} a.topnav_login_box:hover {color:#a1ebff;} .navRow1 {margin:0; padding:0;} .navRow2 {margin:0; padding:0;} -.topnav_login_list{ border:1px solid #269ac9; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2;} +.topnav_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 1px;} .topnav_login_list a{color:#269ac9;} .topnav_login_list li{ } From cc7a752623b3ff1eebd4f9adf3eb87321da89b59 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 17:20:29 +0800 Subject: [PATCH 44/58] =?UTF-8?q?=E5=88=B0=E5=A4=84=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E3=80=81=E7=BC=BA=E8=AF=84=E3=80=81=E5=8C=BF=E8=AF=84=E3=80=81?= =?UTF-8?q?=E6=88=90=E7=BB=A9=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 29 +++++----------------- app/views/student_work/index.html.erb | 21 +++++++++++++--- public/javascripts/course.js | 14 +++++------ 3 files changed, 30 insertions(+), 34 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 4264f1439..c2a76fb4f 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -415,25 +415,7 @@ class StudentWorkController < ApplicationController sheet1 = book.create_worksheet :name => "homework" blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10 sheet1.row(0).default_format = blue - if @homework.homework_type == 0 #普通作业 - sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name), - l(:excel_t_score),l(:excel_ta_score),l(:excel_f_score),l(:excel_commit_time)]) - count_row = 1 - items.each do |homework| - sheet1[count_row,0]=homework.user.id - sheet1[count_row,1] = homework.user.lastname.to_s + homework.user.firstname.to_s - sheet1[count_row,2] = homework.user.login - sheet1[count_row,3] = homework.user.user_extensions.student_id - sheet1[count_row,4] = homework.user.mail - sheet1[count_row,5] = homework.name - sheet1[count_row,6] = homework.teacher_score.nil? ? l(:label_without_score) : format("%.2f",homework.teacher_score) - sheet1[count_row,7] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : format("%.2f",homework.teaching_asistant_score) - # sheet1[count_row,8] = homework.student_score.nil? ? l(:label_without_score) : format("%.2f",homework.student_score) - sheet1[count_row,8] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : format("%.2f",homework.score) : l(:label_without_score) - sheet1[count_row,9] = format_time(homework.created_at) - count_row += 1 - end - elsif @homework.homework_type == 1 #匿评作业 + if @homework.homework_type == 1 #匿评作业 sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name), l(:excel_t_score),l(:excel_ta_score), l(:excel_n_score),l(:excel_f_score),l(:excel_commit_time)]) count_row = 1 @@ -453,7 +435,7 @@ class StudentWorkController < ApplicationController end elsif @homework.homework_type == 2 #编程作业 sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name), - l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_f_score),l(:excel_commit_time)]) + l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_n_score),l(:excel_f_score),l(:excel_commit_time)]) count_row = 1 items.each do |homework| sheet1[count_row,0]=homework.user.id @@ -464,9 +446,10 @@ class StudentWorkController < ApplicationController sheet1[count_row,5] = homework.name sheet1[count_row,6] = homework.teacher_score.nil? ? l(:label_without_score) : format("%.2f",homework.teacher_score) sheet1[count_row,7] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : format("%.2f",homework.teaching_asistant_score) - sheet1[count_row,8] = homework.student_score.nil? ? l(:label_without_score) : format("%.2f",homework.student_score) - sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : format("%.2f",homework.score) : l(:label_without_score) - sheet1[count_row,10] = format_time(homework.created_at) + sheet1[count_row,8] = homework.system_score.nil? ? l(:label_without_score) : format("%.2f",homework.system_score) + sheet1[count_row,9] = homework.student_score.nil? ? l(:label_without_score) : format("%.2f",homework.student_score) + sheet1[count_row,10] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : format("%.2f",homework.score) : l(:label_without_score) + sheet1[count_row,11] = format_time(homework.created_at) count_row += 1 end end diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index fee601b5f..fcd70fe83 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -48,10 +48,23 @@
    • -
    • 导出作业成绩
    • -
    • 导出作业附件
    • -
    • 导出缺评情况
    • -
    • 导出匿评情况
    • +
    • + <%= link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'hworkExport postTypeGrey'%> +
    • +
    • + <% if @homework.student_works.empty?%> + <%= link_to "导出作业附件", "javascript:void(0)", class: "hworkExport resourcesGrey", :onclick => "alert('没有学生提交作业,无法下载附件')" %> + <% else%> + <%= link_to "导出作业附件", zipdown_assort_path(obj_class: @homework.class, obj_id: @homework, format: :json), + remote: true, class: "hworkExport resourcesGrey", :id => "download_homework_attachments" %> + <% end%> +
    • +
    • + <%= link_to("导出缺评情况", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey') if @homework.homework_type == 1%> +
    • +
    • + <%= link_to("导出匿评情况", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey') if @homework.homework_type == 1%> +
    • 评分设置
  • diff --git a/public/javascripts/course.js b/public/javascripts/course.js index ea9501371..2882ccdcc 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -897,13 +897,13 @@ $(function(){ $("#about_project label").eq(1).remove(); - //附件下载提示 - $(".zip_download_alert").bind("mouseover",function(){ - $(this).next("div").show(); - }); - $(".zip_download_alert").bind("mouseout",function(){ - $(this).next("div").hide(); - }); + ////附件下载提示 + //$(".zip_download_alert").bind("mouseover",function(){ + // $(this).next("div").show(); + //}); + //$(".zip_download_alert").bind("mouseout",function(){ + // $(this).next("div").hide(); + //}); }); //匿评弹框取消按钮 From 7254cf4689d52e320d1b3e33af2d9b3b4f6da0a8 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 17 Sep 2015 17:26:48 +0800 Subject: [PATCH 45/58] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E7=9A=84=E5=B1=9E=E6=80=A7=E5=8F=98=E5=8C=96=E6=97=B6=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=8A=A8=E6=80=81=E8=A1=A8=E4=B8=AD=E7=9B=B8=E5=BA=94?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=E7=9A=84=E6=9C=80=E5=90=8E=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/issue.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/models/issue.rb b/app/models/issue.rb index f7f596e17..2a6da44c5 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1399,6 +1399,7 @@ class Issue < ActiveRecord::Base def attachment_added(obj) if @current_journal && @current_journal.user_id == obj.author_id && JournalDetail.find_all_by_value(obj.filename).count == 0 @current_journal.details << JournalDetail.new(:property => 'attachment', :prop_key => obj.id, :value => obj.filename) + end end @@ -1407,6 +1408,9 @@ class Issue < ActiveRecord::Base if @current_journal && !obj.new_record? @current_journal.details << JournalDetail.new(:property => 'attachment', :prop_key => obj.id, :old_value => obj.filename) @current_journal.save + user_activity = UserActivity.where("act_type='Issue' and act_id =#{@current_journal.journalized_id}").first + user_activity.updated_at = Time.now + user_activity.save end end @@ -1513,6 +1517,9 @@ class Issue < ActiveRecord::Base } end @current_journal.save + user_activity = UserActivity.where("act_type='Issue' and act_id =#{@current_journal.journalized_id}").first + user_activity.updated_at = Time.now + user_activity.save # reset current journal init_journal @current_journal.user, @current_journal.notes end From 8f317711b87f60e6819ac6eebbf8284b0a138f27 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 17 Sep 2015 19:06:15 +0800 Subject: [PATCH 46/58] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E6=A1=86=E9=AB=98=E5=BA=A6=E7=9A=84=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/comments/create.js.erb | 2 +- app/views/issues/add_journal.js.erb | 2 +- app/views/messages/reply.js.erb | 2 +- app/views/users/_user_activities.html.erb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/comments/create.js.erb b/app/views/comments/create.js.erb index f0e7a6a11..b8494b02a 100644 --- a/app/views/comments/create.js.erb +++ b/app/views/comments/create.js.erb @@ -1,3 +1,3 @@ $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>"); -init_KindEditor_data('<%= @user_activity_id%>',"30px","85%"); +init_KindEditor_data('<%= @user_activity_id%>',"","85%"); diff --git a/app/views/issues/add_journal.js.erb b/app/views/issues/add_journal.js.erb index c5b698702..d2ce36b68 100644 --- a/app/views/issues/add_journal.js.erb +++ b/app/views/issues/add_journal.js.erb @@ -1,3 +1,3 @@ $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>"); -init_KindEditor_data(<%= @user_activity_id%>,"30px","85%"); \ No newline at end of file +init_KindEditor_data(<%= @user_activity_id%>,"","85%"); \ No newline at end of file diff --git a/app/views/messages/reply.js.erb b/app/views/messages/reply.js.erb index 883051365..44b4fca12 100644 --- a/app/views/messages/reply.js.erb +++ b/app/views/messages/reply.js.erb @@ -3,4 +3,4 @@ <%elsif @course%> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>"); <%end%> -init_KindEditor_data(<%= @user_activity_id%>,"30px","85%"); \ No newline at end of file +init_KindEditor_data(<%= @user_activity_id%>,"","85%"); \ No newline at end of file diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index 9eefbd1f1..d0d60266d 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -36,7 +36,7 @@ } $(function() { - init_KindEditor_data(<%= user_activity.id%>,"30px","85%"); + init_KindEditor_data(<%= user_activity.id%>,"","85%"); }); <% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %> From 7cc5ce92c68c390c7d1c70afcc15a1f9aa827565 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 20:20:20 +0800 Subject: [PATCH 47/58] =?UTF-8?q?=E5=AE=8C=E6=88=90=E8=AF=84=E5=88=86?= =?UTF-8?q?=E6=AF=94=E4=BE=8B=E8=AE=BE=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 50 ++++++++++++++- app/helpers/student_work_helper.rb | 27 ++++++++ .../student_work/_set_score_rule.html.erb | 63 +++++++++++++++++++ app/views/student_work/index.html.erb | 17 +++-- config/routes.rb | 1 + public/javascripts/course.js | 29 ++++++--- public/stylesheets/public.css | 6 +- 7 files changed, 176 insertions(+), 17 deletions(-) create mode 100644 app/views/student_work/_set_score_rule.html.erb diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index c2a76fb4f..b65fc2743 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -3,11 +3,11 @@ class StudentWorkController < ApplicationController include StudentWorkHelper require 'bigdecimal' require "base64" - before_filter :find_homework, :only => [:new, :index, :create, :student_work_absence_penalty, :absence_penalty_list, :evaluation_list, :program_test] + before_filter :find_homework, :only => [:new, :index, :create, :student_work_absence_penalty, :absence_penalty_list, :evaluation_list, :program_test,:set_score_rule] before_filter :find_work, :only => [:edit, :update, :show, :destroy, :add_score, :praise_student_work] before_filter :member_of_course, :only => [:index, :new, :create, :show, :add_score, :praise_student_work] before_filter :author_of_work, :only => [:edit, :update, :destroy] - before_filter :teacher_of_course, :only => [:student_work_absence_penalty, :absence_penalty_list, :evaluation_list] + before_filter :teacher_of_course, :only => [:student_work_absence_penalty, :absence_penalty_list, :evaluation_list, :set_score_rule] ### def program_test @@ -362,6 +362,50 @@ class StudentWorkController < ApplicationController end end + #设置评分规则 + def set_score_rule + homework_detail_manual = @homework.homework_detail_manual + homework_detail_programing = @homework.homework_detail_programing + + unless @homework.late_penalty.to_s == params[:late_penalty].to_s + @homework.late_penalty = params[:late_penalty] + @homework.student_works.where("created_at > '#{@homework.end_time} 23:59:59'").each do |student_work| + student_work.late_penalty = @homework.late_penalty + student_work.save + end + end + + unless homework_detail_manual.absence_penalty.to_s == params[:absence_penalty].to_s + homework_detail_manual.absence_penalty = params[:absence_penalty] + if homework_detail_manual.comment_status == 3 #当前作业处于匿评结束状态,修改缺评扣分才会修改每个作品应扣分的值 + work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")" + @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 + student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0 + student_work.save + end + end + end + + teacher_priority = params[:teacher_priority] ? 1 : 0 + if homework_detail_manual.ta_proportion.to_s != params[:ta_proportion].to_s || @homework.teacher_priority.to_s != teacher_priority.to_s || (homework_detail_programing && homework_detail_programing.ta_proportion.to_s != params[:sy_proportion].to_s) + homework_detail_manual.ta_proportion = params[:ta_proportion] + homework_detail_programing.ta_proportion = params[:sy_proportion] if homework_detail_programing + @homework.teacher_priority = teacher_priority + @homework.student_works.each do |student_work| + set_final_score @homework,student_work + student_work.save + end + end + + @homework.save + homework_detail_manual.save if homework_detail_manual + homework_detail_programing.save if homework_detail_programing + respond_to do |format| + format.html{redirect_to student_work_index_url(:homework => @homework.id)} + end + end + private #获取作业 def find_homework @@ -392,7 +436,7 @@ class StudentWorkController < ApplicationController end def teacher_of_course - render_403 unless User.current.allowed_to?(:as_teacher,@course) + render_403 unless User.current.allowed_to?(:as_teacher,@course) || User.current.admin? end #根据条件过滤作业结果 diff --git a/app/helpers/student_work_helper.rb b/app/helpers/student_work_helper.rb index aa359e273..834b8dd61 100644 --- a/app/helpers/student_work_helper.rb +++ b/app/helpers/student_work_helper.rb @@ -99,4 +99,31 @@ module StudentWorkHelper end result end + + #教辅评分比例下拉框 + def ta_proportion_option + type = [] + i = 0 + while i <= 100 + option = [] + option << i.to_s + "%" + option << i.to_f / 100 + type << option + i += 10 + end + type + end + + def ta_proportion_option_to num + type = [] + i = 0 + while i <= num + option = [] + option << i.to_s + "%" + option << i.to_f / 100 + type << option + i += 10 + end + type + end end \ No newline at end of file diff --git a/app/views/student_work/_set_score_rule.html.erb b/app/views/student_work/_set_score_rule.html.erb new file mode 100644 index 000000000..97deafde8 --- /dev/null +++ b/app/views/student_work/_set_score_rule.html.erb @@ -0,0 +1,63 @@ +<%= form_for('new_form',:url => {:controller => 'student_work',:action => 'set_score_rule',:homework => homework.id},:method => "post") do |f|%> +
    + 评分设置 +
    + 迟交扣分 + +
    +
    + 缺评扣分 + +
    + + <% if homework.homework_type == 2%> +
    + 系统评分 + <%= select_tag :sy_proportion,options_for_select(ta_proportion_option), {:class => "markPercentage"} %> +
    + + + <% else%> + + <% end%> + +
    + 教辅评分 + <%= select_tag :ta_proportion,options_for_select(ta_proportion_option,homework.homework_detail_manual.ta_proportion), {:class => "markPercentage"} %> +
    +
    + 学生匿评 + +
    +
    + 教师优先 + /> + 教师评分为最终评分 +
    +
    +
    + 确定 +
    +
    + 取消 +
    +
    +
    +
    +<% end%> diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index fcd70fe83..9dfebefbb 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -18,9 +18,16 @@ }); <% end%> -// $(function(){ -// $('.animated').autosize(); -// }); + //设置评分规则 + function set_score_rule(){ + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/set_score_rule',:locals => {:homework => @homework}) %>'); + showModal('ajax-modal', '350px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed"); + } +
    @@ -65,7 +72,9 @@
  • <%= link_to("导出匿评情况", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey') if @homework.homework_type == 1%>
  • -
  • 评分设置
  • +
  • + 评分设置 +
  • diff --git a/config/routes.rb b/config/routes.rb index 96b193862..756f744ae 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -121,6 +121,7 @@ RedmineApp::Application.routes.draw do get 'evaluation_list' # post 'set_program_score' post 'program_test' + post 'set_score_rule' end end diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 2882ccdcc..43341658e 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -427,10 +427,10 @@ function regex_homework_name() } } -//处理迟交扣分 -function check_late_penalty() +//处理迟交、缺评扣分 +function check_late_penalty(id) { - var obj = $("input[name='late_penalty']"); + var obj = $("#" + id); var regex = /^\d+$/; if(regex.test(obj.val())) { @@ -499,11 +499,26 @@ $(function(){ $("#absence_penalty_notice").html(" "+ $("#absence_penalty").val() +" "); }); - $("#ta_proportion").change(function(){ - var ta_proportion = $("#ta_proportion").val(); - $("#student_proportion").val((100 - parseInt(ta_proportion * 100)) + "%"); - }); + //$("#ta_proportion").change(function(){ + // var ta_proportion = $("#ta_proportion").val(); + // $("#student_proportion").val((100 - parseInt(ta_proportion * 100)) + "%"); + //}); }); + +//生成select +function build_selector(max_num){ + var html = ""; + return html; +} + //第一次加载时,如果未开启匿评作业,隐藏显示匿评配置信息 $(function(){ if($("#homework_common_homework_type").attr("id") != null && $("#homework_common_homework_type").val() != 2) diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 4c5261e02..2305fe0ff 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -497,9 +497,9 @@ a.uploadIcon {background:url(../images/resource_icon_list.png) 8px -60px no-repe .uploadKeyword {margin-bottom:10px; outline:none; border:1px solid #e6e6e6; height:30px; width:280px;} /*评分设置弹窗*/ -.markPopup {width:290px; height:auto; border:3px solid #269ac9; padding:0px 0px 15px 15px; background-color:#ffffff; z-index:1000;} -.markInput {margin-bottom:10px; outline:none; border:1px solid #e6e6e6; height:30px; width:95px; color:#3d3c3c;} -.markPercentage {margin:10px 0; border:1px solid #e6e6e6; width:60px; height:30px; outline:none; font-size:12px; color:#3d3c3c;} +.markPopup {width:290px; height:auto; padding:5px 0px 15px 15px; background-color:#ffffff; z-index:1000;} +.markInput {margin-bottom:10px; outline:none; border:1px solid #e6e6e6; height:30px; width:140px; color:#3d3c3c;} +.markPercentage {margin:10px 0; border:1px solid #e6e6e6; width:70px; height:30px; outline:none; font-size:12px; color:#3d3c3c;} /*新个人主页框架css*/ From 5bdb1cd4613dc81584cebe287c017513e9e8f762 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 17 Sep 2015 20:33:36 +0800 Subject: [PATCH 48/58] =?UTF-8?q?1=E3=80=81=E5=90=AF=E5=8A=A8=E5=8C=BF?= =?UTF-8?q?=E8=AF=84=E3=80=81=E5=85=B3=E9=97=AD=E5=8C=BF=E8=AF=84=E6=97=B6?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=A1=86=E4=BD=8D=E7=BD=AE=202=E3=80=81?= =?UTF-8?q?=E7=BC=BA=E8=AF=84=E8=AF=84=E5=88=86=E8=AE=BE=E7=BD=AE=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 2 +- .../alert_anonymous_comment.js.erb | 2 +- db/schema.rb | 90 ++++++++++++------- 3 files changed, 61 insertions(+), 33 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index b65fc2743..79ad0d2d0 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -381,7 +381,7 @@ class StudentWorkController < ApplicationController work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")" @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 - 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 end end diff --git a/app/views/homework_common/alert_anonymous_comment.js.erb b/app/views/homework_common/alert_anonymous_comment.js.erb index 375b333f1..1c354aa45 100644 --- a/app/views/homework_common/alert_anonymous_comment.js.erb +++ b/app/views/homework_common/alert_anonymous_comment.js.erb @@ -3,4 +3,4 @@ showModal('ajax-modal', '500px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + ""); -$('#ajax-modal').parent().css("top","30%").css("left","30%"); \ No newline at end of file +$('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed"); \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index 772c68cf5..9f3cdecca 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -236,6 +236,13 @@ ActiveRecord::Schema.define(:version => 20150917022239) do t.boolean "tracker_in_review_dialog", :default => false 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| t.integer "project_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" + 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| t.integer "project_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", ["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 "enabled_modules", :force => true do |t| @@ -1163,18 +1180,18 @@ ActiveRecord::Schema.define(:version => 20150917022239) do create_table "relative_memos", :force => true do |t| t.integer "osp_id" t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :null => false + t.string "subject", :null => false + t.text "content", :limit => 16777215, :null => false t.integer "author_id" - t.integer "replies_count", :default => 0 + t.integer "replies_count", :default => 0 t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.boolean "is_quote", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count_crawl", :default => 0 - t.integer "viewed_count_local", :default => 0 + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.boolean "is_quote", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count_crawl", :default => 0 + t.integer "viewed_count_local", :default => 0 t.string "url" t.string "username" t.string "userhomeurl" @@ -1199,6 +1216,19 @@ ActiveRecord::Schema.define(:version => 20150917022239) do 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| t.string "name", :limit => 30, :default => "", :null => false t.integer "position", :default => 1 @@ -1250,10 +1280,11 @@ ActiveRecord::Schema.define(:version => 20150917022239) do t.string "url" t.string "title" t.integer "share_type" - 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.integer "project_id" t.integer "user_id" + t.string "description" end create_table "softapplications", :force => true do |t| @@ -1423,8 +1454,8 @@ ActiveRecord::Schema.define(:version => 20150917022239) do t.integer "zip_code" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.integer "identity" t.string "technical_title" + t.integer "identity" t.string "student_id" t.string "teacher_realname" t.string "student_realname" @@ -1492,9 +1523,6 @@ ActiveRecord::Schema.define(:version => 20150917022239) do t.integer "active" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.integer "level" - t.integer "file" - t.integer "issue" end create_table "user_statuses", :force => true do |t| From a8c5d180694d0f5b510c02573ce07869f95513ae Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 09:32:25 +0800 Subject: [PATCH 49/58] =?UTF-8?q?1=E3=80=81=E4=B9=8B=E5=89=8D=E6=99=AE?= =?UTF-8?q?=E9=80=9A=E4=BD=9C=E4=B8=9A=E6=9B=B4=E6=94=B9=E4=B8=BA=E5=8C=BF?= =?UTF-8?q?=E8=AF=84=E4=BD=9C=E4=B8=9A=E3=80=82=E3=80=82=E3=80=82=202?= =?UTF-8?q?=E3=80=81=E7=B3=BB=E7=BB=9F=E8=AF=84=E5=88=86=E4=B8=BAnull?= =?UTF-8?q?=E6=97=B6=E9=BB=98=E8=AE=A4=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 12 +++++------ .../20150918004521_system_score_default.rb | 15 ++++++++++++++ .../20150918005722_about_normal_homework.rb | 20 +++++++++++++++++++ db/schema.rb | 4 ++-- 4 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 db/migrate/20150918004521_system_score_default.rb create mode 100644 db/migrate/20150918005722_about_normal_homework.rb diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 79ad0d2d0..83128c45a 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -637,7 +637,7 @@ class StudentWorkController < ApplicationController student_work.final_score = student_work.system_score else ta_proportion = homework.homework_detail_programing.ta_proportion + homework.homework_detail_manual.ta_proportion / 2 - final_sy_score = BigDecimal.new("#{student_work.system_score}") * BigDecimal.new("#{ta_proportion}") + final_sy_score = BigDecimal.new("#{student_work.system_score || 0}") * BigDecimal.new("#{ta_proportion}") final_st_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) final_score = final_sy_score + final_st_score student_work.final_score = format("%.2f",final_score.to_f) @@ -647,13 +647,13 @@ class StudentWorkController < ApplicationController student_work.final_score = student_work.system_score else ta_proportion = homework.homework_detail_programing.ta_proportion + (1.0 - homework.homework_detail_manual.ta_proportion - homework.homework_detail_programing.ta_proportion) / 2 - final_sy_score = BigDecimal.new("#{student_work.system_score}") * BigDecimal.new("#{ta_proportion}") + final_sy_score = BigDecimal.new("#{student_work.system_score || 0}") * BigDecimal.new("#{ta_proportion}") final_ts_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) final_score = final_sy_score + final_ts_score student_work.final_score = format("%.2f",final_score.to_f) end else - final_sy_score = BigDecimal.new("#{student_work.system_score}") * BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") + final_sy_score = BigDecimal.new("#{student_work.system_score || 0}") * BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") final_ts_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * BigDecimal.new("#{homework.homework_detail_manual.ta_proportion}") final_st_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") - BigDecimal.new("#{homework.homework_detail_manual.ta_proportion}")) final_score = final_sy_score + final_ts_score + final_st_score @@ -666,7 +666,7 @@ class StudentWorkController < ApplicationController student_work.final_score = student_work.system_score else ta_proportion = homework.homework_detail_programing.ta_proportion + homework.homework_detail_manual.ta_proportion / 2 - final_sy_score = BigDecimal.new("#{student_work.system_score}") * BigDecimal.new("#{ta_proportion}") + final_sy_score = BigDecimal.new("#{student_work.system_score || 0}") * BigDecimal.new("#{ta_proportion}") final_st_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) final_score = final_sy_score + final_st_score student_work.final_score = format("%.2f",final_score.to_f) @@ -676,13 +676,13 @@ class StudentWorkController < ApplicationController student_work.final_score = student_work.system_score else ta_proportion = homework.homework_detail_programing.ta_proportion + (1.0 - homework.homework_detail_manual.ta_proportion - homework.homework_detail_programing.ta_proportion) / 2 - final_sy_score = BigDecimal.new("#{student_work.system_score}") * BigDecimal.new("#{ta_proportion}") + final_sy_score = BigDecimal.new("#{student_work.system_score || 0}") * BigDecimal.new("#{ta_proportion}") final_ts_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) final_score = final_sy_score + final_ts_score student_work.final_score = format("%.2f",final_score.to_f) end else - final_sy_score = BigDecimal.new("#{student_work.system_score}") * BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") + final_sy_score = BigDecimal.new("#{student_work.system_score || 0}") * BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") final_ts_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * BigDecimal.new("#{homework.homework_detail_manual.ta_proportion}") final_st_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") - BigDecimal.new("#{homework.homework_detail_manual.ta_proportion}")) final_score = final_sy_score + final_ts_score + final_st_score diff --git a/db/migrate/20150918004521_system_score_default.rb b/db/migrate/20150918004521_system_score_default.rb new file mode 100644 index 000000000..6195caad9 --- /dev/null +++ b/db/migrate/20150918004521_system_score_default.rb @@ -0,0 +1,15 @@ +class SystemScoreDefault < ActiveRecord::Migration + def up + change_column :student_works,:system_score,:float,:default => 0 + + + # StudentWork.where("system_score is null").each do |student_work| + # student_work.system_score = 0 + # student_work.save + # end + end + + def down + change_column :student_works,:system_score,:float + end +end diff --git a/db/migrate/20150918005722_about_normal_homework.rb b/db/migrate/20150918005722_about_normal_homework.rb new file mode 100644 index 000000000..8e0ddf00a --- /dev/null +++ b/db/migrate/20150918005722_about_normal_homework.rb @@ -0,0 +1,20 @@ +class AboutNormalHomework < ActiveRecord::Migration + def up + HomeworkCommon.where(:homework_type => 0).each do |homework| + unless homework.homework_detail_manual + homework_detail_manual = HomeworkDetailManual.new + homework_detail_manual.ta_proportion = 0.6 + homework_detail_manual.comment_status = 1 + homework_detail_manual.evaluation_start = homework.created_at + homework_detail_manual.evaluation_end = homework.created_at + homework_detail_manual.evaluation_num = 3 + homework_detail_manual.absence_penalty = 5 + homework_detail_manual.homework_common_id = homework.id + homework_detail_manual.save + end + end + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index 9f3cdecca..78c0802e7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150917022239) do +ActiveRecord::Schema.define(:version => 20150918005722) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -1328,7 +1328,7 @@ ActiveRecord::Schema.define(:version => 20150917022239) do t.datetime "updated_at", :null => false t.integer "late_penalty", :default => 0 t.integer "absence_penalty", :default => 0 - t.integer "system_score" + t.float "system_score", :default => 0.0 t.boolean "is_test", :default => false end From 4b83265508bbb0bfa783e6940b8321ed57c47db0 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 11:05:21 +0800 Subject: [PATCH 50/58] =?UTF-8?q?1=E3=80=81=E7=BC=96=E7=A8=8B=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E5=8F=AF=E4=BB=A5=E4=BF=AE=E6=94=B9=E3=80=81=E5=88=A0?= =?UTF-8?q?=E9=99=A4=202=E3=80=81=E5=85=B3=E9=97=AD=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E7=BB=93=E6=9D=9F=E5=8C=BF=E8=AF=84=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=A0=B7=E5=BC=8F=203=E3=80=81=E7=BC=96=E7=A8=8B?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=88=90=E7=BB=A9=E8=AE=A1=E7=AE=97=E6=9C=89?= =?UTF-8?q?=E9=97=AE=E9=A2=98=204=E3=80=81=E7=9B=B8=E5=85=B3=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BF=AE=E6=94=B9=205=E3=80=81=E7=BC=96=E7=A8=8B?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E4=BD=9C=E5=93=81=E5=B1=95=E5=BC=80=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 5 +- app/helpers/application_helper.rb | 2 +- app/models/student_work.rb | 100 +++++++++++++++++- .../stop_anonymous_comment.js.erb | 2 +- .../student_work/_evaluation_un_work.html.erb | 4 +- .../_programing_work_show.html.erb | 76 ++++++++----- public/stylesheets/courses.css | 3 +- public/stylesheets/new_user.css | 4 + 8 files changed, 158 insertions(+), 38 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 83128c45a..866eecbd4 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -201,9 +201,7 @@ class StudentWorkController < ApplicationController end def destroy - if @homework.homework_type == 2 #编程作业,作品提交后不可以删除 - render_403 - elsif @work.destroy + if @work.destroy respond_to do |format| format.html { redirect_to student_work_index_url(:homework => @homework.id) @@ -257,7 +255,6 @@ class StudentWorkController < ApplicationController when 3 #学生评分 学生评分显示平均分 @work.student_score = @work.student_works_scores.where(:reviewer_role => 3).average(:score).try(:round, 2).to_f end - set_final_score @homework,@work if @work.save respond_to do |format| format.js diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f085032c3..13f1383a1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2362,7 +2362,7 @@ module ApplicationHelper if homework.homework_type == 1 && homework.homework_detail_manual && homework.homework_detail_manual.comment_status != 1 #匿评作业,且作业状态不是在开启匿评之前 link_to "作品已交", "", :class => 'c_blue', :title => "开启匿评后不可修改作品" elsif homework.homework_type == 2 #编程作业不能修改作品 - link_to "作品已交", student_work_index_path(:homework => homework.id),:class => 'c_blue',:title => "编程作业不可修改作品" + link_to "修改作品", new_student_work_path(:homework => homework.id),:class => 'c_blue' else link_to "修改作品", edit_student_work_path(work.id),:class => 'c_blue' end diff --git a/app/models/student_work.rb b/app/models/student_work.rb index 83a701f43..a6d641c0c 100644 --- a/app/models/student_work.rb +++ b/app/models/student_work.rb @@ -31,7 +31,7 @@ class StudentWork < ActiveRecord::Base else self.system_score = last_test.test_score end - self.final_score = self.system_score + set_final_score self.homework_common,self end end @@ -39,4 +39,102 @@ class StudentWork < ActiveRecord::Base self.description = last_test.src if last_test end + #成绩计算 + def set_final_score homework,student_work + if homework && homework.homework_detail_manual + if homework.homework_type == 1 #匿评作业 + if homework.teacher_priority == 1 #教师优先 + if student_work.teacher_score + student_work.final_score = student_work.teacher_score + else + if student_work.teaching_asistant_score.nil? + student_work.final_score = student_work.student_score + elsif student_work.student_score.nil? + student_work.final_score = student_work.teaching_asistant_score + else + ta_proportion = homework.homework_detail_manual.ta_proportion + final_ta_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * BigDecimal.new("#{ta_proportion}") + final_s_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) + final_score = final_ta_score + final_s_score + student_work.final_score = format("%.2f",final_score.to_f) + end + end + else #不考虑教师评分 + if student_work.teaching_asistant_score.nil? + student_work.final_score = student_work.student_score + elsif student_work.student_score.nil? + student_work.final_score = student_work.teaching_asistant_score + else + ta_proportion = homework.homework_detail_manual.ta_proportion + final_ta_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * BigDecimal.new("#{ta_proportion}") + final_s_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) + final_score = final_ta_score + final_s_score + student_work.final_score = format("%.2f",final_score.to_f) + end + end + elsif homework.homework_type == 2 && homework.homework_detail_programing #编程作业-----设定:系统评分必定不为空 + if homework.teacher_priority == 1 #教师优先 + if student_work.teacher_score + student_work.final_score = student_work.teacher_score + else + if student_work.teaching_asistant_score.nil? #教辅未评分 + if student_work.student_score.nil? + student_work.final_score = student_work.system_score + else + ta_proportion = homework.homework_detail_programing.ta_proportion + homework.homework_detail_manual.ta_proportion / 2 + final_sy_score = BigDecimal.new("#{student_work.system_score || 0}") * BigDecimal.new("#{ta_proportion}") + final_st_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) + final_score = final_sy_score + final_st_score + student_work.final_score = format("%.2f",final_score.to_f) + end + elsif student_work.student_score.nil? #学生未评分 + if student_work.teaching_asistant_score.nil? + student_work.final_score = student_work.system_score + else + ta_proportion = homework.homework_detail_programing.ta_proportion + (1.0 - homework.homework_detail_manual.ta_proportion - homework.homework_detail_programing.ta_proportion) / 2 + final_sy_score = BigDecimal.new("#{student_work.system_score || 0}") * BigDecimal.new("#{ta_proportion}") + final_ts_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) + final_score = final_sy_score + final_ts_score + student_work.final_score = format("%.2f",final_score.to_f) + end + else + final_sy_score = BigDecimal.new("#{student_work.system_score || 0}") * BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") + final_ts_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * BigDecimal.new("#{homework.homework_detail_manual.ta_proportion}") + final_st_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") - BigDecimal.new("#{homework.homework_detail_manual.ta_proportion}")) + final_score = final_sy_score + final_ts_score + final_st_score + student_work.final_score = format("%.2f",final_score.to_f) + end + end + else #不考虑教师评分 + if student_work.teaching_asistant_score.nil? #教辅未评分 + if student_work.student_score.nil? + student_work.final_score = student_work.system_score + else + ta_proportion = homework.homework_detail_programing.ta_proportion + homework.homework_detail_manual.ta_proportion / 2 + final_sy_score = BigDecimal.new("#{student_work.system_score || 0}") * BigDecimal.new("#{ta_proportion}") + final_st_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) + final_score = final_sy_score + final_st_score + student_work.final_score = format("%.2f",final_score.to_f) + end + elsif student_work.student_score.nil? #学生未评分 + if student_work.teaching_asistant_score.nil? + student_work.final_score = student_work.system_score + else + ta_proportion = homework.homework_detail_programing.ta_proportion + (1.0 - homework.homework_detail_manual.ta_proportion - homework.homework_detail_programing.ta_proportion) / 2 + final_sy_score = BigDecimal.new("#{student_work.system_score || 0}") * BigDecimal.new("#{ta_proportion}") + final_ts_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}")) + final_score = final_sy_score + final_ts_score + student_work.final_score = format("%.2f",final_score.to_f) + end + else + final_sy_score = BigDecimal.new("#{student_work.system_score || 0}") * BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") + final_ts_score = BigDecimal.new("#{student_work.teaching_asistant_score}") * BigDecimal.new("#{homework.homework_detail_manual.ta_proportion}") + final_st_score = BigDecimal.new("#{student_work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{homework.homework_detail_programing.ta_proportion}") - BigDecimal.new("#{homework.homework_detail_manual.ta_proportion}")) + final_score = final_sy_score + final_ts_score + final_st_score + student_work.final_score = format("%.2f",final_score.to_f) + end + end + end + end + end end diff --git a/app/views/homework_common/stop_anonymous_comment.js.erb b/app/views/homework_common/stop_anonymous_comment.js.erb index 9a6131c64..70122c7ab 100644 --- a/app/views/homework_common/stop_anonymous_comment.js.erb +++ b/app/views/homework_common/stop_anonymous_comment.js.erb @@ -1,2 +1,2 @@ -$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('匿评结束'); +$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('匿评结束'); alert('关闭成功'); \ No newline at end of file diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index a170f39ab..caaaa2775 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -37,8 +37,8 @@ <% if @homework.homework_type == 2%> -
  • - <%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%> +
  • + <%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
  • <% end%>
  • diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb index 10e1870ef..b5ff8f064 100644 --- a/app/views/student_work/_programing_work_show.html.erb +++ b/app/views/student_work/_programing_work_show.html.erb @@ -1,42 +1,56 @@
    -
    +
    • - - 上交时间: - + 上交时间: <%=format_time @work.created_at %>
    • - <% if @work.user != User.current%> - + + <% if @work.user == User.current && @homework.homework_detail_manual.comment_status == 1 %> + +
    • + <%= link_to("", student_work_path(@work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %> +
    • +
    • + <%= link_to "",new_student_work_path(:homework => @homework.id),:class => "pic_edit"%> +
    • + <% end%> + <% if @homework.homework_detail_manual.comment_status == 3 && @work.user != User.current%> +
    • <%= render :partial => 'student_work_praise' %>
    • <% end%>
      +
    • - - 编程代码: - -
      - <%= text_format @work.description%> + 编程代码: +
      + <%= text_format(@work.description) if @work.description%>
    • <% if @is_teacher%> -
    • +
    • 测试结果:
      <% @work.student_work_tests.each_with_index do |test, index| %>
      -

      第<%= @work.student_work_tests.count - index%>次测试

      <%= test.created_at.to_s(:db) %> +

      + 第<%= @work.student_work_tests.count - index%>次测试 +

      + + <%= test.created_at.to_s(:db) %> +
      <% if test.status.to_i == -2 %> -
      <%= test.results.first %>
      +
      + <%= test.results.first %> +
      <% else %>
        @@ -46,9 +60,9 @@ <% if x["status"].to_i != 0 %> 测试错误! 您的输出: - <%=x["result"]%> + <%=x["result"]%> 正确输出: - <%=x["output"]%> + <%=x["output"]%>
        <% else %> 测试正确! @@ -56,27 +70,33 @@ <% end %> <% end %> -
      +
    <% end %> <% end %>
  • - - -
    - <%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%> -
    <% end%> + +
  • + <% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%> + +
    + <%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%> +
    + <% end%> +
    +
  • -
    - <%@work.student_works_scores.order("updated_at desc").each do |score|%> +
    + <%@student_work_scores.each do |score|%>
    - <%= render :partial => 'student_work_score',:locals => {:score => score}%> + <%= render :partial => 'student_work_score',:locals => {:score => score,:is_last => score == @student_work_scores.last}%>
    <% end%> -
    - 收起 +
    + + 收起
    -
    \ No newline at end of file + \ No newline at end of file diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 125016994..d6e4c5519 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -284,6 +284,7 @@ a:hover.tijiao{ background:#0f99a9;} .members_left ul li a{ float:left; text-align:center;} .members_left ul li span{ float:left; text-align:center; color:#484747;} .w150{ text-align:center; width:150px;min-height: 10px;} +.width150{width:150px;min-height: 10px;} .f_b{ font-weight: bold;} .members_right label{ margin-left:15px;} .N_search{ height:20px; border:1px solid #999;} @@ -692,7 +693,7 @@ a.hwork_center{ display:block; width:60px; text-align:center; margin-right:5px;} .show_hwork_arrow{ position:relative; top:2px; left:165px;background:url(../images/course/arrow_up.jpg) 0 0 no-repeat; width:20px; height:11px;} .tit_fb{ font-weight:bold; width:66px; text-align:right; display:block; float:left;} .ml160{ margin-left:160px;} -.show_hwork_p{ width:580px; float:left;} +.show_hwork_p{ width:630px; float:left;} .hwork_ping_text{ float:left; border:1px solid #e4e4e4; padding:5px; width:615px; height:35px;} .ping_box{ width:676px; padding:10px; background:#f5f3f3; } a.ping_pic{ display:block; width:34px; height:34px; padding:2px; border:1px solid #e3e3e3;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 219418a37..5fe0698fd 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -1141,3 +1141,7 @@ a:hover.tijiao{ background:#0f99a9;} .c_pink{ color:#e65d5e;} .ni_con_work { width:300px; margin:25px 20px;} .ni_con_work p{ color:#808181; } + +a.link_file_a{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; } +a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;} +.link_file_a{ display:block; max-width:450px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} \ No newline at end of file From 859fe01c523487a9f028042ddeeb20a7a8e09559 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 11:14:59 +0800 Subject: [PATCH 51/58] =?UTF-8?q?1=E3=80=81=E7=BC=96=E7=A8=8B=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E6=97=A0=E6=B3=95=E5=AF=BC=E5=87=BA=E7=BC=BA=E8=AF=84?= =?UTF-8?q?=E3=80=81=E5=8C=BF=E8=AF=84=E5=88=97=E8=A1=A8=202=E3=80=81?= =?UTF-8?q?=E7=BC=96=E7=A8=8B=E4=BD=9C=E4=B8=9A=E8=AF=84=E5=88=86=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=88=9D=E5=A7=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- .../student_work/_set_score_rule.html.erb | 4 +- app/views/student_work/index.html.erb | 4 +- public/javascripts/course.js | 54 +++++++++---------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index cf6305e4d..2a8b4b74a 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -453,7 +453,7 @@ class UsersController < ApplicationController render_attachment_warning_if_needed(homework) homework_detail_manual = HomeworkDetailManual.new - homework_detail_manual.ta_proportion = homework.homework_type == 1 ? 0.6 : 0.2 + homework_detail_manual.ta_proportion = homework.homework_type == 1 ? 0.6 : 0.3 homework_detail_manual.comment_status = 1 homework_detail_manual.evaluation_start = Time.now homework_detail_manual.evaluation_end = Time.now diff --git a/app/views/student_work/_set_score_rule.html.erb b/app/views/student_work/_set_score_rule.html.erb index 97deafde8..532972c45 100644 --- a/app/views/student_work/_set_score_rule.html.erb +++ b/app/views/student_work/_set_score_rule.html.erb @@ -13,7 +13,7 @@ <% if homework.homework_type == 2%>
    系统评分 - <%= select_tag :sy_proportion,options_for_select(ta_proportion_option), {:class => "markPercentage"} %> + <%= select_tag :sy_proportion,options_for_select(ta_proportion_option,homework.homework_detail_programing.ta_proportion), {:class => "markPercentage"} %>
    \ No newline at end of file diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js index ca07093fe..0499ac5fb 100644 --- a/public/javascripts/homework.js +++ b/public/javascripts/homework.js @@ -168,7 +168,14 @@ $(function(){ $("#BluePopupBox").on('click', 'a.icon_add', function(){ var html = bt('t:test-answer-list', null); $(this).parent('.mt10').after(html); - + var inputs = document.getElementsByName("program[input][]"); + var outputs = document.getElementsByName("program[output][]"); + if (inputs.length == outputs.length) { + for (var i=0; i minHeight) { + if (maxHeight && elem.scrollHeight > maxHeight) { + height = maxHeight - padding; + style.overflowY = 'auto'; + style2.overflowY = 'auto'; + } else { + height = elem.scrollHeight - padding; + style.overflowY = 'hidden'; + style2.overflowY = 'hidden'; + }; + style.height = height + extra + 'px'; + style2.height = height + extra + 'px'; + scrollTop += parseInt(style.height) - elem.currHeight; + document.body.scrollTop = scrollTop; + document.documentElement.scrollTop = scrollTop; + elem.currHeight = parseInt(style.height); + }; + if (elem2.scrollHeight > minHeight) { + if (maxHeight && elem2.scrollHeight > maxHeight) { + height = maxHeight - padding; + style.overflowY = 'auto'; + style2.overflowY = 'auto'; + } else { + height = elem2.scrollHeight - padding; + style.overflowY = 'hidden'; + style2.overflowY = 'hidden'; + }; + style.height = height + extra + 'px'; + style2.height = height + extra + 'px'; + scrollTop += parseInt(style2.height) - elem2.currHeight; + document.body.scrollTop = scrollTop; + document.documentElement.scrollTop = scrollTop; + elem2.currHeight = parseInt(style2.height); + }; + }; + + addEvent(elem, 'propertychange', change); + addEvent(elem, 'input', change); + addEvent(elem, 'focus', change); + addEvent(elem2, 'propertychange', change); + addEvent(elem2, 'input', change); + addEvent(elem2, 'focus', change); + change(); +}; \ No newline at end of file From 8eb2c75cbc8775ed3dac5c3126579773d04d1dfc Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 11:29:58 +0800 Subject: [PATCH 53/58] =?UTF-8?q?1=E3=80=81=E7=BC=96=E7=A8=8B=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E4=BF=AE=E6=94=B9=E8=AF=84=E5=88=86=E6=AF=94=E4=BE=8B?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E6=88=90=E7=BB=A9=E8=AE=A1=E7=AE=97=E9=97=AE?= =?UTF-8?q?=E9=A2=98=202=E3=80=81=E5=85=B3=E9=97=AD=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 13 +++++++++---- .../homework_common/stop_anonymous_comment.js.erb | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 866eecbd4..251fd80c4 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -370,6 +370,8 @@ class StudentWorkController < ApplicationController student_work.late_penalty = @homework.late_penalty student_work.save end + + @homework.save end unless homework_detail_manual.absence_penalty.to_s == params[:absence_penalty].to_s @@ -382,6 +384,8 @@ class StudentWorkController < ApplicationController student_work.save end end + + homework_detail_manual.save if homework_detail_manual end teacher_priority = params[:teacher_priority] ? 1 : 0 @@ -389,15 +393,16 @@ class StudentWorkController < ApplicationController homework_detail_manual.ta_proportion = params[:ta_proportion] homework_detail_programing.ta_proportion = params[:sy_proportion] if homework_detail_programing @homework.teacher_priority = teacher_priority + + @homework.save + homework_detail_manual.save if homework_detail_manual + homework_detail_programing.save if homework_detail_programing + @homework.student_works.each do |student_work| set_final_score @homework,student_work student_work.save end end - - @homework.save - homework_detail_manual.save if homework_detail_manual - homework_detail_programing.save if homework_detail_programing respond_to do |format| format.html{redirect_to student_work_index_url(:homework => @homework.id)} end diff --git a/app/views/homework_common/stop_anonymous_comment.js.erb b/app/views/homework_common/stop_anonymous_comment.js.erb index 70122c7ab..3cbac1bf6 100644 --- a/app/views/homework_common/stop_anonymous_comment.js.erb +++ b/app/views/homework_common/stop_anonymous_comment.js.erb @@ -1,2 +1,2 @@ -$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('匿评结束'); +$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('匿评结束'); alert('关闭成功'); \ No newline at end of file From cdc285797e1d0112538475c8278d3c6f729a29d3 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 11:33:52 +0800 Subject: [PATCH 54/58] =?UTF-8?q?=E7=BC=96=E7=A8=8B=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E8=AF=84=E5=88=86=E6=AF=94=E4=BE=8B=E8=AE=BE=E7=BD=AE=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E5=8A=A0=E8=BD=BD=E6=97=B6=E6=95=99=E8=BE=85?= =?UTF-8?q?=E8=AF=84=E5=88=86=E7=99=BE=E5=88=86=E6=AF=94=E4=B8=8A=E9=99=90?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_set_score_rule.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/student_work/_set_score_rule.html.erb b/app/views/student_work/_set_score_rule.html.erb index 532972c45..7deed7fb8 100644 --- a/app/views/student_work/_set_score_rule.html.erb +++ b/app/views/student_work/_set_score_rule.html.erb @@ -39,7 +39,7 @@
    教辅评分 - <%= select_tag :ta_proportion,options_for_select(ta_proportion_option,homework.homework_detail_manual.ta_proportion), {:class => "markPercentage"} %> + <%= select_tag :ta_proportion,options_for_select(ta_proportion_option_to(100-(homework.homework_detail_programing ? homework.homework_detail_programing.ta_proportion * 100 : 0).to_i),homework.homework_detail_manual.ta_proportion), {:class => "markPercentage"} %>
    学生匿评 From 281e97e46859c5378980427be3a3f3498eec6db2 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 12:00:04 +0800 Subject: [PATCH 55/58] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=86=85=E8=80=81?= =?UTF-8?q?=E5=B8=88=E5=8F=AF=E4=BB=A5=E5=AF=B9=E4=BD=9C=E4=B8=9A=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E7=BC=96=E8=BE=91=E3=80=81=E5=88=A0=E9=99=A4=E3=80=81?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=8C=BF=E8=AF=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 21 +++++++++------------ app/views/homework_common/index.html.erb | 6 +++--- public/stylesheets/courses.css | 2 ++ public/stylesheets/public.css | 4 ++-- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 13f1383a1..c557e9aae 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2297,13 +2297,6 @@ module ApplicationHelper #获取匿评相关连接代码 def homework_anonymous_comment homework - # if homework.homework_type == 1 && homework.homework_detail_manual #匿评作业 - # - # elsif homework.homework_type == 2 && homework.homework_detail_programing #编程作业作业 - # link = "编程作业".html_safe - # else - # link = "启动匿评".html_safe - # end if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "作业截止日期之前不可以启动匿评" elsif homework.student_works.count >= 2 #作业份数大于2 @@ -2324,14 +2317,18 @@ module ApplicationHelper def student_new_homework homework work = cur_user_works_for_homework homework if work.nil? - link_to l(:label_commit_homework), new_student_work_path(:homework => homework.id),:class => 'fr mr10 work_edit' + link_to "提交作品", new_student_work_path(:homework => homework.id),:class => 'fr mr10 work_edit' else if homework.homework_type == 1 && homework.homework_detail_manual && homework.homework_detail_manual.comment_status != 1 #匿评作业,且作业状态不是在开启匿评之前 - "#{l(:label_edit_homework)}".html_safe - elsif homework.homework_type == 2 #编程作业不能修改作品 - "作品已交".html_safe + link_to "作品已交", "javascript:void(0);", :class => 'fr mr10 pr_join_span c_white', :title => "开启匿评后不可修改作品" + elsif homework.homework_type == 2 #编程作业修改作品 + if homework.homework_detail_manual && homework.homework_detail_manual.comment_status != 1 + link_to "作品已交", "javascript:void(0);", :class => 'fr mr10 pr_join_span c_white', :title => "开启匿评后不可修改作品" + else + link_to "修改作品", new_student_work_path(:homework => homework.id),:class => 'fr mr10 work_edit' + end else - link_to l(:label_edit_homework), edit_student_work_path(work.id),:class => 'fr mr10 work_edit c_blue' + link_to "修改作品", edit_student_work_path(work.id),:class => 'fr mr10 work_edit' end end end diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index a39f93671..d7723452b 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -25,9 +25,9 @@ ( <%= link_to homework.student_works.count, student_work_index_path(:homework => homework.id), :class => 'c_red'%> )

    <% if @is_teacher%> - <%#= homework_anonymous_comment(homework)%> - <%#= link_to(l(:label_bid_respond_delete), homework_common_path(homework),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %> - <%#= link_to(l(:button_edit),edit_homework_common_path(homework), :class => "fr mr10 work_edit") %> + <%= homework_anonymous_comment(homework)%> + <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %> + <%= link_to(l(:button_edit),edit_homework_common_path(homework), :class => "fr mr10 work_edit") %> <% elsif @is_student%> <%= student_anonymous_comment homework %> <%= student_new_homework homework %> diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index d6e4c5519..7c1e590db 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -852,4 +852,6 @@ a:hover.c_grey{ color:#333;} .link_file_a{ display:block; max-width:450px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .last_time{width:auto; text-align:right; margin-right:70px;} .link_file_box{ width:360px;} +a.postOptionLink{float: right;color: #64bdd9;display: block;padding: 1px 5px;border: 1px solid #64bdd9;width: initial;} +a:hover.postOptionLink {color: #fff;background: #64bdd9;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 2305fe0ff..dc5ab607f 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -623,8 +623,8 @@ a.postReplyCancel:hover {color:#ffffff;} .homepagePostSettingIcon {background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px;} .homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;} .homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;} -a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;} -a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;} +/*a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;}*/ +/*a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;}*/ .homepagePostReplyPortrait {float:left; width:45px;} .homepagePostReplyDes {float:left; width:620px; margin-left:15px;} .homepagePostReplyPublisher {font-size:12px; color:#484848; margin-bottom:5px;} From 9d9ed24d1b2fb766cab10cfc51ef64798c22cc67 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 13:51:37 +0800 Subject: [PATCH 56/58] 111 --- app/helpers/application_helper.rb | 2 +- .../users/new_user_commit_homework.html.erb | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c557e9aae..8a456ee12 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2309,7 +2309,7 @@ module ApplicationHelper link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束" end else - link = link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "学生提交作业数大于2时才可以启动匿评" + link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "学生提交作业数大于2时才可以启动匿评" end link end diff --git a/app/views/users/new_user_commit_homework.html.erb b/app/views/users/new_user_commit_homework.html.erb index ab7cb5b59..19a971ece 100644 --- a/app/views/users/new_user_commit_homework.html.erb +++ b/app/views/users/new_user_commit_homework.html.erb @@ -49,11 +49,17 @@
    -
    <%= @homework.name %>
    截止时间:<%= @homework.end_time %> -
    - <%= @homework.user.show_name %> -

    <%= @homework.description.html_safe %>
    -

    +
    + <%= @homework.name %> +
    + + 截止时间:<%= @homework.end_time %> + +
    + <%= @homework.user.show_name %> +

    + <%= @homework.description.html_safe %> +

    From cf2a00d7a8642c10f2269678cd0c1575cd1c28e3 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 18 Sep 2015 14:25:04 +0800 Subject: [PATCH 57/58] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=EF=BC=9A=E7=BC=96=E7=A8=8B=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=EF=BC=8C=E5=8C=BF=E8=AF=84=E9=98=B6=E6=AE=B5?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_homework_list.html.erb | 27 ++++++++++++++++---- public/stylesheets/new_user.css | 2 ++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/app/views/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb index 6a9ffb727..c6e827291 100644 --- a/app/views/users/_user_homework_list.html.erb +++ b/app/views/users/_user_homework_list.html.erb @@ -11,18 +11,35 @@ TO <%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%>
    - + + <% if homework_common.homework_detail_manual.comment_status == 1%> + 未开启匿评 + <% elsif homework_common.homework_detail_manual.comment_status == 2%> + 匿评中 + <% elsif homework_common.homework_detail_manual.comment_status == 3%> + 匿评已结束 + <% end%>
    <%= user_for_homework_common homework_common,is_teacher %>
    <% if homework_common.homework_type == 2 && is_teacher%> -
    - <%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: homework_common.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %> -
    +
    + <%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: homework_common.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %> +
    + <% end %> + <% if homework_common.homework_type == 2%> +
    + 语言: + <% if homework_common.homework_detail_programing.language.to_i == 1%> + C + <% elsif homework_common.homework_detail_programing.language.to_i == 2%> + C++ + <% end%> +
    <% end %>
    <%= l(:label_end_time)%>:<%= homework_common.end_time%> diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 4e1ef745c..c15fbbccd 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -223,6 +223,7 @@ a:hover.bgreen_n_btn{background:#08a384;} .upbtn{ margin:42px 0 0 10px; border:none; color:#999; width:150px;} .red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} .green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} +.grey_btn_cir{ background:#b2b2b2; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;} .blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} .orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;} .bgreen_btn_cir{ background:#1abc9c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;} @@ -916,6 +917,7 @@ a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-r .ProResultCon{ padding:10px; color:#888888; line-height:24px; border-bottom:1px solid #dddddd; } .W50{ width:50px;} .W200{ width:200px;} +.m_w530{max-width: 530px;} .ProResultTable{ color:#888888;} .T_C{ text-align:center;} .SearchIcon{background:url(../images/homepage_icon2.png) 676px -393px no-repeat; } From 154cd7de6f681d3cd1abd038395131a8f8df9480 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Sep 2015 14:31:19 +0800 Subject: [PATCH 58/58] =?UTF-8?q?=E5=AD=90=E5=9F=9F=E5=90=8D=E7=9A=84?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 4 ++-- app/views/layouts/new_base_user.html.erb | 6 +++--- app/views/users/_course_homework.html.erb | 8 ++++---- app/views/users/_course_message.html.erb | 18 +++++++++--------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f085032c3..f507190ca 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2344,9 +2344,9 @@ module ApplicationHelper homework = default_opt[:homework] work = cur_user_works_for_homework homework if work.nil? && !is_teacher - link_to "提交("+homework.student_works.count.to_s+")", new_student_work_path(:homework => homework.id), :class=> default_opt[:class] + link_to "提交("+homework.student_works.count.to_s+")", new_student_work_path(:homework => homework.id,:host=> Setting.host_course), :class=> default_opt[:class] else - link_to "提交("+homework.student_works.count.to_s+")", student_work_index_path(:homework => homework.id), :class=> default_opt[:class] + link_to "提交("+homework.student_works.count.to_s+")", student_work_index_path(:homework => homework.id,:host=> Setting.host_course), :class=> default_opt[:class] end end diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 77d54b3c0..b86838c0b 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -103,7 +103,7 @@ 课程 <% if is_current_user%> <% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%> - <%=link_to "", new_course_path, :class => "homepageMenuSetting fr", :title => "新建课程"%> + <%=link_to "", new_course_path(:host=> Setting.host_course), :class => "homepageMenuSetting fr", :title => "新建课程"%> <% else%> <%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:remote => true, :title => "加入课程"%> <% end%> @@ -119,7 +119,7 @@ 项目 <% if is_current_user%> - <%=link_to "", new_project_path, :class => "homepageMenuSetting fr", :title => "新建项目"%> + <%=link_to "", new_project_path(:host=> Setting.host_name), :class => "homepageMenuSetting fr", :title => "新建项目"%> <% end%>
    <% projects = @user.projects.visible.select("projects.*,(SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)%> @@ -130,7 +130,7 @@
    - <%= link_to '留言',feedback_path(@user),:class=>'homepageMenuText'%> + <%= link_to '留言',feedback_path(@user, :host=> Setting.host_user),:class=>'homepageMenuText'%>
    diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index b1ca2838a..58b29696c 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -6,14 +6,14 @@
    <% if activity.try(:user).try(:realname) == ' ' %> - <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:user), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> <% else %> - <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> <% end %> TO - <%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id), :class => "newsBlue ml15"%> + <%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
    - <%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id), :class => "postGrey"%> + <%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
    diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index e98d8fe79..f0c03b904 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -1,23 +1,23 @@
    - <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
    <% if activity.try(:author).try(:realname) == ' ' %> - <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:author), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> <% else %> - <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> <% end %> TO - <%= link_to activity.course.name.to_s+" | 课程讨论区", course_boards_path(activity.course), :class => "newsBlue ml15 mr5"%> + <%= link_to activity.course.name.to_s+" | 课程讨论区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>
    <% if activity.parent_id.nil? %> - <%= link_to activity.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey" %> + <%= link_to activity.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id,:host=> Setting.host_course), :class=> "postGrey" %> <% else %> - <%= link_to activity.parent.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey"%> + <%= link_to activity.parent.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id,:host=> Setting.host_course), :class=> "postGrey"%> <% end %>
    @@ -75,14 +75,14 @@ <% replies_all_i=replies_all_i+1 %>
  • - <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
    <% if reply.try(:author).try(:realname) == ' ' %> - <%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> + <%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %> <% else %> - <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> + <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %> <% end %> <%= format_time(reply.created_on) %>