Merge branch 'szzh' of http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git into szzh
This commit is contained in:
commit
c61bad4933
|
@ -254,8 +254,8 @@ class CoursesController < ApplicationController
|
||||||
end
|
end
|
||||||
@is_remote = true
|
@is_remote = true
|
||||||
@result_count = @results.count
|
@result_count = @results.count
|
||||||
@results = paginateHelper @results
|
@results = paginateHelper @results, 10
|
||||||
|
@search_name = q
|
||||||
end
|
end
|
||||||
|
|
||||||
def addgroups
|
def addgroups
|
||||||
|
@ -428,17 +428,34 @@ class CoursesController < ApplicationController
|
||||||
# @results = paginateHelper @results@score_sort_by = "desc"
|
# @results = paginateHelper @results@score_sort_by = "desc"
|
||||||
@is_remote = true
|
@is_remote = true
|
||||||
@score_sort_by = params[:sort_by] if params[:sort_by]
|
@score_sort_by = params[:sort_by] if params[:sort_by]
|
||||||
|
@search_name = params[:search_name] if params[:search_name]
|
||||||
group_id = params[:group_id]
|
group_id = params[:group_id]
|
||||||
if group_id == '0'
|
if !@search_name.nil?
|
||||||
page = params[:page].nil? ? 0 : (params['page'].to_i - 1)
|
if group_id == '0'
|
||||||
@results = student_homework_score(0,page, 10,@score_sort_by)
|
page = params[:page].nil? ? 0 : (params['page'].to_i - 1)
|
||||||
|
|
||||||
@results = paginateHelper_for_members @results, 10
|
@results = searchmember_by_name(student_homework_score(0,0,0,@score_sort_by), @search_name)
|
||||||
|
@result_count = @results.count
|
||||||
|
@results = paginateHelper @results, 10
|
||||||
|
else
|
||||||
|
@group = CourseGroup.find(group_id)
|
||||||
|
@results = searchmember_by_name(student_homework_score(group_id, 0, 0,@score_sort_by),@search_name)
|
||||||
|
@result_count = @results.count
|
||||||
|
@results = paginateHelper @results, 10
|
||||||
|
end
|
||||||
else
|
else
|
||||||
@group = CourseGroup.find(group_id)
|
if group_id == '0'
|
||||||
@results = student_homework_score(group_id, 0, 0,@score_sort_by)
|
page = params[:page].nil? ? 0 : (params['page'].to_i - 1)
|
||||||
@results = paginateHelper @results, 10
|
@results = student_homework_score(0,page, 10,@score_sort_by)
|
||||||
|
|
||||||
|
@results = paginateHelper_for_members @results, 10
|
||||||
|
else
|
||||||
|
@group = CourseGroup.find(group_id)
|
||||||
|
@results = student_homework_score(group_id, 0, 0,@score_sort_by)
|
||||||
|
@results = paginateHelper @results, 10
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
# 显示每个学生的作业评分详情
|
# 显示每个学生的作业评分详情
|
||||||
def show_member_score
|
def show_member_score
|
||||||
|
|
|
@ -50,10 +50,15 @@ class Mailer < ActionMailer::Base
|
||||||
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id)
|
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id)
|
||||||
@issue_author_url = url_for(user_activities_url(@author))
|
@issue_author_url = url_for(user_activities_url(@author))
|
||||||
recipients ||= []
|
recipients ||= []
|
||||||
mems = memo.self_and_siblings
|
# if !memo.parent_id.nil?
|
||||||
mems.each do |mem|
|
# mems = memo.self_and_siblings
|
||||||
recipients << mem.author.mail unless recipients.include? mem.author.mail
|
# mems.each do |mem|
|
||||||
end
|
# recipients << mem.author.mail unless recipients.include? mem.author.mail
|
||||||
|
# end
|
||||||
|
# else
|
||||||
|
# recipients << memo.author.mail
|
||||||
|
# end
|
||||||
|
recipients << @author.mail
|
||||||
# cc = wiki_content.page.wiki.watcher_recipients - recipients
|
# cc = wiki_content.page.wiki.watcher_recipients - recipients
|
||||||
|
|
||||||
@memo_url = url_for(forum_memo_url(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id)))
|
@memo_url = url_for(forum_memo_url(@forum, (@memo.parent_id.nil? ? @memo : @memo.parent_id)))
|
||||||
|
@ -98,10 +103,7 @@ class Mailer < ActionMailer::Base
|
||||||
#收件人邮箱
|
#收件人邮箱
|
||||||
@recipients ||= []
|
@recipients ||= []
|
||||||
@members.each do |teacher|
|
@members.each do |teacher|
|
||||||
|
|
||||||
@recipients << teacher.user.mail
|
@recipients << teacher.user.mail
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
mail :to => @recipients,
|
mail :to => @recipients,
|
||||||
:subject => "#{l(:label_your_course)}#{journals_for_message.jour.name}#{l(:label_have_message)} "
|
:subject => "#{l(:label_your_course)}#{journals_for_message.jour.name}#{l(:label_have_message)} "
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Memo < ActiveRecord::Base
|
||||||
"parent_id",
|
"parent_id",
|
||||||
"replies_count"
|
"replies_count"
|
||||||
|
|
||||||
after_create :add_author_as_watcher, :reset_counters!, :sendmail#,:be_user_score -- 公共区发帖暂不计入得分
|
after_create :add_author_as_watcher, :reset_counters! #, :sendmail#,:be_user_score -- 公共区发帖暂不计入得分
|
||||||
# after_update :update_memos_forum
|
# after_update :update_memos_forum
|
||||||
after_destroy :reset_counters!#,:down_user_score -- 公共区发帖暂不计入得分
|
after_destroy :reset_counters!#,:down_user_score -- 公共区发帖暂不计入得分
|
||||||
# after_create :send_notification
|
# after_create :send_notification
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<div class="st_box">
|
<div class="st_box">
|
||||||
<ul class="st_box_top" style="margin-left: 17px;">
|
<ul class="st_box_top" style="margin-left: 17px;">
|
||||||
<% if @subPage_title == l(:label_student_list) %>
|
<% if @subPage_title == l(:label_student_list) %>
|
||||||
<li class="ml358"><%= link_to '作业积分', member_score_sort_course_path(:sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0)) ,:result => members,method: 'get', remote: true%>
|
<li class="ml358"><%= link_to '作业积分', member_score_sort_course_path(:sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true%>
|
||||||
<% if @score_sort_by == 'desc' %>
|
<% if @score_sort_by == 'desc' %>
|
||||||
<a id="pic" href="#" class= "st_down"></a>
|
<a id="pic" href="#" class= "st_down"></a>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
html{ overflow-x:hidden;}
|
html{ overflow-x:hidden;}
|
||||||
.custom_service p img {display: inline; margin-top:-5px; vertical-align:middle;}
|
.custom_service p img {display: inline; margin-top:-5px; vertical-align:middle;}
|
||||||
.scrollsidebar{position:absolute; z-index:999; top:150px;}
|
.scrollsidebar{position:absolute; z-index:999; top:150px;background:none !important;}
|
||||||
.side_content{width:154px; height:auto; overflow:hidden; float:left; }
|
.side_content{width:154px; height:auto; overflow:hidden; float:left; }
|
||||||
.side_content .side_list {width:154px;overflow:hidden;}
|
.side_content .side_list {width:154px;overflow:hidden;}
|
||||||
.show_btn{ width:0; height:112px; overflow:hidden; margin-top:50px; float:left; cursor:pointer;}
|
.show_btn{ width:0; height:112px; overflow:hidden; margin-top:50px; float:left; cursor:pointer;}
|
||||||
|
|
|
@ -39,7 +39,8 @@ module RedmineApp
|
||||||
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
||||||
|
|
||||||
# Activate observers that should always be running.
|
# Activate observers that should always be running.
|
||||||
config.active_record.observers = :journals_for_message_observer, :message_observer, :issue_observer, :journal_observer, :news_observer, :document_observer, :wiki_content_observer, :comment_observer
|
config.active_record.observers = :journals_for_message_observer, :message_observer, :issue_observer, :journal_observer, :news_observer,
|
||||||
|
:document_observer, :wiki_content_observer, :comment_observer, :forum_observer, :memo_observer
|
||||||
|
|
||||||
config.active_record.store_full_sti_class = true
|
config.active_record.store_full_sti_class = true
|
||||||
config.active_record.default_timezone = :local
|
config.active_record.default_timezone = :local
|
||||||
|
|
Loading…
Reference in New Issue