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/courses/_course_activity.html.erb b/app/views/courses/_course_activity.html.erb index 1a033b372..e2e1dcfc2 100644 --- a/app/views/courses/_course_activity.html.erb +++ b/app/views/courses/_course_activity.html.erb @@ -73,6 +73,25 @@ $(function () { init_activity_KindEditor_data(<%= activity.id%>, null, "87%"); + var description_images=$("div#activity_description_<%= activity.id %>").find("img"); + if (description_images.length>0) { + for (var i=0; i").attr("href",image.attr('src')); + image.wrap(element); + } + } + $('#activity_description_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); + + var reply_images=$("div#reply_content_<%= activity.id %>").find("img"); + if (reply_images.length>0) { + for (var i=0; i").attr("href",image.attr('src')); + image.wrap(element); + } + } + $('#reply_content_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); }); <% if activity %> 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'%> - +