diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 1e4d569b4..83a6d1ab1 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -453,7 +453,7 @@ class AccountController < ApplicationController end def apply_trail - apply_action = ApplyAction.where(:user_id => User.current.id, :container_type => "TrialAuthorization").first + apply_action = ApplyAction.where(:user_id => User.current.id, :container_type => "TrialAuthorization", :status => 0).first if apply_action.blank? ApplyAction.create(:user_id => User.current.id, :status => 0, :container_type => "TrialAuthorization") end diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index ae0ca961a..d434651cf 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -292,6 +292,12 @@ class ManagementsController < ApplicationController apply_action.update_attributes(:status => (params[:type] == "1" ? 2 : 1), :reason => params[:reject_reason], :dealer_id => User.current.id) user_id = User.find_by_sql("select id from users where concat(lastname,firstname) like '%#{search}%'") @authorizations = ApplyAction.where(:container_type => "TrialAuthorization", :status => 0, :user_id => user_id).includes(:user) + @autu_count = @authorizations.count + @limit = 15 + @is_remote = true + @autu_pages = Paginator.new @autu_count, @limit, params['page'] || 1 + @offset ||= @autu_pages.offset + @authorizations = paginateHelper @authorizations, @limit respond_to do |format| format.js end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 8762639c9..10064d77b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1235,7 +1235,7 @@ class UsersController < ApplicationController #导入作业,确定按钮 def user_select_homework params[:checkMenu].each do |homework_bank| - homework = HomeworkBank.find_by_id params[:checkMenu] + homework = HomeworkBank.find_by_id homework_bank @select_course = Course.find params[:select_course] if homework && @select_course quote_homework_bank homework, @select_course diff --git a/app/views/account/apply_trail.js.erb b/app/views/account/apply_trail.js.erb index 0b921b7c3..c7b789ae5 100644 --- a/app/views/account/apply_trail.js.erb +++ b/app/views/account/apply_trail.js.erb @@ -1 +1 @@ -$("body").append('<%= j( render :partial => 'welcome/one_btn_mask_pop', :locals => {:btn => "确定", :tip1 => "申请成功,我们将在一个工作日内完成审核", :url => "javascript:void(0);"}) %>'); \ No newline at end of file +$("body").append('<%= j( render :partial => 'welcome/one_btn_mask_pop', :locals => {:btn => "确定", :tip1 => "申请成功,我们将在一个工作日内完成审核", :url => "#{my_account_path()}"}) %>'); \ No newline at end of file diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index cf10f9a0f..d0cdebce2 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -4,8 +4,8 @@
作业列表
<% if @is_teacher %> 新建 + <%= link_to("题库选用", user_import_homeworks_user_path(User.current.id, :select_course => @course.id), :class => "edu-btn fr mr10",:remote => true,:title=>"导入自己发布过的作业,或者共享题库中的作业") %> <% end %> - <%= link_to("题库选用", user_import_homeworks_user_path(User.current.id, :select_course => @course.id), :class => "edu-btn fr mr10",:remote => true,:title=>"导入自己发布过的作业,或者共享题库中的作业") %>
还没有添加课程题库 ~
diff --git a/app/views/syllabuses/_syllabus_members.html.erb b/app/views/syllabuses/_syllabus_members.html.erb index 8fd1c7486..d6925773b 100644 --- a/app/views/syllabuses/_syllabus_members.html.erb +++ b/app/views/syllabuses/_syllabus_members.html.erb @@ -1,5 +1,5 @@ -<% @members.each do |member| %> -
还没有添加课程资源库 ~
diff --git a/app/views/syllabuses/show.html.erb b/app/views/syllabuses/show.html.erb index 9cf32f8f1..432daf8f7 100644 --- a/app/views/syllabuses/show.html.erb +++ b/app/views/syllabuses/show.html.erb @@ -106,7 +106,7 @@