lib/modules/section_branch_methods.rb
def count_self_and_descendants_questions user, info_holder
        loop_sources_items = {}
        if self.looping?
          loop_items = self.loop_item_type.loop_items
          loop_items.each do |loop_item|
            if self.available_for? user, loop_item
              loop_sources_items[self.loop_source.id.to_s] = loop_item
              self.count_descendants_questions user, loop_item, loop_sources_items, info_holder
            end
          end
        else
          self.count_descendants_questions user, nil, loop_sources_items, info_holder
        end
      end
#count self and descendants questions that are available for a user
count self and descendants questions that are available for a user
count self and descendants questions that are available for a user
def count_self_and_descendants_questions user, info_holder
        loop_sources_items = {}
        if self.looping?
          loop_items = self.loop_item_type.loop_items
          loop_items.each do |loop_item|
            if self.available_for? user, loop_item
              loop_sources_items[self.loop_source.id.to_s] = loop_item
              self.count_descendants_questions user, loop_item, loop_sources_items, info_holder
            end
          end
        else
          self.count_descendants_questions user, nil, loop_sources_items, info_holder
        end
      end
def count_self_and_descendants_questions user , info_holder loop_sources_items = { } if self . looping? loop_items = self . loop_item_type . loop_items loop_items . each do | loop_item | if self . available_for? user , loop_item loop_sources_items [ self . loop_source . id . to_s ] = loop_item self . count_descendants_questions user , loop_item , loop_sources_items , info_holder end end else self . count_descendants_questions user , nil , loop_sources_items , info_holder end end
count self and descendants questions that are available for a user
count self and descendants questions that are available for a user
user
info_holder