Module: GuideContainer

Extended by:
ActiveSupport::Concern
Included in:
Complement, Exam, Lesson
Defined in:
app/models/concerns/guide_container.rb

Instance Method Summary collapse

Instance Method Details

#attempts_left_for(assignment) ⇒ Object

Tells the number of remaning attemps for a given assignment that belongs to this container, or ‘nil`, if this container does not impose any limit to the number of submissions



33
34
35
# File 'app/models/concerns/guide_container.rb', line 33

def attempts_left_for(assignment)
  nil
end

#friendlyObject



22
23
24
# File 'app/models/concerns/guide_container.rb', line 22

def friendly
  defaulting_name { "#{navigable_parent.friendly}: #{name}" }
end

#index_usage!(organization = Organization.current) ⇒ Object



18
19
20
# File 'app/models/concerns/guide_container.rb', line 18

def index_usage!(organization = Organization.current)
  organization.index_usage_of! guide, self
end

#limited_for?(exercise) ⇒ Boolean

Tells if this guide container imposes any kind of limit to the number of submission to its assignments, which may depend on the exercise’s type

Returns:

  • (Boolean)


40
41
42
# File 'app/models/concerns/guide_container.rb', line 40

def limited_for?(exercise)
  false
end

#resettable?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'app/models/concerns/guide_container.rb', line 51

def resettable?
  true
end

#start!(user) ⇒ Object



48
49
# File 'app/models/concerns/guide_container.rb', line 48

def start!(user)
end

#timed?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'app/models/concerns/guide_container.rb', line 44

def timed?
  false
end

#validate_accessible_for!(user) ⇒ Object



26
27
# File 'app/models/concerns/guide_container.rb', line 26

def validate_accessible_for!(user)
end