course_outline.html 12.4 KB
Newer Older
1
<%page expression_filter="h"/>
2
<%inherit file="base.html" />
3
<%def name="online_help_token()"><% return "develop_course" %></%def>
4 5 6 7
<%!
import logging
from util.date_utils import get_default_time_display
from django.utils.translation import ugettext as _
8
from openedx.core.djangolib.js_utils import dump_js_escaped_json
9
from contentstore.utils import reverse_usage_url
10
from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration
11
from openedx.core.djangolib.markup import HTML, Text
12 13 14 15 16 17
%>
<%block name="title">${_("Course Outline")}</%block>
<%block name="bodyclass">is-signedin course view-outline</%block>

<%namespace name='static' file='static_content.html'/>

18 19
<%block name="requirejs">
    require(["js/factories/outline"], function (OutlineFactory) {
20 21 22 23
        OutlineFactory(
            ${course_structure | n, dump_js_escaped_json},
            ${initial_state | n, dump_js_escaped_json}
        );
24
    });
25 26 27
</%block>

<%block name="header_extras">
28
<link rel="stylesheet" type="text/css" href="${static.url('js/vendor/timepicker/jquery.timepicker.css')}" />
29
% for template_name in ['course-outline', 'xblock-string-field-editor', 'basic-modal', 'modal-button', 'course-outline-modal', 'due-date-editor', 'release-date-editor', 'grading-editor', 'publish-editor', 'staff-lock-editor', 'unit-access-editor', 'content-visibility-editor', 'verification-access-editor', 'timed-examination-preference-editor', 'access-editor', 'settings-modal-tabs', 'show-correctness-editor', 'highlights-editor', 'highlights-enable-editor', 'course-highlights-enable']:
30 31 32 33 34 35
<script type="text/template" id="${template_name}-tpl">
    <%static:include path="js/${template_name}.underscore" />
</script>
% endfor
</%block>

Mathew Peterson committed
36 37 38 39
<%block name="page_alert">
  %if notification_dismiss_url is not None:
  <div class="wrapper wrapper-alert wrapper-alert-announcement is-shown">
    <div class="alert announcement has-actions">
40
      <span class="feedback-symbol fa fa-bullhorn" aria-hidden="true"></span>
Mathew Peterson committed
41 42

      <div class="copy">
43
        <h2 class="title title-3">${_("This course was created as a re-run. Some manual configuration is needed.")}</h2>
Mathew Peterson committed
44

45
        <p>${_("No course content is currently visible, and no learners are enrolled. Be sure to review and reset all dates, including the Course Start Date; set up the course team; review course updates and other assets for dated material; and seed the discussions and wiki.")}</p>
Mathew Peterson committed
46 47 48 49 50
      </div>

      <ul class="nav-actions">
        <li class="action action-dismiss">
          <a href="#" class="button dismiss-button" data-dismiss-link='${notification_dismiss_url}'>
51
            <span class="icon fa fa-times-circle" aria-hidden="true"></span>
52
            <span class="button-copy">${_("Dismiss")}</span>
Mathew Peterson committed
53 54 55 56 57 58
          </a>
        </li>
      </ul>
    </div>
  </div>
  %endif
59

60
    %if deprecated_blocks_info.get('blocks') or deprecated_blocks_info.get('deprecated_enabled_block_types'):
61 62
      <div class="wrapper wrapper-alert wrapper-alert-error is-shown">
        <div class="alert announcement">
63
          <span class="feedback-symbol fa fa-warning" aria-hidden="true"></span><span class="sr">${_("Warning")}</span>
64 65 66 67 68 69 70 71 72 73

          <div class="copy">
            <h2 class="title title-3 warning-heading-text">${_("This course uses features that are no longer supported.")}</h2>

            %if deprecated_blocks_info.get('blocks'):
              <div class="components-list">
                <p class="components-list-heading-text">${_("You must delete or replace the following components.")}</p>
                  <nav class="nav-related" aria-label="${_('Unsupported Components')}">
                    <ul>
                      % for component_parent_url, component_display_name in deprecated_blocks_info['blocks']:
