diff --git a/db/migrate/20190927091948_change_user_p02389416_exercise.rb b/db/migrate/20190927091948_change_user_p02389416_exercise.rb new file mode 100644 index 000000000..bea1e28b7 --- /dev/null +++ b/db/migrate/20190927091948_change_user_p02389416_exercise.rb @@ -0,0 +1,22 @@ +class ChangeUserP02389416Exercise < ActiveRecord::Migration[5.2] + def change + puts "====> start_to_create user exercise_answer" + + #分别为第8,11,14,15,16,20,21,26 + # 分数分别为:2分,2分,5分,2分,2分,2分,2分,2分 合计19分 + question_ids = [37411,37414,37417,37418,37419,37423,37424,37429] + choice_ids = [117788,117797,117806,117809,117811,117816,117818,117828] + question_ids.each_with_index do |q, index| + ExerciseAnswer.create(user_id: 45442, exercise_question_id: q, exercise_choice_id: choice_ids[index]) + end + ex_user = ExerciseUser.where(user_id: 45442, exercise_id: 2561)&.first + if ex_user.present? + obj_score = ex_user.objective_score.to_i + 19 + total_score = ex_user.score.to_i + 19 + + ex_user.update_attributes(score: total_score, objective_score: obj_score) + end + + puts "====> end_to_create user exercise_answer" + end +end diff --git a/public/react/config/webpack.config.dev.js b/public/react/config/webpack.config.dev.js index 7990f9557..fe525154f 100644 --- a/public/react/config/webpack.config.dev.js +++ b/public/react/config/webpack.config.dev.js @@ -32,7 +32,7 @@ module.exports = { // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s // devtool: "cheap-module-eval-source-map", // 开启调试 - // devtool: "eval-source-map", // 开启调试 + devtool: "source-map", // 开启调试 // These are the "entry points" to our application. // This means they will be the "root" imports that are included in JS bundle. // The first two entry points enable "hot" CSS and auto-refreshes for JS.