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.10.0 app/presenters/assessment_form_presenter.rb
woople-theme-0.9.0 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.19 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.18 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.17 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.16 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.15 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.14 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.13 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.12 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.11 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.10 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.9 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.8 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.7 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.6 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.5 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.4 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.3 app/presenters/assessment_form_presenter.rb
woople-theme-0.8.2 app/presenters/assessment_form_presenter.rb