% if @is_insert %>
$("#poll_content").html('<%= escape_javascript(render :partial => 'exercise_content', :locals => {:exercise => @exercise})%>');
$("#exercise_submit").html("<%= escape_javascript(render :partial => 'exercise_submit', :locals => {:exercise => @exercise}) %>");
$("#current_score_div").show();
$("#current_score").html("<%=get_current_score @exercise %>分");
<% else %>
$("#new_exercise_question").html('<%= escape_javascript(render :partial => 'new_question', :locals => {:exercise => @exercise}) %>');
$("#new_poll_question").html("");
$("#exercise_submit").html("<%= escape_javascript(render :partial => 'exercise_submit', :locals => {:exercise => @exercise}) %>");
<%if @exercise_questions.question_type == 1%>
$("#mc_question_list").show().append("
" +
"
" +
"<%= escape_javascript(render :partial => 'show_MC', :locals => {:exercise_question => @exercise_questions}) %>" +
"
" +
"
" +
"<%= escape_javascript(render :partial => 'edit_MC', :locals => {:exercise_question => @exercise_questions}) %>" +
"
" +
"
");
<% end %>
<%if @exercise_questions.question_type == 2%>
$("#mcq_question_list").show().append("" +
"
" +
"<%= escape_javascript(render :partial => 'show_MCQ', :locals => {:exercise_question => @exercise_questions}) %>" +
"
" +
"
" +
"<%= escape_javascript(render :partial => 'edit_MCQ', :locals => {:exercise_question => @exercise_questions}) %>" +
"
" +
"
");
<% end %>
<%if @exercise_questions.question_type == 3%>
$("#single_question_list").show().append("" +
"
" +
"<%= escape_javascript(render :partial => 'show_single', :locals => {:exercise_question => @exercise_questions}) %>" +
"
" +
"
" +
"<%= escape_javascript(render :partial => 'edit_single', :locals => {:exercise_question => @exercise_questions}) %>" +
"
" +
"
");
<% end %>
$("#current_score_div").show();
$("#current_score").html("<%=get_current_score @exercise %>分");
<% end %>