<commit_before><%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" />
<%namespace name='static' file='static_content.html'/>

<%! from django.core.urlresolvers import reverse %>
<%block name="title">${_("Course Export")}</%block>
<%block name="bodyclass">is-signedin course tools export</%block>

<%block name="jsextra">
  % if in_err:
  <script type='text/javascript'>
    $(document).ready(function() {

      %if unit:
        dialog = new CMS.Views.Prompt({
            title: gettext('There has been an error with your export.'),
            message: gettext("There has been a failure to export to XML at least one component. It is recommended that you go to the edit page and repair the error before attempting another export. Please check that all components on the page are valid and do not display any error messages."),
            intent: "error",
            actions: {
                primary: {
                    text: gettext('Yes, allow me to fix the failed component'),
                    click: function(view) {
                        view.hide();
                        document.location = "${edit_unit_url}"
                    }
                },
                secondary: {
                    text: gettext('cancel'),
                    click: function(view) {
                        view.hide();
                    }
                }
            }
        });
      % else:
        var msg = gettext("<p>There has been a failure to export your course to XML. Unfortunately, we do not have specific enough information to assist you in identifying the failed component. It is recommended that you inspect your courseware to identify any components in error and try again.</p><p>The raw error message is:</p>");
        msg = msg + "${raw_err_msg}";
        dialog = new CMS.Views.Prompt({
            title: gettext('There has been an error with your export.'),
            message: msg,
            intent: "error",
            actions: {
                primary: {
                    text: gettext('Yes, take me to the main course page'),
                    click: function(view) {
                        view.hide();
                        document.location = "${course_home_url}"
                    }
                },
                secondary: {
                    text: gettext('cancel'),
                    click: function(view) {
                        view.hide();
                    }
                }
            }
        });     
      %endif
      dialog.show();
    })
  </script>
  %endif
</%block><commit_msg>implement PR feedback<commit_after><%! from django.utils.translation import ugettext as _ %>
<%inherit file="base.html" />
<%namespace name='static' file='static_content.html'/>

<%! from django.core.urlresolvers import reverse %>
<%block name="title">${_("Course Export")}</%block>
<%block name="bodyclass">is-signedin course tools export</%block>

<%block name="jsextra">
  % if in_err:
  <script type='text/javascript'>
    $(document).ready(function() {

      %if unit:
        var dialog = new CMS.Views.Prompt({
            title: gettext('There has been an error with your export.'),
            message: gettext("There has been a failure to export to XML at least one component. It is recommended that you go to the edit page and repair the error before attempting another export. Please check that all components on the page are valid and do not display any error messages."),
            intent: "error",
            actions: {
                primary: {
                    text: gettext('Yes, allow me to fix the failed component'),
                    click: function(view) {
                        view.hide();
                        document.location = "${edit_unit_url}"
                    }
                },
                secondary: {
                    text: gettext('Cancel'),
                    click: function(view) {
                        view.hide();
                    }
                }
            }
        });
      % else:
        var msg = "<p>" + gettext("There has been a failure to export your course to XML. Unfortunately, we do not have specific enough information to assist you in identifying the failed component. It is recommended that you inspect your courseware to identify any components in error and try again.") + "</p><p>" + gettext("The raw error message is:") + "</p>";
        msg = msg + "${raw_err_msg}";
        var dialog = new CMS.Views.Prompt({
            title: gettext('There has been an error with your export.'),
            message: msg,
            intent: "error",
            actions: {
                primary: {
                    text: gettext('Yes, take me to the main course page'),
                    click: function(view) {
                        view.hide();
                        document.location = "${course_home_url}"
                    }
                },
                secondary: {
                    text: gettext('Cancel'),
                    click: function(view) {
                        view.hide();
                    }
                }
            }
        });     
      %endif
      dialog.show();
    })
  </script>
  %endif
</%block>
{'fraction_non_alphanumeric': 0.10889015800494956, 'fraction_numerical': 0.0, 'mean_word_length': 1.5717082721488007, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '781301', 'n_tokens_mistral': 1302, 'n_tokens_neox': 1225, 'n_words': 435}