大写小写问题

This commit is contained in:
huang 2015-11-18 14:50:03 +08:00
parent de17ffa605
commit 935b1f9f9e
1 changed files with 2 additions and 3 deletions

View File

@ -3,12 +3,11 @@ module ExerciseHelper
# 单选 # 单选
def sigle_selection_standard_answer(params) def sigle_selection_standard_answer(params)
size = params.ord - 64 size = params.ord - 96
# 输入的为小写字母答案
if size > 0 if size > 0
answer = params.ord - 96 answer = params.ord - 96
else else
answer = params.ord answer = params.ord - 64
end end
end end