74 75
                          <li class="nav-item">
                                % if component_display_name:
76
                                    <a href="${component_parent_url}">${component_display_name}</a>
77 78 79 80
                                % else:
                                    <a href="${component_parent_url}">${_("Deprecated Component")}</a>
                                % endif
                          </li>
81 82 83 84 85 86
                      % endfor
                    </ul>
                  </nav>
              </div>
            %endif

87
            % if deprecated_blocks_info.get('deprecated_enabled_block_types'):
88 89
              <div class="advance-modules-list">
                <p class="advance-modules-remove-text">
90
                  ${Text(_("To avoid errors, {platform_name} strongly recommends that you remove unsupported features from the course advanced settings. To do this, go to the {link_start}Advanced Settings page{link_end}, locate the \"Advanced Module List\" setting, and then delete the following modules from the list.")).format(
91
                    platform_name=static.get_platform_name(),
92 93
                    link_start=HTML('<a href="{advance_settings_url}">').format(advance_settings_url=deprecated_blocks_info['advance_settings_url']),
                    link_end=HTML("</a>")
94 95 96 97
                  )}
                </p>
                <nav class="nav-related" aria-label="${_('Unsupported Advance Modules')}">
                  <ul>
98
                    % for block_type in deprecated_blocks_info['deprecated_enabled_block_types']:
99 100 101 102 103 104 105 106 107 108 109
                      <li class="nav-item">${block_type}</li>
                    % endfor
                  </ul>
                </nav>
              </div>
            % endif
          </div>
        </div>
      </div>
    %endif

Mathew Peterson committed
110 111
</%block>

112 113 114 115 116 117 118 119
<%block name="content">
<div class="wrapper-mast wrapper">
    <header class="mast has-actions has-subtitle">
        <h1 class="page-header">
            <small class="subtitle">${_("Content")}</small>
            <span class="sr">&gt; </span>${_("Course Outline")}
        </h1>

120
        <nav class="nav-actions" aria-label="${_('Page Actions')}">
121 122 123
            <h3 class="sr">${_("Page Actions")}</h3>
            <ul>
                <li class="nav-item">
124
                    <a href="#" class="button button-new" data-category="chapter" data-parent="${context_course.location}" data-default-name="${_('Section')}" title="${_('Click to add a new section')}">
125
                        <span class="icon fa fa-plus" aria-hidden="true"></span>${_('New Section')}
126 127
                    </a>
                </li>
128
                %if reindex_link:
129
                    <li class="nav-item">
130
                        <a href="${reindex_link}" class="button button-reindex" data-category="reindex" title="${_('Reindex current course')}">
131
                            <span class="icon-arrow-right" aria-hidden="true"></span>${_('Reindex')}
132 133 134
                        </a>
                    </li>
                %endif
135
                <li class="nav-item">
136
                    <a href="#" class="button button-toggle button-toggle-expand-collapse collapse-all is-hidden">
137 138
                        <span class="collapse-all"><span class="icon fa fa-arrow-up" aria-hidden="true"></span> <span class="label">${_("Collapse All Sections")}</span></span>
                        <span class="expand-all"><span class="icon fa fa-arrow-down" aria-hidden="true"></span> <span class="label">${_("Expand All Sections")}</span></span>
139 140 141
                    </a>
                </li>
                <li class="nav-item">
142 143
                    <a href="${lms_link}" rel="external" class="button view-button view-live-button"
                       title="${_('Click to open the courseware in the LMS in a new tab')}">${_("View Live")}</a>
144 145 146 147 148 149 150 151 152
                </li>
            </ul>
        </nav>
    </header>
</div>

<div class="wrapper-content wrapper">
    <section class="content">
        <article class="content-primary" role="main">
153 154
            <div class="course-status">
                <div class="status-release">
155 156
                    <h2 class="status-release-label">${_("Course Start Date")}</h2>
                    <br>
