From 9be2cb56a1cc677d99ff891e43f5b4ce511f217f Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 15 Feb 2017 11:12:10 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"=E6=B5=8B=E9=AA=8C=E5=A4=B4?= =?UTF-8?q?=E9=83=A8=E5=92=8C=E6=96=B0=E5=BB=BA=E9=A2=98=E7=9B=AE=E7=9A=84?= =?UTF-8?q?=E6=94=B9=E7=89=88""?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 5a6e64beb2c69449dcb3049005e96c375abfccf6. Conflicts: db/schema.rb public/stylesheets/css/courses.css --- app/controllers/exercise_controller.rb | 4 +- app/helpers/exercise_helper.rb | 39 ++++ app/views/exercise/_edit_head.html.erb | 16 +- app/views/exercise/_exercise_form.html.erb | 61 +++++- app/views/exercise/_new_MC.html.erb | 80 ++++---- app/views/exercise/_new_MCQ.html.erb | 53 +++-- app/views/exercise/_new_question.html.erb | 6 +- app/views/exercise/_new_single.html.erb | 16 +- app/views/exercise/_show_head.html.erb | 12 +- .../20161129084352_add_column_to_exercises.rb | 7 + db/schema.rb | 194 ++++++++++++------ public/stylesheets/css/courses.css | 7 +- 12 files changed, 331 insertions(+), 164 deletions(-) create mode 100644 db/migrate/20161129084352_add_column_to_exercises.rb diff --git a/app/controllers/exercise_controller.rb b/app/controllers/exercise_controller.rb index 79a32fc76..062528f30 100644 --- a/app/controllers/exercise_controller.rb +++ b/app/controllers/exercise_controller.rb @@ -132,7 +132,9 @@ class ExerciseController < ApplicationController @exercise.time = params[:exercise][:time].blank? ? -1 : params[:exercise][:time] @exercise.end_time = Time.at(params[:exercise][:end_time].to_time.to_i + 16*60*60 -1) @exercise.publish_time = params[:exercise][:publish_time] - @exercise.show_result = params[:exercise][:show_result].blank? ? 1 : params[:exercise][:show_result] + @exercise.show_result = params[:show_result].blank? ? 1 : params[:show_result] + @exercise.question_random = params[:question_random] + @exercise.choice_random = params[:choice_random] if @exercise.save respond_to do |format| format.js diff --git a/app/helpers/exercise_helper.rb b/app/helpers/exercise_helper.rb index 6dadf92b5..47fccefff 100644 --- a/app/helpers/exercise_helper.rb +++ b/app/helpers/exercise_helper.rb @@ -175,4 +175,43 @@ module ExerciseHelper standard_answer end + # 问题随机的下拉列表 + def question_random_select + type = [] + option1 = [] + option1 << "题目不随机打乱" + option1 << 0 + type << option1 + option2 = [] + option2 << "题目随机打乱" + option2 << 1 + type << option2 + end + + # 选项随机的下拉列表 + def choice_random_select + type = [] + option1 = [] + option1 << "选项不随机打乱" + option1 << 0 + type << option1 + option2 = [] + option2 << "选项随机打乱" + option2 << 1 + type << option2 + end + + #允许学生查看结果的下拉列表 + def show_result_select + type = [] + option1 = [] + option1 << "允许学生查看测验结果" + option1 << 1 + type << option1 + option2 = [] + option2 << "不允许学生查看测验结果" + option2 << 0 + type << option2 + end + end \ No newline at end of file diff --git a/app/views/exercise/_edit_head.html.erb b/app/views/exercise/_edit_head.html.erb index a071904ce..6c8e165a0 100644 --- a/app/views/exercise/_edit_head.html.erb +++ b/app/views/exercise/_edit_head.html.erb @@ -16,13 +16,15 @@
- diff --git a/app/views/exercise/_exercise_form.html.erb b/app/views/exercise/_exercise_form.html.erb index cb41cf26b..c2c01ac25 100644 --- a/app/views/exercise/_exercise_form.html.erb +++ b/app/views/exercise/_exercise_form.html.erb @@ -168,17 +168,55 @@ $("#edit_poll_questions_"+question_id).show(); $("#poll_questions_title_"+question_id).focus(); } - //单选题 - function add_single_answer(doc) - { - var li = doc.parent().after("
  • " + - ""+ - "
  • "); - var select_items =$("label[name='select_items']",li.parent()); - for(var i=0; i:   "); + // 选项的选择 + function toggle_select(doc, type){ + if(doc.hasClass("question_choice_blue")){ + doc.removeClass("question_choice_blue").addClass("question_choice_white"); + if(type == "1"){ + $("#question_standard_answer").html("请点击选项"); + $("#exercise_choice").val(""); + }else{ + var eles = doc.parent().parent().find("a.question_choice_blue"); + var str = ""; + if(eles.length > 0){ + for(var i=0; i" + + ""+ + "
    "); + var select_items =$("li.new_answer",li.parent()); + li.prev().prev().find("a.question_choice_white").html(String.fromCharCode(64 + select_items.length)); + doc.prev("a.question_choice_dash").html(String.fromCharCode(64 + select_items.length + 1)); + } function add_candidate_answer(doc) { doc.parent().after("
  • " + @@ -214,10 +252,11 @@ { var parent = doc.parent().parent(); doc.parent().remove(); - var select_items =$("label[name='select_items']",parent); + + var select_items =$("li.ur_item",parent); var candiate_items =$("label[name='candiate_items']",parent); for(var i=0; i:   "); + $(select_items[i]).find("a.choice_btn").html(String.fromCharCode(64 + parseInt(i+1))); } for(var i=0; i:   "); diff --git a/app/views/exercise/_new_MC.html.erb b/app/views/exercise/_new_MC.html.erb index 054285825..6ebf3bd40 100644 --- a/app/views/exercise/_new_MC.html.erb +++ b/app/views/exercise/_new_MC.html.erb @@ -3,6 +3,14 @@ :url=>create_exercise_question_exercise_path(exercise.id), :remote=>true ) do |f| %>
    +
    + <% score = exercise.exercise_questions.where("question_type=1").last.nil? ? "": exercise.exercise_questions.where("question_type=1").last.question_score %> + + 分 + 请点击选项 + 标准答案: +
    +
    @@ -10,52 +18,44 @@
      -
    • - <% score = exercise.exercise_questions.where("question_type=1").last.nil? ? "": exercise.exercise_questions.where("question_type=1").last.question_score %> - - 分 -
    • -
      -
    • - - - - -
    • -
      -
    • - - - - -
    • -
      -
    • - - - - -
    • -
      -
    • - - - - -
    • + +
    • + A + + +
    • +
      +
    • + B + + +
    • +
      +
    • + C + + +
    • +
      +
    • + D + + +
    • +
      +
    • + E +
      新建选项
      +
    • +
      -
    • - - -
    • -
    diff --git a/app/views/exercise/_new_MCQ.html.erb b/app/views/exercise/_new_MCQ.html.erb index d8dbf0adb..965772051 100644 --- a/app/views/exercise/_new_MCQ.html.erb +++ b/app/views/exercise/_new_MCQ.html.erb @@ -3,6 +3,14 @@ :url=>create_exercise_question_exercise_path(exercise.id), :remote=>true ) do |f| %>
    +
    + <% score = exercise.exercise_questions.where("question_type=2").last.nil? ? "": exercise.exercise_questions.where("question_type=2").last.question_score %> + + 分 + 请点击选项 + 标准答案: +
    +
    @@ -10,52 +18,43 @@
      -
    • - <% score = exercise.exercise_questions.where("question_type=2").last.nil? ? "": exercise.exercise_questions.where("question_type=2").last.question_score %> - - 分 -
    • -
      -
    • - - - + +
    • + A +
    • -
    • - - - +
    • + B +
    • -
    • - - - +
    • + C +
    • -
    • - - - +
    • + D +
    • - - + E +
      新建选项
    • -
      +
    diff --git a/app/views/exercise/_new_question.html.erb b/app/views/exercise/_new_question.html.erb index faadb08a9..23aae4cb3 100644 --- a/app/views/exercise/_new_question.html.erb +++ b/app/views/exercise/_new_question.html.erb @@ -14,7 +14,7 @@ alert("请先保存正在编辑的题目再新建。"); } else{ $("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_MC', :locals => {:exercise=>exercise}) %>"); - $("#poll_questions_title").focus(); + $("#question_score").focus(); } } @@ -26,7 +26,7 @@ alert("请先保存正在编辑的题目再新建。"); } else{ $("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_MCQ', :locals => {:exercise=>exercise}) %>"); - $("#poll_questions_title").focus(); + $("#question_score").focus(); } } @@ -38,7 +38,7 @@ alert("请先保存正在编辑的题目再新建。"); } else{ $("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_single', :locals => {:exercise=>exercise}) %>"); - $("#poll_questions_title").focus(); + $("#question_score").focus(); } } diff --git a/app/views/exercise/_new_single.html.erb b/app/views/exercise/_new_single.html.erb index d0fce87c8..669a1b8db 100644 --- a/app/views/exercise/_new_single.html.erb +++ b/app/views/exercise/_new_single.html.erb @@ -3,6 +3,12 @@ :url=>create_exercise_question_exercise_path(exercise.id), :remote=>true ) do |f| %>
    +
    + <% score = exercise.exercise_questions.where("question_type=3").last.nil? ? "": exercise.exercise_questions.where("question_type=3").last.question_score %> + + 分 +
    +
    @@ -10,12 +16,6 @@
      -
    • - <% score = exercise.exercise_questions.where("question_type=3").last.nil? ? "": exercise.exercise_questions.where("question_type=3").last.question_score %> - - 分 -
    • -
    • @@ -42,8 +42,8 @@
    diff --git a/app/views/exercise/_show_head.html.erb b/app/views/exercise/_show_head.html.erb index 4cc5a6cf8..8a13449af 100644 --- a/app/views/exercise/_show_head.html.erb +++ b/app/views/exercise/_show_head.html.erb @@ -1,5 +1,5 @@ -
    - +
    +

    <%= exercise.exercise_name%>

    @@ -12,5 +12,13 @@ <% end %>
    <%= exercise.exercise_description.nil? ? "" :exercise.exercise_description.html_safe%>
    +
    \ No newline at end of file diff --git a/db/migrate/20161129084352_add_column_to_exercises.rb b/db/migrate/20161129084352_add_column_to_exercises.rb new file mode 100644 index 000000000..d5e38b485 --- /dev/null +++ b/db/migrate/20161129084352_add_column_to_exercises.rb @@ -0,0 +1,7 @@ +class AddColumnToExercises < ActiveRecord::Migration + def change + add_column :exercises, :question_random, :integer, :default => 0 + add_column :exercises, :choice_random, :integer, :default => 0 + add_column :exercise_answers, :score, :integer, :default => -1 + end +end diff --git a/db/schema.rb b/db/schema.rb index 0d39dcbb6..9e58e8485 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 => 20161222033007) do +ActiveRecord::Schema.define(:version => 20170210082105) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -52,6 +52,18 @@ ActiveRecord::Schema.define(:version => 20161222033007) do 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_contests", :force => true do |t| + t.integer "contest_id" + t.integer "user_id" + t.string "role" + t.integer "status" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "applied_contests", ["contest_id"], :name => "index_applied_contests_on_contest_id" + add_index "applied_contests", ["user_id"], :name => "index_applied_contests_on_user_id" + create_table "applied_messages", :force => true do |t| t.integer "user_id" t.integer "applied_id" @@ -184,7 +196,7 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.integer "copy_from" t.integer "quotes" t.integer "is_publish", :default => 1 - t.date "publish_time" + t.datetime "publish_time" end add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id" @@ -266,6 +278,18 @@ ActiveRecord::Schema.define(:version => 20161222033007) do add_index "blog_comments", ["root_id"], :name => "index_blog_comments_on_root_id" + create_table "blog_messages", :force => true do |t| + t.integer "user_id" + t.integer "blog_message_id" + t.integer "blog_id" + t.string "blog_message_type" + t.boolean "viewed", :default => false + t.text "content" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "user_operator_id" + end + create_table "blogs", :force => true do |t| t.string "name", :default => "", :null => false t.text "description" @@ -291,6 +315,7 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.integer "parent_id" t.integer "course_id" t.integer "org_subfield_id" + t.integer "contest_id" end add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" @@ -325,16 +350,14 @@ ActiveRecord::Schema.define(:version => 20161222033007) do 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.integer "repository_id", :null => false + t.string "revision", :null => false t.string "committer" - t.datetime "committed_on", :null => false + t.datetime "committed_on", :null => false t.text "comments" t.date "commit_date" t.string "scmid" t.integer "user_id" - t.integer "project_id" - t.integer "type", :default => 0 end add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" @@ -485,12 +508,12 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.integer "user_id" t.integer "contest_id" t.integer "contest_message_id" - t.string "course_message_type" - t.boolean "viewed", :default => false + t.string "contest_message_type" + t.boolean "viewed", :default => false t.text "content" t.integer "status" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end add_index "contest_messages", ["contest_id"], :name => "index_contest_messages_on_contest_id" @@ -506,6 +529,15 @@ ActiveRecord::Schema.define(:version => 20161222033007) do add_index "contestant_for_contests", ["contest_id"], :name => "index_contestant_for_contests_on_contest_id" add_index "contestant_for_contests", ["student_id"], :name => "index_contestant_for_contests_on_student_id" + create_table "contestant_work_evaluation_distributions", :force => true do |t| + t.integer "user_id" + t.integer "contestant_work_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "contestant_work_evaluation_distributions", ["user_id"], :name => "index_contestant_work_evaluation_distributions_on_user_id" + create_table "contestant_work_projects", :force => true do |t| t.integer "contest_id" t.integer "work_id" @@ -547,6 +579,7 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.boolean "is_delete", :default => false t.datetime "created_at", :null => false t.datetime "updated_at", :null => false + t.integer "judge_score" end add_index "contestant_works", ["project_id"], :name => "index_contestant_works_on_project_id" @@ -595,6 +628,20 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.integer "container_id", :default => 0 end + create_table "course_class_post", :id => false, :force => true do |t| + t.integer "班级id", :default => 0, :null => false + t.string "班级名" + t.integer "帖子id", :default => 0, :null => false + t.integer "主贴id" + t.string "帖子标题", :default => "", :null => false + t.text "帖子内容" + t.integer "帖子用户id" + t.integer "帖子回复数", :default => 0, :null => false + t.integer "最后回帖id" + t.datetime "发帖时间", :null => false + t.datetime "帖子更新时间", :null => false + end + create_table "course_contributor_scores", :force => true do |t| t.integer "course_id" t.integer "user_id" @@ -622,6 +669,21 @@ ActiveRecord::Schema.define(:version => 20161222033007) do add_index "course_groups", ["course_id"], :name => "index_course_groups_on_course_id" + create_table "course_homework_statistics", :force => true do |t| + t.integer "user_id" + t.integer "course_id" + t.integer "committed_work_num", :default => 0 + t.integer "un_commit_work_num", :default => 0 + t.integer "late_commit_work_num", :default => 0 + t.integer "absence_evaluation_work_num", :default => 0 + t.integer "un_evaluation_work_num", :default => 0 + t.integer "appeal_num", :default => 0 + t.float "average_score", :default => 0.0 + t.float "total_score", :default => 0.0 + 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" @@ -663,8 +725,8 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.string "code" t.integer "time" t.string "extra" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "location" t.string "term" t.string "string" @@ -674,28 +736,28 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.string "class_period" t.integer "school_id" t.text "description" - t.integer "status", :default => 1 - t.integer "attachmenttype", :default => 2 + t.integer "status", :default => 1 + t.integer "attachmenttype", :default => 2 t.integer "lft" t.integer "rgt" - t.integer "is_public", :limit => 1, :default => 1 - t.integer "inherit_members", :limit => 1, :default => 1 - t.integer "open_student", :default => 0 - t.integer "outline", :default => 0 - t.integer "publish_resource", :default => 0 - t.integer "is_delete", :default => 0 + t.integer "is_public", :limit => 1, :default => 1 + t.integer "inherit_members", :limit => 1, :default => 1 + t.integer "open_student", :default => 0 + t.integer "outline", :default => 0 + t.integer "publish_resource", :default => 0 + t.integer "is_delete", :default => 0 t.integer "end_time" t.string "end_term" - t.integer "is_excellent", :default => 0 - t.integer "excellent_option", :default => 0 - t.integer "is_copy", :default => 0 - t.integer "visits", :default => 0 + t.integer "is_excellent", :default => 0 + t.integer "excellent_option", :default => 0 + t.integer "is_copy", :default => 0 + t.integer "visits", :default => 0 t.integer "syllabus_id" t.string "invite_code" t.string "qrcode" - t.integer "qrcode_expiretime", :default => 0 - t.integer "professional_level_id", :limit => 1 - t.integer "invite_code_halt", :limit => 1, :default => 0 + t.integer "qrcode_expiretime", :default => 0 + t.integer "invite_code_halt", :limit => 1, :default => 0 + t.integer "os_allow", :default => 0 end add_index "courses", ["invite_code"], :name => "index_courses_on_invite_code", :unique => true @@ -770,11 +832,6 @@ ActiveRecord::Schema.define(:version => 20161222033007) do add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" - create_table "disciplines", :force => true do |t| - t.string "name" - t.integer "professional_level_id", :limit => 1 - end - create_table "discuss_demos", :force => true do |t| t.string "title" t.text "body" @@ -851,8 +908,9 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.integer "exercise_question_id" t.integer "exercise_choice_id" t.text "answer_text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "score", :default => -1 end create_table "exercise_choices", :force => true do |t| @@ -900,11 +958,13 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.integer "exercise_status" t.integer "user_id" t.integer "time" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.datetime "publish_time" t.datetime "end_time" t.integer "show_result" + t.integer "question_random", :default => 0 + t.integer "choice_random", :default => 0 end create_table "first_pages", :force => true do |t| @@ -1049,6 +1109,7 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.datetime "updated_at", :null => false t.integer "no_anon_penalty", :default => 1 t.integer "appeal_penalty", :default => 0 + t.integer "ta_mode", :default => 1 end create_table "homework_detail_programings", :force => true do |t| @@ -1093,10 +1154,6 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.datetime "updated_at", :null => false end - create_table "innodb_monitor", :id => false, :force => true do |t| - t.integer "a" - end - create_table "invite_lists", :force => true do |t| t.integer "project_id" t.integer "user_id" @@ -1360,6 +1417,7 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.integer "course_id" t.integer "sticky", :default => 0 t.integer "org_subfield_id" + t.integer "contest_id" end add_index "news", ["author_id"], :name => "index_news_on_author_id" @@ -1628,12 +1686,9 @@ ActiveRecord::Schema.define(:version => 20161222033007) do end create_table "professional_levels", :force => true do |t| - t.integer "level" - end - - create_table "professions", :force => true do |t| - t.string "name" - t.integer "discipline_id", :limit => 1 + t.string "level" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "project_infos", :force => true do |t| @@ -1696,6 +1751,7 @@ ActiveRecord::Schema.define(:version => 20161222033007) do 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" @@ -1703,11 +1759,6 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.integer "forked_from_project_id" t.integer "forked_count" t.integer "publish_resource", :default => 0 - t.integer "boards_count", :default => 0 - t.integer "news_count", :default => 0 - t.integer "acts_count", :default => 0 - t.integer "journals_count", :default => 0 - t.integer "boards_reply_count", :default => 0 t.integer "visits", :default => 0 t.integer "hot", :default => 0 t.string "invite_code" @@ -2030,9 +2081,10 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.integer "score" t.text "comment" t.integer "reviewer_role" - 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 "appeal_status", :default => 0 + t.boolean "is_hidden", :default => false end add_index "student_works_scores", ["student_work_id"], :name => "student_work_id" @@ -2105,8 +2157,8 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.string "title" t.text "description" t.integer "user_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.string "eng_name" t.integer "syllabus_type" t.integer "credit" @@ -2115,9 +2167,8 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.integer "practice_hours" t.string "applicable_major" t.string "pre_course" - t.integer "visits", :default => 0 - t.integer "des_status", :default => 0 - t.integer "professional_level_id", :limit => 1 + t.integer "visits", :default => 0 + t.integer "des_status", :default => 0 end add_index "syllabuses", ["user_id"], :name => "index_syllabuses_on_user_id" @@ -2239,6 +2290,8 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.string "description", :default => "" end + add_index "user_extensions", ["user_id"], :name => "index_user_extensions_on_user_id" + create_table "user_feedback_messages", :force => true do |t| t.integer "user_id" t.integer "journals_for_message_id" @@ -2492,6 +2545,17 @@ ActiveRecord::Schema.define(:version => 20161222033007) do add_index "work_detail_groups", ["work_id"], :name => "index_work_detail_groups_on_work_id" + create_table "work_detail_manuals", :force => true do |t| + t.date "evaluation_start" + t.date "evaluation_end" + t.integer "evaluation_num" + t.integer "work_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "work_detail_manuals", ["work_id"], :name => "index_work_detail_manuals_on_work_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 @@ -2517,12 +2581,14 @@ ActiveRecord::Schema.define(:version => 20161222033007) do t.date "end_time" t.integer "work_type" t.integer "contest_id" - t.boolean "is_delete", :default => false - t.boolean "score_open", :default => true - t.boolean "is_open", :default => false + t.boolean "is_delete", :default => false + t.boolean "score_open", :default => false + t.boolean "is_open", :default => false t.integer "work_status" - 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.boolean "online_evaluation", :default => false + t.boolean "score_valid", :default => true end add_index "works", ["contest_id"], :name => "index_works_on_contest_id" diff --git a/public/stylesheets/css/courses.css b/public/stylesheets/css/courses.css index 8c0bbb8f4..4062d69d0 100644 --- a/public/stylesheets/css/courses.css +++ b/public/stylesheets/css/courses.css @@ -605,4 +605,9 @@ a:hover.ex_icon_edit{ background:url(/images/course/icons.png) -21px -276px no- .archive_course_notice em {display:block; border-width:10px; position:absolute;top:26px; left:-20px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;} .archive_course_notice span {display:block; border-width:10px; position:absolute;top:26px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;} -.teacher_member_img{width:50px; height:50px; border: 1px solid #fff;-webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;} \ No newline at end of file +.teacher_member_img{width:50px; height:50px; border: 1px solid #fff;-webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;} + +/* 新版测验 */ +a.question_choice_white{ background: #fff; color: #000000; width: 34px; height: 30px; border: 1px solid #ddd; text-align: center; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} +a.question_choice_blue{ background: #3b94d6; color: #fff; width: 34px; height: 30px; border: 1px solid #ddd; text-align: center; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;} +.question_choice_dash{ background: #fff; color: #000000; width: 34px; height: 30px; border: 1px dashed #ddd; text-align: center; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}