diff --git a/app/views/exercise_questions/_exercise_questions.json.jbuilder b/app/views/exercise_questions/_exercise_questions.json.jbuilder index bbdf45440..ca8ea7e6b 100644 --- a/app/views/exercise_questions/_exercise_questions.json.jbuilder +++ b/app/views/exercise_questions/_exercise_questions.json.jbuilder @@ -20,10 +20,20 @@ if question.question_type <= 2 #当为选择题或判断题时,只显示选 #TODO: 旧版本来一个题只有一个标准答案的,新版又做成了一个题有多个标准答案(exercise_choice_id存放的是标准答案的位置..) standard_answer_b = standard_answers_array.join("").include?(a.choice_position.to_s) user_answer_b = user_answer.include?(a.id) + choice_text = a.choice_text + if question.question_type == 2 + if choice_text == "对" + choice_text = "正确" + end + if choice_text == "错" + choice_text = "错误" + end + end json.c_position (index+1) if ex_choice_random_boolean #当选项随机时,选项位置以此为准,否则不出现 json.choice_id a.id # json.choice_text (edit_type.present? || question.question_type == 2) ? a.choice_text : "#{(index+65).chr}.#{a.choice_text}" - json.choice_text a.choice_text + + json.choice_text choice_text json.choice_position a.choice_position if exercise_type == 1 || exercise_type == 4 #1为教师编辑/预览 试卷或问题,2为空白试卷,即标准答案和用户答案都不显示,3为用户开始答题的显示,4为老师评阅试卷或学生在截止后查看试卷 json.standard_boolean standard_answer_b @@ -36,6 +46,14 @@ if question.question_type <= 2 #当为选择题或判断题时,只显示选 if exercise_type == 1 || exercise_type == 4 #1为老师,4为试卷截止且答案公开的情况 json.standard_answer standard_answers_array + if question.question_type == 2 #返回答案的文字 + standard_text = standard_answers_array.first.to_i == 1 ? "正确" : "错误" + else + array_text_answer = [] + standard_answers_array.each{|a| array_text_answer.push((a+64).chr)} + standard_text = array_text_answer.join("") + end + json.standard_answer_show standard_text end if exercise_type == 3 || exercise_type == 4 json.user_answer user_answer diff --git a/config/environments/development.rb b/config/environments/development.rb index cdcd45ec5..f0b3f1775 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -50,12 +50,11 @@ Rails.application.configure do # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. - config.assets.debug = false + config.assets.debug = true # Suppress logger output for asset requests. config.assets.quiet = true - config.assets.compile = true # config.assets.prefix = '/dev-assets' # Raises error for missing translations diff --git a/public/images/educoder/path.png b/public/images/educoder/path.png index d3d816012..b7feec66c 100644 Binary files a/public/images/educoder/path.png and b/public/images/educoder/path.png differ diff --git a/public/images/educoder/path1.png b/public/images/educoder/path1.png new file mode 100644 index 000000000..d3d816012 Binary files /dev/null and b/public/images/educoder/path1.png differ diff --git a/public/react/public/js/js_min_all.js b/public/react/public/js/js_min_all.js index 63c1207af..0d56d86ba 100755 --- a/public/react/public/js/js_min_all.js +++ b/public/react/public/js/js_min_all.js @@ -236,8 +236,7 @@ $(function(){ if(dragging) { clickX = e.pageX || e.originalEvent.touches[0].pageX;; if(clickX > leftOffset+0&&clickX (function() { var _host = '/react/build/' - /* + /**/ if (window.location.host == 'pre-newweb.educoder.net') { _host = 'https://testali-cdn.educoder.net/react/build/' } else if (window.location.host == 'www.educoder.net') { _host = 'https://ali-newweb.educoder.net/react/build/' - }*/ + } document.write('