This commit is contained in:
parent
27c88fda4f
commit
d91a6c03b1
|
@ -9,7 +9,7 @@
|
||||||
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>" +
|
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>" +
|
||||||
"<li class='ur_item'>" +
|
"<li class='ur_item'>" +
|
||||||
"<label>选项<%=convert_to_char (index+1).to_s %><span class='ur_index'></span>: </label>" +
|
"<label>选项<%=convert_to_char (index+1).to_s %><span class='ur_index'></span>: </label>" +
|
||||||
"<input maxlength='200' type='text' name='question_answer[0]' placeholder='输入选项内容' value='<%=exercise_choice.choice_text %>'/>" +
|
"<input maxlength='200' type='text' name='question_answer[<%=exercise_choice.id %>]' placeholder='输入选项内容' value='<%=exercise_choice.choice_text %>'/>" +
|
||||||
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>" +
|
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>" +
|
||||||
"<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>" +
|
"<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>" +
|
||||||
"</li>" +
|
"</li>" +
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
{
|
{
|
||||||
$("#poll_questions_title_<%=exercise_question.id%>").val("<%= exercise_question.question_title%>")
|
$("#poll_questions_title_<%=exercise_question.id%>").val("<%= exercise_question.question_title%>")
|
||||||
$("#poll_question_score_<%=exercise_question.id %>").val("<%= exercise_question.question_score%>")
|
$("#poll_question_score_<%=exercise_question.id %>").val("<%= exercise_question.question_score%>")
|
||||||
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %> %>" +
|
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>" +
|
||||||
"<li class='ur_item'>" +
|
"<li class='ur_item'>" +
|
||||||
"<label>候选答案<span class='ur_index'></span>: </label>" +
|
"<label>候选答案<span class='ur_index'></span>: </label>" +
|
||||||
"<input name='exercise_choice[<%=index %>]' placeholder='请输入候选答案' type='text' value='<%=exercise_choice.answer_text %>'/>" +
|
"<input name='exercise_choice[<%=exercise_choice.id %>]' placeholder='请输入候选答案' type='text' value='<%=exercise_choice.answer_text %>'/>" +
|
||||||
|
|
||||||
"<a class='icon_add' title='向下插入选项' onclick='add_candidate_answer($(this));'></a>" +
|
"<a class='icon_add' title='向下插入选项' onclick='add_candidate_answer($(this));'></a>" +
|
||||||
"<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>" +
|
"<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>" +
|
||||||
|
|
Loading…
Reference in New Issue