education/classroom

View on GitHub
app/views/orgs/rosters/import_from_lms.js.erb

Summary

Maintainability
Test Coverage
<% lms_name = local_assigns.fetch(:lms_name, "your learning management system") %>

(function() {
  <% if flash[:alert] %>
    $('#flash-messages').html("<%= j render 'shared/flash_messages' %>");
  <% else %>
  $('[data-remodal-id=select-identifier-modal]').replaceWith(
    "<%= j render partial: 'orgs/rosters/select_identifier_modal', locals: {
      roster: current_roster,
      organization: current_organization,
      lms_name: lms_name,
      identifiers: @identifiers
    } %>"
  )

  var inst = $('[data-remodal-id=select-identifier-modal]').remodal();
  inst.open();
  <% end %>
})();