Sha256: a0bfad394ed8d5680091a46797157a7ce052c9ea3a5c0ad9103096616a884e72

Contents?: true

Size: 901 Bytes

Versions: 36

Compression:

Stored size: 901 Bytes

Contents

require 'explicit_delegator'

class AssessmentFormPresenter < ExplicitDelegator
  enforce_definitions :description, # Short description of assessment
                      :course_path, # url to go to when assessment cancelled
                      :copyright,   # copyright notice for assessment
                      :submit_path, # path for assessment form to submit to
                      :questions    # set of questions in the assessment

  def title
    I18n.t('woople_theme.assessment.name')
  end

  def css_classes
    nil
  end

  def questions
    ThemePresentation.wrap_collection(assessment_result.questions, WoopleTheme::QuestionPresenter)
  end

  def render_result_status
    nil
  end

  def render_copyright
    yield if copyright.present?
  end

  def footer_partial
    'woople-theme/assessment_form_submission'
  end

  private

  def assessment_result
    @delegate
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
woople-theme-0.8.1 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.0 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.27 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.26 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.25 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.24 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.23 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.22 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.21 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.20 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.19 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.18 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.17 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.14 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.13 app/presenters/assessment_form_presenter.rb
woople-theme-0.6.12 app/presenters/assessment_form_presenter.rb