diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 99732fc6b..11dfbf5f4 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -593,4 +593,14 @@ class AdminController < ApplicationController end end + #分享作业申请 + def apply_for_homework + homeworks = ApplyHomework.where("user_id != 0") + @homework = paginateHelper homeworks,30 + @page = (params['page'] || 1).to_i - 1 + respond_to do |format| + format.html + end + end + end diff --git a/app/views/admin/apply_for_homework.html.erb b/app/views/admin/apply_for_homework.html.erb new file mode 100644 index 000000000..1c7a04901 --- /dev/null +++ b/app/views/admin/apply_for_homework.html.erb @@ -0,0 +1,89 @@ +
+ 序号 + | ++ 作业名称 + | ++ 课程名称 + | ++ 作者 + | ++ 申请者 + | ++ 申请状态 + | ++ 申请日期 + | +
---|---|---|---|---|---|---|
+ <%=@count %> + | + <% c_h = HomeworkCommon.find homework.homework_common_id %> + <% if c_h %> + + <% if c_h.course %> + + <% end %> + + <% end %> + ++ <% if homework.status == 1 %> + 待审核 + <% elsif homework.status == 2 %> + 已通过 + <% else %> + 已拒绝 + <% end %> + | ++ <%=format_date( homework.created_at ) %> + | +