diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb
index 5ad869462..b11b5d174 100644
--- a/app/controllers/challenges_controller.rb
+++ b/app/controllers/challenges_controller.rb
@@ -2,13 +2,16 @@
class ChallengesController < ApplicationController
layout "base_shixun"
before_filter :check_authentication
- before_filter :find_shixun, :only => [:index, :new, :create, :destroy, :challenge_build, :update_evaluation]
- before_filter :find_challenge, :only => [:show, :edit, :update, :challenge_build, :index_up, :index_down, :destroy, :update_evaluation]
+ before_filter :find_shixun, :only => [:index, :new, :create, :destroy, :challenge_build, :update_evaluation, :add_choose_question, :new_choose_question, :choose_type_show, :edit_choose_question, :update_choose_question, :destroy_challenge_choose]
+ before_filter :find_challenge, :only => [:show, :edit, :update, :challenge_build, :index_up, :index_down, :destroy, :update_evaluation, :add_choose_question, :new_choose_question, :choose_type_show, :edit_choose_question, :update_choose_question, :destroy_challenge_choose]
before_filter :build_challege_from_params, :only => [:new, :create]
before_filter :tpi_manager_allowed, :only => [:challenge_build, :destroy, :edit, :new, :create]
before_filter :allowed_view, :only => [:show]
before_filter :query_challeges, :only => [:show, :edit, :update, :update_evaluation]
before_filter :find_shixun_language, :only => [:show, :new, :edit]
+ #before_filter :default_format_js, only: :new_or_edit_choose_question
+
+ #skip_before_filter :verify_authenticity_token, :only => [:new_or_edit_choose_question]
include ApplicationHelper
@@ -30,6 +33,8 @@ class ChallengesController < ApplicationController
@challenge.shixun = @shixun
@challenge.user = User.current
@challenge.st = params[:st].to_i
+ @challenge.save!
+=begin
if @challenge.save!
if params[:st].to_i != 0
#创建选项
@@ -39,6 +44,7 @@ class ChallengesController < ApplicationController
end
end
end
+=end
# 实训是否需要重启
# 非实践任务创建第一个阶段时调用 publishGame, 避免不包含实践任务的实训进行模拟实战时报错
if @challenge.position == 1 && params[:st].to_i != 0
@@ -91,9 +97,117 @@ class ChallengesController < ApplicationController
if challenge_pos < challenge_num
@next_challenge = Challenge.where(:shixun_id => @shixun, :position => challenge_pos+1).first
end
- @prev_challenge = Challenge.where(:shixun_id => @shixun, :position => challenge_pos - 1).first if challenge_pos - 1 > 0
+ @prev_challenge = Challenge.where(:shixun_id => @shixun, :position => challenge_pos - 1).first if (challenge_pos - 1) > 0
@tab = params[:tab].blank? ? 1 : params[:tab].to_i
@editor = params[:editor] # 编辑模式
+ respond_to do |format|
+ format.html
+ format.js
+ end
+ end
+
+ def new_choose_question
+ ActiveRecord::Base.transaction do
+ begin
+ @challenge_choose = ChallengeChoose.new
+ @challenge_choose.challenge_id = @challenge.id
+ @challenge_choose.subject = params[:choose][:subject]
+ @challenge_choose.answer = params[:choose][:answer]
+ @challenge_choose.standard_answer = params[:standard_answer]
+ @challenge_choose.score = params[:challenge][:score].to_i
+ @challenge_choose.difficult = params[:challenge][:difficulty].to_i
+ @challenge_choose.position = params[:position].to_i
+ @challenge_choose.category = params[:category].to_i
+ if @challenge_choose.save!
+ # 创建选项
+ params[:question][:cnt].each_with_index do |test, index|
+ answer = params[:choice][:answer][index] == "0" ? false : true
+ ChallengeQuestion.create(:option_name => test, :challenge_choose_id => @challenge_choose.id, :position => index, :right_key => answer)
+ end
+ # 创建单选多选的技能标签
+ unless params[:knowledge].blank?
+ params[:knowledge][:input].each do |input|
+ ChallengeTag.create(:name => input, :challenge_choose_id => @challenge_choose.id, :challenge_id => @challenge.id)
+ end
+ end
+ end
+ @index = params[:position].to_i - 1
+ respond_to do |format|
+ format.js
+ end
+ rescue Exception => e
+ flash[:error] = "#{e.message}"
+ redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun)
+ raise ActiveRecord::Rollback
+ end
+ end
+ end
+
+ def update_choose_question
+ @challenge_choose = ChallengeChoose.where(:id => params[:choose_id]).first
+ ActiveRecord::Base.transaction do
+ @challenge_choose.update_attributes(:subject => params[:choose][:subject],
+ :answer => params[:choose][:answer],
+ :standard_answer => params[:standard_answer],
+ :score => params[:challenge][:score].to_i,
+ :difficult => params[:challenge][:difficulty].to_i)
+ begin
+ @challenge_choose.challenge_questions.delete_all
+ params[:question][:cnt].each_with_index do |test, index|
+ answer = params[:choice][:answer][index] == "0" ? false : true
+ ChallengeQuestion.create(:option_name => test, :challenge_choose_id => @challenge_choose.id, :position => index, :right_key => answer)
+ end
+ @challenge_choose.challenge_tags.delete_all unless @challenge_choose.challenge_tags.blank?
+ unless params[:knowledge].blank?
+ params[:knowledge][:input].each do |input|
+ ChallengeTag.create(:name => input, :challenge_choose_id => @challenge_choose.id, :challenge_id => @challenge.id)
+ end
+ end
+ @challenge_choose = ChallengeChoose.where(:id => params[:choose_id]).first
+ @index = params[:index].to_i
+ respond_to do |format|
+ format.js
+ end
+ rescue Exception => e
+ flash[:error] = "#{e.message}"
+ format.html{redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun)}
+ raise ActiveRecord::Rollback
+ end
+ end
+ end
+
+ def edit_choose_question
+ @challenge_choose = ChallengeChoose.where(:id => params[:choose_id]).first
+ @category = @challenge_choose.category
+ @position = @challenge_choose.position.to_i
+ @index = params[:index].to_i
+ respond_to do |format|
+ format.js
+ end
+ end
+
+ def choose_type_show
+ @challenge_choose = ChallengeChoose.where(:id => params[:choose_id]).first
+ @index = params[:index].to_i
+ respond_to do |format|
+ format.js
+ end
+ end
+
+ def destroy_challenge_choose
+ @challenge_choose = ChallengeChoose.where(:id => params[:choose_id]).first
+ @challenge_choose.destroy
+
+ redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun)
+ end
+
+ def add_choose_question
+ @category = params[:category].to_i
+ @position = params[:position]
+ #@challenge_choose = @challenge.challenge_chooses
+ respond_to do |format|
+ format.js
+ end
end
def destroy
@@ -108,22 +222,22 @@ class ChallengesController < ApplicationController
def update
ActiveRecord::Base.transaction do
@challenge.update_attributes(params[:challenge])
- if (params[:tab] == "1" || params[:tab].nil?) && @challenge.st != 0
- begin
- @challenge.challenge_questions.delete_all
- params[:question][:cnt].each_with_index do |test, index|
- answer = params[:choice][:answer][index] == "0" ? false : true
- ChallengeQuestion.create(:option_name => test, :challenge_id => @challenge.id, :position => index, :right_key => answer)
- end
- redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => params[:tab])
- rescue Exception => e
- flash[:error] = "#{e.message}"
- format.html{redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun)}
- raise ActiveRecord::Rollback
- end
- else
+ #if (params[:tab] == "1" || params[:tab].nil?) && @challenge.st != 0
+ # begin
+ # @challenge.challenge_questions.delete_all
+ # params[:question][:cnt].each_with_index do |test, index|
+ # answer = params[:choice][:answer][index] == "0" ? false : true
+ # ChallengeQuestion.create(:option_name => test, :challenge_id => @challenge.id, :position => index, :right_key => answer)
+ # end
+ # redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => params[:tab])
+ # rescue Exception => e
+ # flash[:error] = "#{e.message}"
+ # format.html{redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun)}
+ # raise ActiveRecord::Rollback
+ # end
+ #else
redirect_to edit_shixun_challenge_path(@challenge, :shixun_id => @shixun, :tab => params[:tab])
- end
+ #end
end
end
@@ -272,4 +386,8 @@ class ChallengesController < ApplicationController
@language = language_switch language
end
+ def default_format_js
+ response.headers['content--type'] = 'text/javascript'
+ request.format = 'js'
+ end
end
diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb
index cbae9d708..0c011a047 100644
--- a/app/controllers/games_controller.rb
+++ b/app/controllers/games_controller.rb
@@ -49,7 +49,7 @@ class GamesController < ApplicationController
@type = params[:type]
challenge_path = @game_challenge.path
# 用户选项
- @user_answer = @game.outputs.first.actual_output.split("") unless @st == 0 || @game.outputs.blank?
+ #@user_answer = @game.outputs.first.actual_output.split("") unless @st == 0 || @game.outputs.blank?
# 默认打开文件
logger.info("repository id is #{@repository.try(:id)}, repository's shixun_id =#{@repository.try(:myshixun_id)} shixun_id =#{@repository.try(:shixun_id)}, project_id => #{@repository.try(:project_id)}")
# 验证challenge文件名的合法性
@@ -300,53 +300,42 @@ class GamesController < ApplicationController
end
# 选择题评测(选择题不需要重新评测)
+ # score 获得金币数 tag_count 技能数 right用户是否全对 answer_right全部选择题的正确性
def evaluating_choice
@game_challenge = @game.challenge
- user_answer = params[:answer]
- correct = true
+ @challenges = Challenge.where(:shixun_id => @myshixun.shixun_id)
+ @shixun = @myshixun.shixun
score = 0
tag_count = 0
- if !user_answer.blank?
- if user_answer.split("").count != @game_challenge.challenge_questions.where(:right_key => true).count
- correct = false
- else
- user_answer.split("").each do |answer|
- question = @game_challenge.challenge_questions.where(:position => answer.to_i).first
- unless question.right_key
- correct = false
- break
- end
- end
+ @right = true
+ answer_right = []
+ @game_challenge.challenge_chooses.each_with_index do |choose, index|
+ correct = (params[:answer][index] == choose.standard_answer) ? true : false
+ if choose.choose_outputs.blank?
+ ChooseOutputs.create(:challenge_choose_id => choose.id, :user_id => User.current.id, :answer => params[:answer][index], :correct => correct)
end
- else
- correct = false
+ if @shixun.status > 1 && !@game.answer_open
+ if correct
+ score += choose.score
+ tag_count += choose.challenge_tags.count
+ end
+ elsif @shixun.status > 1 && @game.answer_open
+ score -= choose.score
+ end
+ unless correct
+ @right = false
+ end
+ answer_right << correct
end
@game.update_attributes(:status => 2, :end_time => Time.now)
- had_done = @game.had_done
- shixun = @myshixun.shixun
- if shixun.status > 1 && !@game.answer_open
- if correct
- #User.current.update_attributes(:grade => (User.current.grade + @game.challenge.score), :experience => (User.current.experience + @game.challenge.score))
- reward_grade(@game.user, @game.id, 'Game', @game_challenge.score)
- reward_experience(@game.user, @game.id, 'Game', @game_challenge.score)
- @game.update_attribute(:final_score, @game_challenge.score)
- score = @game_challenge.score
- tag_count = @game_challenge.challenge_tags.count
- else
- score = "+0"
- tag_count = 0
- end
- elsif shixun.status > 1 && @game.answer_open
- score = -@game_challenge.score.to_i
- tag_count = 0
- else
- score = "+0"
- tag_count = 0
+ @had_done = @game.had_done
+ reward_grade(@game.user, @game.id, 'Game', score)
+ reward_experience(@game.user, @game.id, 'Game', score)
+ @game.update_attribute(:final_score, score)
+
+ respond_to do |format|
+ format.js{redirect_to myshixun_game_path(@game, :myshixun_id => @myshixun, :choose => 1)}
end
- if @game.outputs.blank?
- Output.create(:game_id => @game.id, :actual_output => user_answer, :result => correct)
- end
- render :json => {correct: correct, had_done: had_done, :grade => User.where(:id => User.current.id).first.grade, score: score, tag_count: tag_count, position: @game_challenge.position}
end
@@ -407,9 +396,19 @@ class GamesController < ApplicationController
def answer
challenge = @game.challenge
@challenge_score = challenge.score.to_i
+ @answer = ""
# 已经开启过
@score = User.current.grade.to_i - @challenge_score
- @answer = challenge.answer
+ if(params[:choose] == "true")
+ challenge.challenge_chooses.each_with_index do |choose, index|
+ @answer += "第"+ ((index + 1).to_s) +"题:
"
+ @answer += choose.answer
+ @answer += "
"
+ end
+ else
+ @answer = challenge.answer
+ end
+
if challenge.shixun.status < 2 || @game.answer_open
@viewed = 1
else
diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb
index b04334ee0..f291c7d5c 100644
--- a/app/controllers/managements_controller.rb
+++ b/app/controllers/managements_controller.rb
@@ -803,6 +803,18 @@ end
end
end
+ # 导出excel
+ def export_excel
+ @course = params[:course]
+ respond_to do |format|
+ format.xls {
+ @course = @course.reorder("#{Tracker.table_name}.position, #{Course.table_name}.id").all
+ filename = "#{l(:label_course_list_xls)}.xls"
+ send_data(course_list_xls(@course), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
+ }
+ end
+ end
+
# 0 全部;1 活动的; 2 已注册; 3 锁定
def users
@menu_type
@@ -1336,4 +1348,32 @@ end
render_404
end
+ def course_list_xls course
+ xls_report = StringIO.new
+ book = Spreadsheet::Workbook.new
+ sheet1 = book.create_worksheet :name => "course"
+ blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
+ sheet1.row(0).default_format = blue
+ sheet1.row(0).concat([l(:issue_xls_id),l(:issue_xls_tracker_id),l(:issue_xls_title),l(:issue_xls_description),l(:issue_xls_status),l(:issue_xls_assign),l(:issue_xls_priority),l(:issue_xls_author),l(:issue_xls_created_at),l(:milestone),l(:issue_xls_start),l(:issue_xls_due),l(:issue_xls_ratio)])
+ count_row = 1
+ issues.each do |issue|
+ sheet1[count_row,0] = issue.id
+ sheet1[count_row,1] = issue_tracker_change(issue.tracker_id)
+ sheet1[count_row,2] = issue.subject
+ sheet1[count_row,3] = (issue.description.gsub(/<\/?.*?>/,"")).html_safe
+ sheet1[count_row,4] = issue_status_change(issue.status_id)
+ sheet1[count_row,5] = issue.assigned_to.try(:show_name)
+ sheet1[count_row,6] = issue_priority_change(issue.priority_id)
+ sheet1[count_row,7] = issue.author.show_name
+ sheet1[count_row,8] = issue.created_on.nil? ? issue.created_on : issue.created_on.strftime('%Y-%m-%d %H:%M:%S')
+ sheet1[count_row,9] = issue.fixed_version.try(:name)
+ sheet1[count_row,10] = issue.start_date.nil? ? issue.start_date : issue.start_date.strftime('%Y-%m-%d')
+ sheet1[count_row,11] = issue.due_date.nil? ? issue.due_date : issue.due_date.strftime('%Y-%m-%d')
+ sheet1[count_row,12] = issue_ratio_change(issue.done_ratio, issue.status_id)
+ count_row += 1
+ end
+ book.write xls_report
+ xls_report.string
+ end
+
end
diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index c498af4a9..c82cc45ad 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -389,7 +389,7 @@ class StudentWorkController < ApplicationController
@stundet_works = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id)
end
elsif @homework.homework_detail_manual.comment_status == 3 || @homework.homework_detail_manual.comment_status == 4 #学生 && 开启匿评 看到匿评列表
- my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id).first
+ my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id)
@stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id}
# elsif @homework.homework_detail_manual.comment_status == 5 || @homework.homework_detail_manual.comment_status == 6 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的
# my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id).first
@@ -420,7 +420,7 @@ class StudentWorkController < ApplicationController
@stundet_works = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id)
end
elsif @homework.homework_detail_manual.comment_status == 3 || @homework.homework_detail_manual.comment_status == 4 #学生 && 开启匿评 看到匿评列表
- my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id).first
+ my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id)
@stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id}
# elsif @homework.homework_detail_manual.comment_status == 5 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的
# my_work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:user_id => User.current.id).first
diff --git a/app/models/challenge.rb b/app/models/challenge.rb
index dcc50dd43..a9e74f77c 100644
--- a/app/models/challenge.rb
+++ b/app/models/challenge.rb
@@ -1,5 +1,5 @@
#coding=utf-8
-# st 0:实践任务;1:多选任务;2:单选任务
+# st 0:实践任务;1:选择题任务
class Challenge < ActiveRecord::Base
default_scope :order => 'position'
belongs_to :shixun,:touch=> true
@@ -8,7 +8,7 @@ class Challenge < ActiveRecord::Base
has_many :test_sets, :dependent => :destroy
has_many :challenge_tags, :dependent => :destroy
has_many :games, :dependent => :destroy
- has_many :challenge_questions, :dependent => :destroy
+ has_many :challenge_chooses, :dependent => :destroy
validates_presence_of :subject
# validates_presence_of :score
@@ -28,6 +28,35 @@ class Challenge < ActiveRecord::Base
str
end
+ def choose_correct_num
+ num = 0
+ self.challenge_chooses.each do |choose|
+ outputs = ChooseOutputs.where(:challenge_choose_id => choose.id).first
+ if outputs.nil?
+ num = nil
+ else
+ num += (outputs.correct ? 1 : 0)
+ end
+ end
+ return num
+ end
+
+ def choose_score
+ score = 0
+ self.challenge_chooses.each do |choose|
+ score += choose.score
+ end
+ return score
+ end
+
+ def choose_tags_num
+ num = 0
+ self.challenge_chooses.each do |choose|
+ num += choose.challenge_tags.count
+ end
+ return num
+ end
+
def next_challenge
challenge_count = Challenge.where(:shixun_id => self.shixun_id).count
render_404 if self.position ==challenge_count
diff --git a/app/models/challenge_choose.rb b/app/models/challenge_choose.rb
new file mode 100644
index 000000000..18d76790f
--- /dev/null
+++ b/app/models/challenge_choose.rb
@@ -0,0 +1,13 @@
+class ChallengeChoose < ActiveRecord::Base
+ # attr_accessible :title, :body
+ # category 1 单选, 2,多选
+ # standard_answer 正确答案 answer: 答题的思路
+ default_scope :order => 'position'
+ belongs_to :challenge
+ has_many :challenge_tags, :dependent => :destroy
+ has_many :challenge_questions, :dependent => :destroy
+ has_one :choose_outputs, :dependent => :destroy
+
+ validates_presence_of :subject
+
+end
diff --git a/app/models/challenge_question.rb b/app/models/challenge_question.rb
index eb835c32e..3540330b7 100644
--- a/app/models/challenge_question.rb
+++ b/app/models/challenge_question.rb
@@ -1,4 +1,6 @@
class ChallengeQuestion < ActiveRecord::Base
- belongs_to :challenge
- attr_accessible :challenge_id, :option_name, :position, :right_key
+ # 选择题的选项内容
+ belongs_to :challenge_choose
+ # right_key 选项是否是答案, position 选项的位置
+ attr_accessible :challenge_choose_id, :option_name, :position, :right_key
end
diff --git a/app/models/challenge_tag.rb b/app/models/challenge_tag.rb
index 5f5925f92..35b3f5be7 100644
--- a/app/models/challenge_tag.rb
+++ b/app/models/challenge_tag.rb
@@ -1,4 +1,5 @@
class ChallengeTag < ActiveRecord::Base
- attr_accessible :challenge_id, :name
+ attr_accessible :challenge_id, :name, :challenge_choose_id
belongs_to :challenge
+ belongs_to :challenge_choose
end
diff --git a/app/models/choose_outputs.rb b/app/models/choose_outputs.rb
new file mode 100644
index 000000000..9a47a3b25
--- /dev/null
+++ b/app/models/choose_outputs.rb
@@ -0,0 +1,5 @@
+class ChooseOutputs < ActiveRecord::Base
+ # attr_accessible :title, :body
+ # user_id 与 challenge_choose_id 唯一确定用户此题的选项
+ belongs_to :challenge_choose
+end
diff --git a/app/views/challenges/_answer_form.html.erb b/app/views/challenges/_answer_form.html.erb
index cbc31b01a..406f01fc8 100644
--- a/app/views/challenges/_answer_form.html.erb
+++ b/app/views/challenges/_answer_form.html.erb
@@ -20,7 +20,7 @@
+
- diff --git a/app/views/challenges/add_choose_question.js.erb b/app/views/challenges/add_choose_question.js.erb new file mode 100644 index 000000000..55a88fe8d --- /dev/null +++ b/app/views/challenges/add_choose_question.js.erb @@ -0,0 +1 @@ +$("#task_content").html("<%= j(render :partial => "single_or_multiple_question") %>"); \ No newline at end of file diff --git a/app/views/challenges/choose_type_show.js.erb b/app/views/challenges/choose_type_show.js.erb new file mode 100644 index 000000000..e589ae71b --- /dev/null +++ b/app/views/challenges/choose_type_show.js.erb @@ -0,0 +1,2 @@ +$("#task_content").html("<%= j(render :partial => 'single_or_multiple_question_show')%>"); +$("#challenge_choose_tab").html("<%= j(render :partial => "challenges/choose_tab") %>"); \ No newline at end of file diff --git a/app/views/challenges/edit.html.erb b/app/views/challenges/edit.html.erb index 7c4253a8d..b0f6fec1c 100644 --- a/app/views/challenges/edit.html.erb +++ b/app/views/challenges/edit.html.erb @@ -22,13 +22,9 @@ - <% elsif @st == 1 %> + <% else %> - <% elsif @st == 2%> - <% end %>
<%= (index + 1).to_s + "." + (choose.category == 1 ? "单选题" : "多选题") %>
++ + <% if choose.category == 1 %> + name="answer[<%= index + 1 %>]" category="<%= choose.category %>" value="<%= (question.position + 65).chr %>" id="result_<%= index %>_<%= i %>" class="ml-3 mr5 magic-radio ml5"> + <% else %> + + name="answer[]" category="<%= choose.category %>" value="<%= (question.position + 65).chr %>" id="result_<%= index %>_<%= i %>" class="ml-3 mr5 magic-checkbox ml5"> + <% end %> + + +
+ <% end %> + +" id="correct_tip"> - 正确 -
-" id="error_tip"> - 错误 -
- <% @game_challenge.challenge_questions.each_with_index do |question, i| %> - +1.单选题
+应在下列程序划线处填入的语句是()
+ +<%= question.option_name %>