diff --git a/app/controllers/exercise_controller.rb b/app/controllers/exercise_controller.rb index 77302c5db..54f8309ea 100644 --- a/app/controllers/exercise_controller.rb +++ b/app/controllers/exercise_controller.rb @@ -353,7 +353,7 @@ class ExerciseController < ApplicationController ea.exercise_choice_id = params[:exercise_choice_id] if ea.save @percent = get_percent(@exercise,User.current) - render :json => {:text => "true",:percent => format("%.2f" ,@percent)} + render :json => {:text => "ok",:percent => format("%.2f" ,@percent)} else render :json => {:text => "failure"} end diff --git a/app/views/exercise/_exercise_student.html.erb b/app/views/exercise/_exercise_student.html.erb index bc91ead85..0b12b917e 100644 --- a/app/views/exercise/_exercise_student.html.erb +++ b/app/views/exercise/_exercise_student.html.erb @@ -4,6 +4,9 @@ $("#homework_page_right").css("min-height",$("#LSide").height()-30); $("#Container").css("width","1000px"); }); + function getTime() { + + }
@@ -50,7 +53,7 @@ }, success: function (data) { var dataObj = eval(data); - if(dataObj.text == "true") + if(dataObj.text == "ok") { obj.checked = true; } @@ -105,7 +108,7 @@ }, success: function (data) { var dataObj = eval(data); - if(dataObj.text == "true") + if(dataObj.text == "ok") { obj.checked = true; } @@ -117,7 +120,7 @@ }); } - <%= @can_edit_poll?"":"disabled=disabled" %> > + <%= @can_edit_excercise?"":"disabled=disabled" %> > <%= convert_to_char((index+1).to_s)%>  <%= exercise_choice.choice_text%> diff --git a/app/views/exercise/_exercise_submit.html.erb b/app/views/exercise/_exercise_submit.html.erb index a28c8917b..e9c26a0b5 100644 --- a/app/views/exercise/_exercise_submit.html.erb +++ b/app/views/exercise/_exercise_submit.html.erb @@ -7,7 +7,7 @@
提交
- +
diff --git a/db/schema.rb b/db/schema.rb index 14f4f5eea..ca4e1cad0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -241,6 +241,58 @@ ActiveRecord::Schema.define(:version => 20151120021958) do 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