Sha256: 98e3bc1b64ebe706dac8db1e3a436073ab33902deaa9088efe0856ff82a74e98

Contents?: true

Size: 853 Bytes

Versions: 3

Compression:

Stored size: 853 Bytes

Contents

require "canvas_qti_to_learnosity_converter/questions/question"

module CanvasQtiToLearnosityConverter
  class FileUploadQuestion < QuizQuestion
    def to_learnosity
      {
        type: "fileupload",
        stimulus: extract_stimulus(),
        allow_pdf: true,
        allow_jpg: true,
        allow_gif: true,
        allow_png: true,
        allow_csv: true,
        allow_rtf: true,
        allow_txt: true,
        allow_xps: true,
        allow_ms_word: true,
        allow_ms_excel: true,
        allow_ms_powerpoint: true,
        allow_ms_publisher: true,
        allow_open_office: true
      }
    end

    def add_learnosity_assets(assets, path)
      learnosity = to_learnosity
      CanvasQtiToLearnosityConverter.add_files_to_assets(
        assets,
        path + [:stimulus],
        learnosity[:stimulus]
      )
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
canvas_qti_to_learnosity_converter-2.3.0 lib/canvas_qti_to_learnosity_converter/questions/file_upload.rb
canvas_qti_to_learnosity_converter-2.2.0 lib/canvas_qti_to_learnosity_converter/questions/file_upload.rb
canvas_qti_to_learnosity_converter-2.1.0 lib/canvas_qti_to_learnosity_converter/questions/file_upload.rb