export.html 7.74 KB
Newer Older
1
<%inherit file="base.html" />
2 3 4 5 6 7 8 9
<%def name="online_help_token()">
<% 
if library:
    return "export_library" 
else:
    return "export_course"
%>
</%def>
10 11
<%namespace name='static' file='static_content.html'/>

12 13 14 15
<%!
  from django.utils.translation import ugettext as _
  import json
%>
16 17 18 19 20 21 22
<%block name="title">
%if library:
    ${_("Library Export")}
%else:
    ${_("Course Export")}
%endif
</%block>
23
<%block name="bodyclass">is-signedin course tools view-export</%block>
24

25 26 27 28
<%block name="requirejs">
% if in_err:
  var hasUnit = ${json.dumps(bool(unit))},
      editUnitUrl = "${edit_unit_url or ""}",
29 30
      courselikeHomeUrl = "${courselike_home_url or ""}",
      is_library = ${json.dumps(library)}
31 32 33
      errMsg = ${json.dumps(raw_err_msg or "")};

  require(["js/factories/export"], function(ExportFactory) {
34
      ExportFactory(hasUnit, editUnitUrl, courselikeHomeUrl, is_library, errMsg);
35 36
  });
%endif
37 38
</%block>

39
<%block name="content">
40
<div class="wrapper-mast wrapper">
41
  <header class="mast has-subtitle">
Brian Talbot committed
42
    <h1 class="page-header">
David Baumgold committed
43
      <small class="subtitle">${_("Tools")}</small>
44 45 46 47 48 49
        <span class="sr">&gt; </span>
      %if library:
        ${_("Library Export")}
      %else:
        ${_("Course Export")}
      %endif
Brian Talbot committed
50
    </h1>
51 52 53
  </header>
</div>

54 55 56
<div class="wrapper-content wrapper">
  <section class="content">
    <article class="content-primary" role="main">
57

58
      <div class="introduction">
59 60 61 62 63 64
        %if library:
          <h2 class="title">${_("About Exporting Libraries")}</h2>
          <div class="copy">
              ## Translators: ".tar.gz" is a file extension, and should not be translated
              <p>${_("You can export libraries and edit them outside of {studio_name}. The exported file is a .tar.gz file (that is, a .tar file compressed with GNU Zip) that contains the library structure and content. You can also re-import libraries that you've exported.").format(
          studio_name=settings.STUDIO_SHORT_NAME,
65
          )}</p>
66 67 68 69 70 71 72 73 74 75 76
          </div>
        %else:
          <h2 class="title">${_("About Exporting Courses")}</h2>
          <div class="copy">
              ## Translators: ".tar.gz" is a file extension, and should not be translated
              <p>${_("You can export courses and edit them outside of {studio_name}. 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(
                studio_name=settings.STUDIO_SHORT_NAME
              )}</p>
              <p>${_("{em_start}Caution:{em_end} When you export a course, information such as MATLAB API keys, LTI passports, annotation secret token strings, and annotation storage URLs are included in the exported data. If you share your exported files, you may also be sharing sensitive or license-specific information.").format(em_start='<strong>', em_end="</strong>")}</p>
          </div>
        %endif
77 78
      </div>

79
      <div class="export-controls">
80 81 82 83 84 85
        <h2 class="title">
            %if library:
                ${_("Export My Library Content")}
            %else:
                ${_("Export My Course Content")}
            %endif</h2>
Brian Talbot committed
86

87 88 89
        <ul class="list-actions">
          <li class="item-action">
            <a class="action action-export action-primary" href="${export_url}">
90
              <i class="icon fa fa-arrow-circle-o-down"></i>
91 92 93 94 95 96
              <span class="copy">
                  %if library:
                      ${_("Export Library Content")}
                  %else:
                      ${_("Export Course Content")}
                  %endif</span>
97 98 99
            </a>
          </li>
        </ul>
100
      </div>
101
    %if not library:
102 103 104 105
      <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">
106
            <li class="item-detail">${_("Values from Advanced Settings, including MATLAB API keys and LTI passports")}</li>
107 108 109
            <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>
110
            <li class="item-detail">${_("Pages")}</li>
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
            <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>
126
    %endif
127
    </article>
128 129 130 131 132 133 134 135
  %if library:
    <aside class="content-supplementary" role="complementary">
      <div class="bit">
          <h3 class="title-3">${_("Why export a library?")}</h3>
          <p>${_("You may want to edit the XML in your library directly, outside of {studio_name}. You may want to create a backup copy of your library. Or, you may want to create a copy of your library that you can later import into another library instance and customize.").format(
          studio_name=settings.STUDIO_SHORT_NAME,
          )}</p>
      </div>
136

137 138 139 140 141 142 143 144 145 146
      <div class="bit">
          <h3 class="title-3">${_("Opening the downloaded file")}</h3>
          ## Translators: ".tar.gz" is a file extension, and should not be translated
          <p>${_("Use an archive program to extract the data from the .tar.gz file. Extracted data includes the library.xml file, as well as subfolders that contain library content.")}</p>
      </div>
      <div class="bit external-help">
          <a href="${get_online_help_info(online_help_token())['doc_url']}" target="_blank" class="button external-help-button">${_("Learn more about exporting a library")}</a>
      </div>
    </aside>
  %else:
147
    <aside class="content-supplementary" role="complementary">
148
      <div class="bit">
149
        <h3 class="title-3">${_("Why export a course?")}</h3>
150
        <p>${_("You may want to edit the XML in your course directly, outside of {studio_name}. 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.").format(
151
            studio_name=settings.STUDIO_SHORT_NAME,
152
          )}</p>
153 154 155
      </div>

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

158
        <p>${_("The course content and structure (including sections, subsections, and units) are exported. Values from Advanced Settings, including MATLAB API keys and LTI passports, are also exported. Other data, including student data, grading information, discussion forum data, course settings, and course team information, is not exported.")}</p>
159 160 161
      </div>

      <div class="bit">
162
        <h3 class="title-3">${_("Opening the downloaded file")}</h3>
163
        ## Translators: ".tar.gz" is a file extension, and should not be translated
164
        <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>
165
      </div>
166 167 168
      <div class="bit external-help">
          <a href="${get_online_help_info(online_help_token())['doc_url']}" target="_blank" class="button external-help-button">${_("Learn more about exporting a course")}</a>
      </div>
169
    </aside>
170
  %endif
171
  </section>
172 173
</div>
</%block>