Module: GuideContainer

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

Instance Method Summary collapse

Methods included from Container

#progress_for

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



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

def attempts_left_for(assignment)
  nil
end

#friendlyObject



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

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

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



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

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)


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

def limited_for?(_exercise)
  false
end

#resettable?Boolean

Returns:

  • (Boolean)


58
59
60
# File 'app/models/concerns/guide_container.rb', line 58

def resettable?
  true
end

#results_hidden_for?(_exercise) ⇒ Boolean

Tells if this guide container hides the results for students

Returns:

  • (Boolean)


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

def results_hidden_for?(_exercise)
  false
end

#start!(user) ⇒ Object



55
56
# File 'app/models/concerns/guide_container.rb', line 55

def start!(user)
end

#timed?Boolean

Returns:

  • (Boolean)


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

def timed?
  false
end

#validate_accessible_for!(user) ⇒ Object



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

def validate_accessible_for!(user)
end