157 158 159 160 161
                    <p class="status-release-value">${course_release_date}</p>

                    <ul class="status-actions">
                      <li class="action-item action-edit">
                        <a href="${settings_url}" class="edit-button action-button" data-tooltip="${_("Edit Start Date")}">
162
                            <span class="icon fa fa-pencil" aria-hidden="true"></span>
163 164 165 166 167
                            <span class="action-button-text sr">${_("Edit Start Date")}</span>
                        </a>
                      </li>
                    </ul>
                </div>
168 169
                % if SelfPacedConfiguration.current().enabled:
                    <div class="status-pacing">
170 171
                        <h2 class=status-pacing-label>${_("Course Pacing")}</h2>
                        <br>
172 173 174 175 176 177
                        % if context_course.self_paced:
                            <p class="status-pacing-value">${_("Self-Paced")}</p>
                        % else:
                            <p class="status-pacing-value">${_("Instructor-Paced")}</p>
                        % endif
                    </div>
178 179
                % endif
                <div class="status-highlights-enabled"></div>
180
            </div>
181 182 183 184 185
            <div class="wrapper-dnd"
              % if getattr(context_course, 'language'):
                lang="${context_course.language}"
              % endif
            >
186 187 188
                <%
                course_locator = context_course.location
                %>
189
                <h2 class="sr">${_("Course Outline")}</h2>
190
                <article class="outline outline-complex outline-course" data-locator="${course_locator}" data-course-key="${course_locator.course_key}">
191 192 193
                </article>
            </div>
            <div class="ui-loading">
194
                <p><span class="spin"><span class="icon fa fa-refresh" aria-hidden="true"></span></span> <span class="copy">${_("Loading")}</span></p>
195 196
            </div>
        </article>
197
        <aside class="content-supplementary" role="complementary">
198
            <div class="bit">
199 200 201
                <h3 class="title-3">${_("Creating your course organization")}</h3>
                <p>${_("You add sections, subsections, and units directly in the outline.")}</p>
                <p>${_("Create a section, then add subsections and units. Open a unit to add course components.")}</p>
202 203
            </div>
            <div class="bit">
204 205
                <h3 class="title-3">${_("Reorganizing your course")}</h3>
                <p>${_("Drag sections, subsections, and units to new locations in the outline.")}</p>
206 207 208 209 210
                <div class="external-help">
                    <a href="${get_online_help_info('outline')['doc_url']}" target="_blank" class="button external-help-button">${_("Learn more about the course outline")}</a>
                </div>
            </div>
            <div class="bit">
211 212
                <h3 class="title-3">${_("Setting release dates and grading policies")}</h3>
                <p>${_("Select the Configure icon for a section or subsection to set its release date. When you configure a subsection, you can also set the grading policy and due date.")}</p>
213 214 215
                <div class="external-help">
                    <a href="${get_online_help_info('grading')['doc_url']}" target="_blank" class="button external-help-button">${_("Learn more about grading policy settings")}</a>
                </div>
216
            </div>
217 218 219 220 221 222 223 224
            <div class="bit">
                <h3 class="title-3">${_("Changing the content learners see")}</h3>
                <p>${_("To publish draft content, select the Publish icon for a section, subsection, or unit.")}</p>
                <p>${Text(_("To make a section, subsection, or unit unavailable to learners, select the Configure icon for that level, then select the appropriate {em_start}Hide{em_end} option. Grades for hidden sections, subsections, and units are not included in grade calculations.")).format(em_start=HTML("<strong>"), em_end=HTML("</strong>"))}</p>
                <p>${Text(_("To hide the content of a subsection from learners after the subsection due date has passed, select the Configure icon for a subsection, then select {em_start}Hide content after due date{em_end}. Grades for the subsection remain included in grade calculations.")).format(em_start=HTML("<strong>"), em_end=HTML("</strong>"))}</p>
                <div class="external-help">
                    <a href="${get_online_help_info('visibility')['doc_url']}" target="_blank" class="button external-help-button">${_("Learn more about content visibility settings")}</a>
                </div>
225
            </div>
226

227 228 229 230
        </aside>
    </section>
</div>
</%block>