选入我得课程列表中添加课程学期的显示

This commit is contained in:
z9hang 2014-11-26 14:54:31 +08:00
parent bb66ef54f6
commit 5a20945e0d
2 changed files with 2 additions and 1 deletions

View File

@ -28,6 +28,7 @@ class FilesController < ApplicationController
include SortHelper include SortHelper
include FilesHelper include FilesHelper
helper :project_score helper :project_score
include CoursesHelper
def show_attachments obj def show_attachments obj
@attachments = [] @attachments = []

View File

@ -48,7 +48,7 @@ module FilesHelper
s = '' s = ''
courses.each do |course| courses.each do |course|
if !(attachment.container_type && attachment.container_id == course.id) && is_course_teacher(User.current,course) if !(attachment.container_type && attachment.container_id == course.id) && is_course_teacher(User.current,course)
s << "<label>#{ check_box_tag name, course.id, false, :id => nil } #{h course.name}</label><br/>" s << "<label>#{ check_box_tag name, course.id, false, :id => nil } #{h course.name}</label>&nbsp;[#{get_course_term course}]<br/>"
end end
end end
s.html_safe s.html_safe