Skip to content

Commit

Permalink
Add explanatory comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex committed Nov 1, 2023
1 parent 94c82d8 commit 8bf88ad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/models/forms/export.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8bf88ad

Please sign in to comment.