export.html 6.45 KB
Newer Older
1 2 3
<%inherit file="base.html" />
<%namespace name='static' file='static_content.html'/>

4 5 6 7 8
<%!
  from django.core.urlresolvers import reverse
  from django.utils.translation import ugettext as _
  import json
%>
David Baumgold committed
9
<%block name="title">${_("Course Export")}</%block>
10
<%block name="bodyclass">is-signedin course tools view-export</%block>
11

12
<%block name="jsextra">
13
  % if in_err:
14
  <script type='text/javascript'>
15 16 17
var hasUnit = ${json.dumps(bool(unit))},
    editUnitUrl = "${edit_unit_url or ""}",
    courseHomeUrl = "${course_home_url or ""}",
18
    errMsg = ${json.dumps(raw_err_msg or "")};
19

20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
require(["domReady!", "gettext", "js/views/feedback_prompt"], function(doc, gettext, PromptView) {
  var dialog;
  if(hasUnit) {
    dialog = new PromptView({
      title: gettext('There has been an error while exporting.'),
      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('Correct failed component'),
          click: function(view) {
            view.hide();
            document.location = editUnitUrl;
          }
        },
        secondary: {
          text: gettext('Return to Export'),
          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>" + errMsg;
    dialog = new PromptView({
      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 = courseHomeUrl;
          }
        },
        secondary: {
          text: gettext('Cancel'),
          click: function(view) {
            view.hide();
          }
        }
      }
    });
  }
cahrens committed
66 67 68 69 70 71

  // The CSS animation for the dialog relies on the 'js' class
  // being on the body. This happens after this JavaScript is executed,
  // causing a "bouncing" of the dialog after it is initially shown.
  // As a workaround, add this class first.
  $('body').addClass('js');
72
  dialog.show();
cahrens committed
73

74
});
75 76 77 78
  </script>
  %endif
</%block>

79
<%block name="content">
80
<div class="wrapper-mast wrapper">
81
  <header class="mast has-subtitle">
Brian Talbot committed
82
    <h1 class="page-header">
David Baumgold committed
83 84
      <small class="subtitle">${_("Tools")}</small>
      <span class="sr">&gt; </span>${_("Course Export")}
Brian Talbot committed
85
    </h1>
86 87 88
  </header>
</div>

89 90 91
<div class="wrapper-content wrapper">
  <section class="content">
    <article class="content-primary" role="main">
92

93 94 95 96
      <div class="introduction">
        <h2 class="title">${_("About Exporting Courses")}</h2>
        <div class="copy">
          ## Translators: ".tar.gz" is a file extension, and should not be translated
97

98
          <p>${_("You can export courses and edit them outside of Studio. The exported file is a .tar.gz file (that is, a .tar file compressed with GNU Zip) that contains the course structure and content. You can also re-import courses that you've exported.").format(em_start='<strong>', em_end="</strong>")}</p>
99
        </div>
100 101
      </div>

102
      <div class="export-controls">
103
        <h2 class="title">${_("Export My Course Content")}</h2>
Brian Talbot committed
104

105 106 107 108 109 110 111 112
        <ul class="list-actions">
          <li class="item-action">
            <a class="action action-export action-primary" href="${export_url}">
              <i class="icon-download"></i>
              <span class="copy">${_("Export Course Content")}</span>
            </a>
          </li>
        </ul>
113 114
      </div>

115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
      <div class="export-contents">
        <div class="export-includes">
          <h3 class="title-3">${_("Data {em_start}exported with{em_end} your course:").format(em_start='<strong>', em_end="</strong>")}</h3>
          <ul class="list-details list-export-includes">
            <li class="item-detail">${_("Course Content (all Sections, Sub-sections, and Units)")}</li>
            <li class="item-detail">${_("Course Structure")}</li>
            <li class="item-detail">${_("Individual Problems")}</li>
            <li class="item-detail">${_("Static Pages")}</li>
            <li class="item-detail">${_("Course Assets")}</li>
            <li class="item-detail">${_("Course Settings")}</li>
          </ul>
        </div>

        <div class="export-excludes">
          <h3 class="title-3">${_("Data {em_start}not exported{em_end} with your course:").format(em_start='<strong>', em_end="</strong>")}</h3>
          <ul class="list-details list-export-excludes">
            <li class="item-detail">${_("User Data")}</li>
            <li class="item-detail">${_("Course Team Data")}</li>
            <li class="item-detail">${_("Forum/discussion Data")}</li>
            <li class="item-detail">${_("Certificates")}</li>
          </ul>
        </div>
      </div>
138
    </article>
139 140 141

    <aside class="content-supplementary" role="complimentary">
      <div class="bit">
142 143
        <h3 class="title-3">${_("Why export a course?")}</h3>
        <p>${_("You may want to edit the XML in your course directly, outside of Studio. You may want to create a backup copy of your course. Or, you may want to create a copy of your course that you can later import into another course instance and customize.")}</p>
144 145 146
      </div>

      <div class="bit">
147
        <h3 class="title-3">${_("What content is exported?")}</h3>
148

149
        <p>${_("Only the course content and structure (including sections, subsections, and units) are exported. Other data, including student data, grading information, discussion forum data, course settings, and course team information, is not exported.")}</p>
150 151 152
      </div>

      <div class="bit">
153
        <h3 class="title-3">${_("Opening the downloaded file")}</h3>
154
        ## Translators: ".tar.gz" is a file extension, and should not be translated
155
        <p>${_("Use an archive program to extract the data from the .tar.gz file. Extracted data includes the course.xml file, as well as subfolders that contain course content.")}</p>
156 157 158
      </div>
    </aside>
  </section>
159 160
</div>
</%block>