diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 3545a8a22..0c3236d4e 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -153,6 +153,7 @@ class BoardsController < ApplicationController end end + @page = params[:page] ? params[:page].to_i + 1 : 0 @message = Message.new(:board => @board) #modify by nwb respond_to do |format| diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 68f7cc9cb..121cd3a42 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -24,7 +24,7 @@ class FilesController < ApplicationController before_filter :auth_login1, :only => [:index] before_filter :logged_user_by_apptoken,:only => [:index] before_filter :find_project_by_project_id#, :except => [:getattachtype] - before_filter :authorize, :except => [:create,:getattachtype,:quote_resource_show,:search,:searchone4reload,:search_project,:quote_resource_show_project,:search_tag_attachment] + before_filter :authorize, :except => [:create,:getattachtype,:quote_resource_show,:search,:searchone4reload,:search_project,:quote_resource_show_project,:search_tag_attachment,:subfield_upload_file,:search_org_subfield_tag_attachment,:search_tag_attachment,:quote_resource_show_org_subfield,:find_org_subfield_attache,:search_files_in_subfield] helper :sort include SortHelper diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0650db1cf..c4bbc4ebb 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2727,6 +2727,10 @@ int main(int argc, char** argv){ opt = {enable_at: false, prettify: false, init_activity: false}.merge default_opt ss = '' + unless Setting.at_enabled? + opt[:enable_at] = false + end + ss += javascript_include_tag("/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg') if opt[:enable_at] ss += javascript_include_tag('/assets/kindeditor/at/jquery.caret.min.js', '/assets/kindeditor/at/jquery.atwho.js', '/assets/kindeditor/at/config.js') diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index 4dcdb7749..de3b038e6 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -31,4 +31,5 @@ <%= render :partial => 'course_new', :locals => {:f => f, :topic => @message, :edit_mode => false, :course => @board.course} %> <% end %> <% end %> - <%= render :partial=> 'course_show_detail',:locals =>{:topics => @topics, :page => 0} %> + <%= render :partial=> 'course_show_detail',:locals =>{:topics => @topics, :page => 0} %> + diff --git a/app/views/student_work/edit.html.erb b/app/views/student_work/edit.html.erb index c7c572cff..cb8e7edf9 100644 --- a/app/views/student_work/edit.html.erb +++ b/app/views/student_work/edit.html.erb @@ -34,7 +34,11 @@ <% if @homework.homework_type == 3 %>
- <%=hidden_field_tag 'group_member_ids', params[:group_member_ids], :value=>User.current.id %> + <% str = User.current.id.to_s%> + <% @work.student_work_projects.where("is_leader = ?", 0).each do |pro| %> + <% str += ','+pro.user_id.to_s %> + <% end %> + <%=hidden_field_tag 'group_member_ids', params[:group_member_ids], :value=>str %> <% end %>