1.修复点击课程动态,课程动态tab页不高亮显示

2.修复点击新建作业,课程作业tab页不高亮显示
This commit is contained in:
sw 2014-11-12 16:51:07 +08:00
parent dbf08bc486
commit a24d1493f9
4 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ class CoursesController < ApplicationController
menu_item :overview
menu_item :feedback, :only => :feedback
menu_item :homework, :only => :homework
menu_item :new_homework
menu_item :new_homework, :only => :new_homework
menu_item l(:label_sort_by_time), :only => :index
menu_item l(:label_sort_by_active), :only => :index

View File

@ -106,7 +106,7 @@ class HomeworkAttachController < ApplicationController
(SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND rater_id = #{User.current.id}) AS m_score
FROM homework_attaches
INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id
WHERE homework_attaches.bid_id = #{@bid.id} AND homework_evaluations.user_id = #{User.current.id} ORDER BY s_score DESC")
WHERE homework_attaches.bid_id = #{@bid.id} AND homework_evaluations.user_id = #{User.current.id} ORDER BY m_score DESC")
@cur_page = params[:page] || 1
@cur_type = 4
@homework_list = paginateHelper all_homework_list,10

View File

@ -272,7 +272,7 @@
<%= link_to l(:label_course_overview), course_path(@course), :class => link_class(:overview) %>
</li>
<li>
<%= link_to l(:label_homework), homework_course_path(@course), :class => link_class(:homework), :course_type => 1 %>
<%= link_to l(:label_homework), homework_course_path(@course), :class => link_class([:homework,:new_homework]), :course_type => 1 %>
</li>
<li>
<%= link_to l(:label_course_file), course_files_path(@course), :class => link_class(:files) %>

View File

@ -54,7 +54,7 @@ module Redmine
# Returns the menu item name according to the current action
def current_menu_item
@current_menu_item ||= menu_items[controller_name.to_sym][:actions][action_name.to_sym] ||
menu_items[controller_name.to_sym][:default]
menu_items[controller_name.to_sym][:default]
end
# Redirects user to the menu item of the given project