后台作业列表添加编程作业过滤
This commit is contained in:
parent
465f4c91bb
commit
e6deabadba
|
@ -978,7 +978,11 @@ class AdminController < ApplicationController
|
|||
#作业
|
||||
def homework
|
||||
#@homework = HomeworkCommon.order('end_time desc')
|
||||
if params[:type] == "2"
|
||||
@homework = HomeworkCommon.where(:homework_type => 2).order( 'created_at desc ')
|
||||
else
|
||||
@homework = HomeworkCommon.order( 'created_at desc ')
|
||||
end
|
||||
@homework = paginateHelper @homework,30
|
||||
@page = (params['page'] || 1).to_i - 1
|
||||
respond_to do |format|
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<h3>
|
||||
<%=l(:label_user_homework)%>
|
||||
</h3>
|
||||
|
||||
<p><%= link_to "编程作业", admin_homework_path(:type => "2") %></p>
|
||||
<div class="autoscroll">
|
||||
<table class="list" style="width: 100%;table-layout: fixed">
|
||||
<thead>
|
||||
|
|
Loading…
Reference in New Issue