"
data-workflow-state="<%= context_module ? context_module.workflow_state : "{{ workflow_state }}"%>"
data-module-url="<%= context_url(@context, :context_url) %>/modules/<%= context_module ? context_module.id : "{{ id }}" %>"
data-module-id="<%= context_module ? context_module.id : "{{ id }}" %>"
id="context_module_<%= context_module ? context_module.id : "blank" %>"
style="<%= hidden unless context_module %>"
>
<% if context_module && module_data[:items] %>
<% module_data[:items].each do |item| %>
<%
item_data = module_data[:items_data][item.id]
locals = {
item_restrictions: module_data.dig(:items_restrictions, item.id),
completion_criteria: context_module.completion_requirements,
item_data: item_data,
viewable: @can_view,
}
%>
<%= render :partial => 'context_modules/module_item_next', :object => item, :as => :module_item, :locals => locals %>
<% if item_data[:show_cyoe_placeholder] %>
<%= render :partial => 'context_modules/module_item_conditional_next', :object => item, :as => :module_item, :locals => locals %>
<% end %>
<% end %>
<% end %>
<% if !context_module || @can_view && module_data[:items]&.empty? %>
<% end %>