21 lines
1.6 KiB
Plaintext
21 lines
1.6 KiB
Plaintext
$("#poll_questions_<%= @exercise_question.id%>").html("<div id='show_poll_questions_<%= @exercise_question.id %>'>" +
|
|
"<% if @exercise_question.question_type == 1%>" +
|
|
"<%= escape_javascript(render :partial => 'show_MC', :locals => {:exercise_question => @exercise_question}) %>" +
|
|
"<% elsif @exercise_question.question_type == 2%>" +
|
|
"<%= escape_javascript(render :partial => 'show_MCQ', :locals => {:exercise_question => @exercise_question}) %>" +
|
|
"<% elsif @exercise_question.question_type == 3%>" +
|
|
"<%= escape_javascript(render :partial => 'show_single', :locals => {:exercise_question => @exercise_question}) %>" +
|
|
"<% end%>" +
|
|
"</div>" +
|
|
"<div id='edit_poll_questions_<%= @exercise_question.id %>' style='display: none;'>" +
|
|
"<% if @exercise_question.question_type == 1%>" +
|
|
"<%= escape_javascript(render :partial => 'edit_MC', :locals => {:exercise_question => @exercise_question}) %>" +
|
|
"<% elsif @exercise_question.question_type == 2%>" +
|
|
"<%= escape_javascript(render :partial => 'edit_MCQ', :locals => {:exercise_question => @exercise_question}) %>" +
|
|
"<% elsif @exercise_question.question_type == 3%>" +
|
|
"<%= escape_javascript(render :partial => 'edit_single', :locals => {:exercise_question => @exercise_question}) %>" +
|
|
"<% end%>" +
|
|
"</div>");
|
|
$("#current_score").html("<%=get_current_score @exercise_question.exercise %>分");
|
|
$("#exercise_submit").html("<%= escape_javascript(render :partial => 'exercise_submit', :locals => {:exercise => @exercise_question.exercise}) %>");
|