From 8bf88adc4682d29b6b39d3c0334f8c0b97b071ec Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 1 Nov 2023 12:26:03 -0400 Subject: [PATCH] Add explanatory comment --- app/models/forms/export.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/models/forms/export.rb b/app/models/forms/export.rb index d8375294b2..dd2cc91494 100644 --- a/app/models/forms/export.rb +++ b/app/models/forms/export.rb @@ -128,11 +128,14 @@ def to_xls os_already_logged = option_sets_used.include?(q.option_set_id) # log the option set to the spreadsheet if we haven't yet + # ni = index for the option nodes loop + # node = the current option node + # TODO: support option set "levels" by creating a cascading sheet here unless os_already_logged - os.option_nodes.each_with_index do |node, x| + os.option_nodes.each_with_index do |node, ni| if node.option.present? choices - .row(x + choices_index_mod) + .row(ni + choices_index_mod) .push(os.name, node.option.canonical_name, node.option.canonical_name) end end