parent
dbf08bc486
commit
a24d1493f9
|
@ -8,7 +8,7 @@ class CoursesController < ApplicationController
|
||||||
menu_item :overview
|
menu_item :overview
|
||||||
menu_item :feedback, :only => :feedback
|
menu_item :feedback, :only => :feedback
|
||||||
menu_item :homework, :only => :homework
|
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_time), :only => :index
|
||||||
menu_item l(:label_sort_by_active), :only => :index
|
menu_item l(:label_sort_by_active), :only => :index
|
||||||
|
|
|
@ -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
|
(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
|
FROM homework_attaches
|
||||||
INNER JOIN homework_evaluations ON homework_evaluations.homework_attach_id = homework_attaches.id
|
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_page = params[:page] || 1
|
||||||
@cur_type = 4
|
@cur_type = 4
|
||||||
@homework_list = paginateHelper all_homework_list,10
|
@homework_list = paginateHelper all_homework_list,10
|
||||||
|
|
|
@ -272,7 +272,7 @@
|
||||||
<%= link_to l(:label_course_overview), course_path(@course), :class => link_class(:overview) %>
|
<%= link_to l(:label_course_overview), course_path(@course), :class => link_class(:overview) %>
|
||||||
</li>
|
</li>
|
||||||
<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>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to l(:label_course_file), course_files_path(@course), :class => link_class(:files) %>
|
<%= link_to l(:label_course_file), course_files_path(@course), :class => link_class(:files) %>
|
||||||
|
|
Loading…
Reference in New Issue