Merge branch 'sw_new_course' of http://repository.trustie.net/xianbo/trustie2 into sw_new_course

This commit is contained in:
cxt 2015-11-20 11:09:02 +08:00
commit 4204521e14
1 changed files with 5 additions and 4 deletions

View File

@ -14,17 +14,18 @@ module ExerciseHelper
# 多选
def multiselect_standard_answer(params)
size = params.ord - 96
answer = ""
answer = []
if size > 0 # 小写字母答案
for i in 0..(params.length-1)
answer += (params[i].ord - 96).to_s
answer << (params[i].ord - 96).to_s
end
else
for i in 0..(params.length-1)
answer += (params[i].ord - 64).to_s
answer << (params[i].ord - 64)
end
end
answer.to_i
answer = answer.sort
answer.join("")
end
def fill_standart_answer(params, standart_answer)