diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 758e14157e6..edeb481c91e 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -380,7 +380,7 @@ class AccountsController < ApplicationController def run_report if authorized_action(@context, @current_user, :read_reports) - student_report = AccountReport.new(:user=>@current_user, :account=>@account, :report_type=>params[:report_type]) + student_report = AccountReport.new(:user=>@current_user, :account=>@account, :report_type=>params[:report_type], :parameters=>params[:parameters]) student_report.workflow_state = :running student_report.progress = 0 student_report.save diff --git a/app/models/account_report.rb b/app/models/account_report.rb index bd71f28c1d2..cb67073f73d 100644 --- a/app/models/account_report.rb +++ b/app/models/account_report.rb @@ -24,6 +24,8 @@ class AccountReport < ActiveRecord::Base belongs_to :user belongs_to :attachment + serialize :parameters + workflow do state :created state :running diff --git a/app/views/accounts/settings.html.erb b/app/views/accounts/settings.html.erb index c2a89551bb2..8ba11f9b00b 100644 --- a/app/views/accounts/settings.html.erb +++ b/app/views/accounts/settings.html.erb @@ -390,6 +390,8 @@ description = details[:description] description_partial = details[:description_partial] description_partial = report + '_description' if description_partial == true + parameters_partial = details[:parameters_partial] + parameters_partial = report + '_parameters' if parameters_partial == true last_run = @last_reports[report] %>