Merge branch 'szzh' of http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git into szzh
Conflicts: app/controllers/courses_controller.rb
This commit is contained in:
commit
f8dc9dcd35
|
@ -333,7 +333,7 @@ class CoursesController < ApplicationController
|
|||
case params[:role]
|
||||
when '1'
|
||||
@subPage_title = l :label_teacher_list
|
||||
@members = searchTeacherAndAssistant(@course)
|
||||
@members = @teachers
|
||||
when '2'
|
||||
@subPage_title = l :label_student_list
|
||||
@members = student_homework_score
|
||||
|
@ -882,7 +882,6 @@ class CoursesController < ApplicationController
|
|||
|
||||
def student_homework_score
|
||||
teachers = find_course_teachers(@course)
|
||||
|
||||
homework_scores = Member.find_by_sql("SELECT id, user_id,course_id, course_group_id,created_on,IFNULL(SUM(CASE WHEN t_score <> 0 AND t_score IS NOT NULL THEN t_score ELSE s_score END),0) as score
|
||||
FROM (
|
||||
SELECT members.id as id, members.user_id AS user_id, members.course_id AS course_id, members.created_on as created_on,members.course_group_id AS course_group_id,
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<td style="text-align: left" colspan="2">
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_create_time) %>
|
||||
:
|
||||
|
@ -178,7 +178,6 @@
|
|||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
|
|
@ -24,35 +24,46 @@
|
|||
<div class="cl"></div>
|
||||
<% if members.any? %>
|
||||
<% if @result_count %>
|
||||
<p style="font-size: 18px;"><%= l(:label_search_member_count) %><%= @result_count %><%= l(:label_member_people) %></p>
|
||||
<p style="font-size: 18px;">
|
||||
<%= l(:label_search_member_count) %>
|
||||
<%= @result_count %>
|
||||
<%= l(:label_member_people) %>
|
||||
</p>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<div class="st_box">
|
||||
<ul class="st_box_top" style="margin-left: 17px;">
|
||||
<% if @subPage_title == l(:label_student_list) %>
|
||||
<li class="ml358"><%= link_to '作业积分', member_score_sort_course_path ,method: 'get', remote: true, :onclick => "change_pic('pic')"%>
|
||||
<a id="pic" href="#" class="st_down"></a></li>
|
||||
<li class="ml50"><a href="#" >加入时间</a></li>
|
||||
<a id="pic" href="#" class="st_down"></a>
|
||||
</li>
|
||||
<li class="ml50">
|
||||
<a href="#" >加入时间</a>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="ml50" style="margin-left: 470px"><li class="ml50"><a href="#" >加入时间</a></li>
|
||||
<li class="ml50" style="margin-left: 470px">
|
||||
</li>
|
||||
<li class="ml50">
|
||||
<a href="#" >加入时间</a>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
</ul>
|
||||
<div id="list_detail" style="margin-left: 17px">
|
||||
<% members.each do |member| %>
|
||||
|
||||
<div class="cl"></div><!--st_box_top end-->
|
||||
<div class="st_boxlist">
|
||||
<% next if member.new_record? %>
|
||||
|
||||
<a href="#" class="st_img" style="float:left;"> <%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 40, :height => 40)) %></a>
|
||||
<a href="#" class="st_img" style="float:left;">
|
||||
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 40, :height => 40)) %>
|
||||
</a>
|
||||
<ul style="margin-left: 15px">
|
||||
<% if @canShowCode %>
|
||||
<li>
|
||||
<%= l(:label_bidding_user_studentname) %> :
|
||||
<%= link_to member.user.show_name, user_path(member.user) %>
|
||||
|
||||
</li> </br>
|
||||
</li>
|
||||
</br>
|
||||
<%#= content_tag "li", "#{l(:label_bidding_user_studentname)}#{' : '}"link_to(member.user.show_name, user_path(member.user)) %>
|
||||
<% else %>
|
||||
<%= content_tag "li", link_to(member.user.name, user_path(member.user)) %>
|
||||
|
@ -89,7 +100,9 @@
|
|||
<% end; reset_cycle %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagination"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %></div>
|
||||
<div class="pagination">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
</p>
|
||||
<p>
|
||||
<%= f.text_field :login, :size => 30 %>
|
||||
<input type="text" hidden="hidden">
|
||||
</p>
|
||||
<p>
|
||||
<%= f.password_field :password, :size => 30, :name => 'ignore',
|
||||
|
|
Loading…
Reference in New Issue