Updated Import method in teachers to make all false positives.
This commit is contained in:
parent
9613a52305
commit
f2a27c6b40
|
@ -22,20 +22,21 @@ class Admin::ImportDataController < OrbitBackendController
|
|||
@roles = Role.all
|
||||
@teacher = User.new
|
||||
I18n.locale = :zh_tw
|
||||
if hash['teacher_zh_tw'].blank? && hash['teacher_en'].blank?
|
||||
@teacher.first_name = "Please Fill the Name"
|
||||
if !hash['teacher_zh_tw'].blank?
|
||||
@teacher.first_name = hash['teacher_zh_tw']
|
||||
elsif hash['teacher_zh_tw'].blank? && !hash['teacher_en'].blank?
|
||||
@teacher.first_name = hash['teacher_en']
|
||||
else
|
||||
@teacher.first_name = hash['teacher_zh_tw']
|
||||
end
|
||||
I18n.locale = :en
|
||||
if hash['teacher_zh_tw'].blank? && hash['teacher_en'].blank?
|
||||
elsif hash['teacher_zh_tw'].blank? && hash['teacher_en'].blank?
|
||||
@teacher.first_name = "Please Fill the Name"
|
||||
end
|
||||
|
||||
I18n.locale = :en
|
||||
if !hash['teacher_en'].blank?
|
||||
@teacher.first_name = hash['teacher_en']
|
||||
elsif hash['teacher_en'].blank? && !hash['teacher_zh_tw'].blank?
|
||||
@teacher.first_name = hash['teacher_zh_tw']
|
||||
elsif !hash['teacher_en'].blank? && hash['teacher_zh_tw'].blank?
|
||||
@teacher.first_name = hash['teacher_en']
|
||||
elsif hash['teacher_en'].blank? && hash['teacher_zh_tw'].blank?
|
||||
@teacher.first_name = "Please Fill the Name"
|
||||
end
|
||||
|
||||
#@teacher.first_name = hash['teacher_en']
|
||||
|
|
Loading…
Reference in New Issue