diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 7b81d12db..0f8330afe 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -176,12 +176,6 @@ class FilesController < ApplicationController def index @flag = params[:flag] || false - #sort_init 'filename', 'asc' - # sort_init 'created_on', 'desc' - # sort_update 'created_on' => "#{Attachment.table_name}.created_on", - # 'filename' => "#{Attachment.table_name}.filename", - # 'size' => "#{Attachment.table_name}.filesize", - # 'downloads' => "#{Attachment.table_name}.downloads" sort = "" @sort = "" @order = "" diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 52b7242dd..a8ba4f4ee 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -89,7 +89,7 @@ class Mailer < ActionMailer::Base recipients ||= [] # 只给该课程的老师发送邮件提醒 course.members.each do |member| - if m.user.allowed_to?(:as_teacher,course) + if member.user.allowed_to?(:as_teacher,course) user = User.find(member.user_id) #@subject = "[#{l(:mail_homework)} #{homework_common.name}] #{l(:mail_anonymous_comment_failed)}" @token = Token.get_token_from_user(user, 'autologin') diff --git a/app/views/avatar/_new_avatar_form.html.erb b/app/views/avatar/_new_avatar_form.html.erb index 64abfbc30..de3bf2b65 100644 --- a/app/views/avatar/_new_avatar_form.html.erb +++ b/app/views/avatar/_new_avatar_form.html.erb @@ -1,11 +1,10 @@ <%= image_tag(url_to_avatar(source), id: "avatar_image", :width =>"60", :height =>"60",:alt=>"上传图片")%> -<%#= link_to l(:button_delete_file),{:controller => :avatar,:action => :delete_image,:remote=>true,:source_type=> source.class,:source_id=>source.id},:confirm => l(:text_are_you_sure), :method => :post, :class => "upbtn fl" %> -<%= l(:button_upload_photo) %> +<%= l(:button_upload_photo) %> <%= file_field_tag 'avatar[image]', - :id => nil, - :class => 'upload_file', + :id => "upload_img", + :class => 'undis', :size => "1", :multiple => true, :data => { diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index fbc545607..489820f0c 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -19,7 +19,7 @@ <%= yield :header_tags -%> <%= stylesheet_link_tag 'base','header', :media => 'all'%> - +