diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index 298331c69..6d916f43e 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -97,7 +97,7 @@ module WatchersHelper return '' unless user && user.logged? # modify by nwb # 主讲教师不允许退出课程 - return '' if user.id == course.tea_id || course.is_public == 0 + return '' if user.id == course.tea_id joined = user.member_of_course?(course) text = joined ? l(:label_exit_course) : l(:label_new_join) url_t = join_path(:object_id => course.id) diff --git a/app/views/courses/_course_ad.html.erb b/app/views/courses/_course_ad.html.erb index 10a6d7eaf..f8b4781f8 100644 --- a/app/views/courses/_course_ad.html.erb +++ b/app/views/courses/_course_ad.html.erb @@ -1,6 +1,6 @@
<%= l(:label_contact_us) %>
@@ -30,85 +30,26 @@
\ No newline at end of file
diff --git a/app/views/courses/homework.html.erb b/app/views/courses/homework.html.erb
index 95e26abd0..68ec0dc2e 100644
--- a/app/views/courses/homework.html.erb
+++ b/app/views/courses/homework.html.erb
@@ -5,11 +5,12 @@
<%= javascript_include_tag 'attachments' %>
-
- <% if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.roles&Role.where(id: [3, 4, 7, 9] )).size >0))%>
- <%= link_to(l(:label_course_homework_new), {:controller => 'courses', :action => 'new_homework'}, :class => 'icon icon-add') %>
- <% end %>
+ <% if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.roles&Role.where(id: [3, 4, 7, 9] )).size >0))%>
+ <%= link_to(l(:label_course_homework_new), {:controller => 'courses', :action => 'new_homework'}, :class => 'icon icon-add') %>
+ <% else %>
+ <%= l(:label_coursejoin_tip) %>
+ <% end %>
<%= render :partial => 'bids/bid_homework_show', :locals => {:bids => @bids, :bid_pages => @bid_pages} %>
diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb
index c48900426..46a954746 100644
--- a/app/views/files/_course_file.html.erb
+++ b/app/views/files/_course_file.html.erb
@@ -13,7 +13,37 @@
<%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @course) %>
<%= link_to(l(:label_relation_files), 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @course) %>
+
+
diff --git a/app/views/files/_course_new.html.erb b/app/views/files/_course_new.html.erb
index f864f8629..2eaa70cb6 100644
--- a/app/views/files/_course_new.html.erb
+++ b/app/views/files/_course_new.html.erb
@@ -20,28 +20,6 @@
<% end %>
-
-
-
|