Sha256: 0d3193ccf595770353c3c390744f891f09527c44778d4355d1412965f2048959

Contents?: true

Size: 415 Bytes

Versions: 7

Compression:

Stored size: 415 Bytes

Contents

# frozen_string_literal: true

module DocumentExporter
  module PDF
    class TeacherMaterial < PDF::Base
      def export
        content = super
        pdf = CombinePDF.parse(content)

        scope = @document.teacher_materials.where(id: included_materials)
        material_ids = ordered_materials scope.pluck(:id)
        pdf = combine_pdf_for pdf, material_ids
        pdf.to_pdf
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lcms-engine-0.3.1 lib/document_exporter/pdf/teacher_material.rb
lcms-engine-0.1.4 lib/document_exporter/pdf/teacher_material.rb
lcms-engine-0.3.0 lib/document_exporter/pdf/teacher_material.rb
lcms-engine-0.1.3 lib/document_exporter/pdf/teacher_material.rb
lcms-engine-0.2.0 lib/document_exporter/pdf/teacher_material.rb
lcms-engine-0.1.2 lib/document_exporter/pdf/teacher_material.rb
lcms-engine-0.1.0 lib/document_exporter/pdf/teacher_material.rb