app/models/teachable_parser.rb
# returns all courses, lectures and lessons that are associated
# to the given list of teachables
# depending on the teachable_inheritance parameter, this is done with or
# without inheritance (without inheritance just meaning that the input
# array of teachable_ids is returned)
# if the all_teachable flag is set to '1', it returns []
# results are returned in the form of strings:
# e.g. as ['Course-5', 'Lecture-2', 'Lesson-39']
returns all courses, lectures and lessons that are associated
to the given list of teachables
depending on the teachable_inheritance parameter, this is done with or
without inheritance (without inheritance just meaning that the input
array of teachable_ids is returned)
if the all_teachable flag is set to '1', it returns []
results are returned in the form of strings:
e.g.
returns all courses lectures and lessons that are associated to the given list of teachables depending on the teachable_inheritance parameter this is done with or without inheritance ( without inheritance just meaning that the input array of teachable_ids is returned ) if the all_teachable flag is set to ' 1 ' it returns [] results are returned in the form of strings : e . g .
def teachables_as_strings
    return [] if @all_teachables
    return @teachable_ids unless @inheritance
    teachables_with_inheritance.map { |t| "#{t.class}-#{t.id}" }
  end
def teachables_as_strings return [ ] if @all_teachables return @teachable_ids unless @inheritance teachables_with_inheritance . map { | t | "#{t.class}-#{t.id}" } end
returns all courses, lectures and lessons that are associated
to the given list of teachables
depending on the teachable_inheritance parameter, this is done with or
without inheritance (without inheritance just meaning that the input
array of teachable_ids is returned)
if the all_teachable flag is set to '1', it returns []
results are returned in the form of strings:
e.g.
returns all courses lectures and lessons that are associated to the given list of teachables depending on the teachable_inheritance parameter this is done with or without inheritance ( without inheritance just meaning that the input array of teachable_ids is returned ) if the all_teachable flag is set to ' 1 ' it returns [] results are returned in the form of strings : e . g .