Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
56fa330fed
|
@ -254,8 +254,8 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
@is_remote = true
|
||||
@result_count = @results.count
|
||||
@results = paginateHelper @results
|
||||
|
||||
@results = paginateHelper @results, 10
|
||||
@search_name = q
|
||||
end
|
||||
|
||||
def addgroups
|
||||
|
@ -428,17 +428,34 @@ class CoursesController < ApplicationController
|
|||
# @results = paginateHelper @results@score_sort_by = "desc"
|
||||
@is_remote = true
|
||||
@score_sort_by = params[:sort_by] if params[:sort_by]
|
||||
@search_name = params[:search_name] if params[:search_name]
|
||||
group_id = params[:group_id]
|
||||
if group_id == '0'
|
||||
page = params[:page].nil? ? 0 : (params['page'].to_i - 1)
|
||||
@results = student_homework_score(0,page, 10,@score_sort_by)
|
||||
if !@search_name.nil?
|
||||
if group_id == '0'
|
||||
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
|
||||
@group = CourseGroup.find(group_id)
|
||||
@results = student_homework_score(group_id, 0, 0,@score_sort_by)
|
||||
@results = paginateHelper @results, 10
|
||||
if group_id == '0'
|
||||
page = params[:page].nil? ? 0 : (params['page'].to_i - 1)
|
||||
@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
|
||||
# 显示每个学生的作业评分详情
|
||||
def show_member_score
|
||||
|
|
|
@ -23,7 +23,7 @@ class Forum < ActiveRecord::Base
|
|||
|
||||
acts_as_taggable
|
||||
scope :by_join_date, order("created_at DESC")
|
||||
after_create :send_email
|
||||
#after_create :send_email
|
||||
def reset_counters!
|
||||
self.class.reset_counters!(id)
|
||||
end
|
||||
|
|
|
@ -50,10 +50,15 @@ class Mailer < ActionMailer::Base
|
|||
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id)
|
||||
@issue_author_url = url_for(user_activities_url(@author))
|
||||
recipients ||= []
|
||||
mems = memo.self_and_siblings
|
||||
mems.each do |mem|
|
||||
recipients << mem.author.mail unless recipients.include? mem.author.mail
|
||||
end
|
||||
# if !memo.parent_id.nil?
|
||||
# mems = memo.self_and_siblings
|
||||
# mems.each do |mem|
|
||||
# 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
|
||||
|
||||
@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 ||= []
|
||||
@members.each do |teacher|
|
||||
|
||||
@recipients << teacher.user.mail
|
||||
|
||||
|
||||
end
|
||||
mail :to => @recipients,
|
||||
:subject => "#{l(:label_your_course)}#{journals_for_message.jour.name}#{l(:label_have_message)} "
|
||||
|
|
|
@ -47,7 +47,7 @@ class Memo < ActiveRecord::Base
|
|||
"parent_id",
|
||||
"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_destroy :reset_counters!#,:down_user_score -- 公共区发帖暂不计入得分
|
||||
# after_create :send_notification
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<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(: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' %>
|
||||
<a id="pic" href="#" class= "st_down"></a>
|
||||
<% else %>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
html{ overflow-x:hidden;}
|
||||
.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 .side_list {width:154px;overflow:hidden;}
|
||||
.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 ]
|
||||
|
||||
# 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.default_timezone = :local
|
||||
|
|
Loading…
Reference in New Issue