|
|
|
@ -60,18 +60,30 @@
|
|
|
|
|
<% end%>
|
|
|
|
|
</ul>
|
|
|
|
|
<% if User.current.allowed_to?(:as_teacher, @course) || User.current.admin? %>
|
|
|
|
|
<div class="select-class-option fl" style="margin-left: 105px;"><span style="width: 100px; text-align: center; float: left;" class="hidden">向日葵班</span>
|
|
|
|
|
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2 ml5"></a></div>
|
|
|
|
|
<select class="w125 undis class-edit fl" style="margin-left: 105px;">
|
|
|
|
|
<option value="1" selected="selected">向日葵班</option>
|
|
|
|
|
<option value="2">学前班</option>
|
|
|
|
|
<option value="3">幼儿园</option>
|
|
|
|
|
<option value="4">小学</option>
|
|
|
|
|
<option value="5">初中</option>
|
|
|
|
|
</select>
|
|
|
|
|
<% if @course.course_groups.nil? %>
|
|
|
|
|
<div class="select-class-option fl" style="margin-left: 105px;">
|
|
|
|
|
<span style="width: 100px; text-align: center; float: left;" class="hidden">暂无</span>
|
|
|
|
|
</div>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %>
|
|
|
|
|
<div class="select-class-option fl" style="margin-left: 105px;"><span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
|
|
|
|
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2 ml5"></a>
|
|
|
|
|
</div>
|
|
|
|
|
<%= select( :name,:group_id, course_group_option(@course),
|
|
|
|
|
{ :include_blank => false,:selected => member.course_group_id},
|
|
|
|
|
{:onchange=>"join_group_function('#join_group_form_#{member.id}');", :id =>"course_group_id", :name => "course_group_id",:class=>"w125 undis class-edit fl", :style => "margin-left: 105px;"}) %>
|
|
|
|
|
<!--<select class="w125 undis class-edit fl" style="margin-left: 105px;">
|
|
|
|
|
<option value="1" selected="selected">向日葵班</option>
|
|
|
|
|
<option value="2">学前班</option>
|
|
|
|
|
<option value="3">幼儿园</option>
|
|
|
|
|
<option value="4">小学</option>
|
|
|
|
|
<option value="5">初中</option>
|
|
|
|
|
</select>-->
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<div class="select-class-option fl" style="margin-left: 105px;">
|
|
|
|
|
<span style="width: 100px; text-align: center; float: left;" class="hidden"><%= %></span>
|
|
|
|
|
<span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= link_to format("%0.2f",member.score.nil? ? 0 : member.score.to_s), {
|
|
|
|
@ -127,5 +139,8 @@
|
|
|
|
|
stopPropagation(e);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
function join_group_function(id){
|
|
|
|
|
$(id).submit();
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|