Sha256: 1a4c2c4f2ecf92597a35d61439fa026f3fa1c7005cc73790ad4ba53952d2379c

Contents?: true

Size: 525 Bytes

Versions: 13

Compression:

Stored size: 525 Bytes

Contents

module ACTV
  class Quiz < Asset
    include Authorable

    def self.valid? response
      ACTV::QuizValidator.new(response).valid?
    end

    def questions
      @questions ||= child_assets_filtered_by_category 'question'
    end

    def outcomes
      @outcomes ||= child_assets_filtered_by_category 'outcome'
    end

    def find_outcome_by_id guid
      outcomes.find do |outcome|
        outcome.assetGuid == guid
      end
    end

    def thumbnail
      @thumbnail ||= image_by_name 'desktop'
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
actv-2.10.9 lib/actv/quiz.rb
actv-2.10.8 lib/actv/quiz.rb
actv-2.10.7 lib/actv/quiz.rb
actv-2.10.6 lib/actv/quiz.rb
actv-2.10.5 lib/actv/quiz.rb
actv-2.10.4 lib/actv/quiz.rb
actv-2.10.3 lib/actv/quiz.rb
actv-2.10.2 lib/actv/quiz.rb
actv-2.10.1 lib/actv/quiz.rb
actv-2.10.0 lib/actv/quiz.rb
actv-2.9.2 lib/actv/quiz.rb
actv-2.9.1 lib/actv/quiz.rb
actv-2.9.0 lib/actv/quiz.rb