Class: Course::Assessment::Submission::StatisticsDownloadService

Inherits:
Object
  • Object
show all
Includes:
ApplicationFormattersHelper
Defined in:
app/services/course/assessment/submission/statistics_download_service.rb

Constant Summary

Constants included from ApplicationHTMLFormattersHelper

ApplicationHTMLFormattersHelper::DefaultCodePipelineOptions, ApplicationHTMLFormattersHelper::DefaultHTMLPipeline, ApplicationHTMLFormattersHelper::DefaultHTMLPipelineOptions, ApplicationHTMLFormattersHelper::DefaultPipeline, ApplicationHTMLFormattersHelper::DefaultPipelineOptions, ApplicationHTMLFormattersHelper::HTMLSanitizerOptions, ApplicationHTMLFormattersHelper::HTMLSanitizerPipeline, ApplicationHTMLFormattersHelper::MAX_CODE_LINES, ApplicationHTMLFormattersHelper::MAX_CODE_SIZE, ApplicationHTMLFormattersHelper::SANITIZATION_FILTER_WHITELIST, ApplicationHTMLFormattersHelper::VIDEO_URL_WHITELIST, ApplicationHTMLFormattersHelper::VIDEO_WHITELIST_TRANSFORMER

Class Method Summary collapse

Methods included from ApplicationFormattersHelper

#display_topic, #display_user, #display_user_image, #draft_class, #draft_message, #format_block_text, #format_boolean, #format_datetime, #format_duration, #format_inline_text, #link_to_user, #time_period_class, #time_period_message, #unread_class

Methods included from ApplicationHTMLFormattersHelper

#default_code_pipeline, #format_code_block, #format_html, #highlight_code_block, #sanitize

Class Method Details

.download(current_user, submission_ids) ⇒ String

Downloads the statistics and zip them.

Parameters:

  • current_user (User)

    The current user downloading the statistics.

  • submission_ids (Array<Integer>)

    The ids of the submissions to download statistics for

Returns:

  • (String)

    The path to the csv file.


12
13
14
15
16
17
# File 'app/services/course/assessment/submission/statistics_download_service.rb', line 12

def download(current_user, submission_ids)
  service = new(current_user, submission_ids)
  ActsAsTenant.without_tenant do
    service.send(:generate_csv_report)
  end
end