Merge branch 'sw_new_course' of http://repository.trustie.net/xianbo/trustie2 into sw_new_course

This commit is contained in:
huang 2015-11-19 13:07:00 +08:00
commit d7020fad1f
6 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,4 @@
<%= form_for("",:url => update_exercise_question_exercise_index_path(:exercise_question => exercise_question.id),:remote => true) do |f|%>
<%= form_for("",:class => 'new_or_edit_question',:url => update_exercise_question_exercise_index_path(:exercise_question => exercise_question.id),:remote => true) do |f|%>
<!--编辑单选start-->
<script type="text/javascript">
function resetQuestion<%=exercise_question.id%>()
@ -35,7 +35,7 @@
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
<li class="ur_item">
<label>选项<%=convert_to_char (index+1).to_s %><span class="ur_index"></span>&nbsp;&nbsp;&nbsp;</label>
<input maxlength="200" type='text' name='question_answer[0]' placeholder='输入选项内容' value="<%=exercise_choice.choice_text %>">
<input maxlength="200" type='text' name='question_answer[<%=index %>]' placeholder='输入选项内容' value="<%=exercise_choice.choice_text %>">
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
</li>

View File

@ -1,4 +1,4 @@
<%= form_for("",:url => update_exercise_question_exercise_index_path(:exercise_question => exercise_question.id),:remote => true) do |f|%>
<%= form_for("",:class => 'new_or_edit_question',:url => update_exercise_question_exercise_index_path(:exercise_question => exercise_question.id),:remote => true) do |f|%>
<!--编辑单选start-->
<script type="text/javascript">
function resetQuestion<%=exercise_question.id%>()
@ -9,7 +9,7 @@
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>" +
"<li class='ur_item'>" +
"<label>选项<%=convert_to_char (index+1).to_s %><span class='ur_index'></span>&nbsp;&nbsp;&nbsp;</label>" +
"<input maxlength='200' type='text' name='question_answer[0]' placeholder='输入选项内容' value='<%=exercise_choice.choice_text %>'/>" +
"<input maxlength='200' type='text' name='question_answer[<%= index%>]' placeholder='输入选项内容' value='<%=exercise_choice.choice_text %>'/>" +
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>" +
"<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>" +
"</li>" +

View File

@ -1,4 +1,4 @@
<%= form_for @exercise, :remote=>true do |f| %>
<%= form_for @exercise,:class => 'new_or_edit_question', :remote=>true do |f| %>
<div class="testContainer">
<div>
<input name="exercise[exercise_name]" maxlength="100" id="exercise_name" class="testTitle mb10" type="text" placeholder="测验标题" value="<%=@exercise.exercise_name%>" />

View File

@ -1,4 +1,5 @@
<%= form_for(ExerciseQuestion.new,
:class => 'new_or_edit_question',
:html => { :multipart => true },
:url => {:controller => 'exercise',
:action => 'create_exercise_question',

View File

@ -1,4 +1,5 @@
<%= form_for(ExerciseQuestion.new,
:class => 'new_or_edit_question',
:html => { :multipart => true },
:url => {:controller => 'exercise',
:action => 'create_exercise_question',

View File

@ -1,5 +1,6 @@
<%= form_for(ExerciseQuestion.new,
:html => { :multipart => true },
:class => 'new_or_edit_question',
:url => {:controller => 'exercise',
:action => 'create_exercise_question',
:course_id => @course.id