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

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

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

<%block name="header_extras">
24
<link rel="stylesheet" type="text/css" href="${static.url('js/vendor/timepicker/jquery.timepicker.css')}" />
Muhammad Shoaib committed
25
% 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', 'verification-access-editor', 'timed-examination-preference-editor', 'settings-tab-section']:
26 27 28 29 30 31
<script type="text/template" id="${template_name}-tpl">
    <%static:include path="js/${template_name}.underscore" />
</script>
% endfor
</%block>

Mathew Peterson committed
32 33 34 35
<%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">
36
      <i class="feedback-symbol fa fa-bullhorn"></i>
Mathew Peterson committed
37 38

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

41
        <p>${_("No course content is currently visible, and no students 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
42 43 44 45 46
      </div>

      <ul class="nav-actions">
        <li class="action action-dismiss">
          <a href="#" class="button dismiss-button" data-dismiss-link='${notification_dismiss_url}'>
47
            <i class="icon fa fa-times-circle"></i>
48
            <span class="button-copy">${_("Dismiss")}</span>
Mathew Peterson committed
49 50 51 52 53 54
          </a>
        </li>
      </ul>
    </div>
  </div>
  %endif
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72

    %if deprecated_blocks_info.get('blocks') or deprecated_blocks_info.get('block_types_enabled'):
      <%
        platform_name = microsite.get_value('platform_name', settings.PLATFORM_NAME)
      %>
      <div class="wrapper wrapper-alert wrapper-alert-error is-shown">
        <div class="alert announcement">
          <i class="feedback-symbol fa fa-warning" aria-hidden="true"></i><span class="sr">${_("Warning")}</span>

          <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']:
73 74 75 76 77 78 79
                          <li class="nav-item">
                                % if component_display_name:
                                    <a href="${component_parent_url}">${_(component_display_name)}</a>
                                % else:
                                    <a href="${component_parent_url}">${_("Deprecated Component")}</a>
                                % endif
                          </li>
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
                      % endfor
                    </ul>
                  </nav>
              </div>
            %endif

            % if deprecated_blocks_info.get('block_types_enabled'):
              <div class="advance-modules-list">
                <p class="advance-modules-remove-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(
                    platform_name=platform_name,
                    link_start='<a href="{advance_settings_url}">'.format(advance_settings_url=deprecated_blocks_info['advance_settings_url']), link_end="</a>"
                  )}
                </p>
                <nav class="nav-related" aria-label="${_('Unsupported Advance Modules')}">
                  <ul>
                    % for block_type in deprecated_blocks_info['block_types']:
                      <li class="nav-item">${block_type}</li>
                    % endfor
                  </ul>
                </nav>
              </div>
            % endif
          </div>
        </div>
      </div>
    %endif

Mathew Peterson committed
108 109
</%block>

110 111 112 113 114 115 116 117
<%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>

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

<div class="wrapper-content wrapper">
    <section class="content">
        <article class="content-primary" role="main">
151 152 153 154 155 156 157 158
            <div class="course-status">
                <div class="status-release">
                    <h2 class="status-release-label">${_("Course Start Date:")}</h2>
                    <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")}">
159
                            <i class="icon fa fa-pencil"></i>
160 161 162 163 164
                            <span class="action-button-text sr">${_("Edit Start Date")}</span>
                        </a>
                      </li>
                    </ul>
                </div>
165 166 167 168 169 170 171 172 173 174
                % if SelfPacedConfiguration.current().enabled:
                    <div class="status-pacing">
                        <h2 class=status-pacing-label>${_("Course Pacing:")}</h2>
                        % if context_course.self_paced:
                            <p class="status-pacing-value">${_("Self-Paced")}</p>
                        % else:
                            <p class="status-pacing-value">${_("Instructor-Paced")}</p>
                        % endif
                    </div>
               % endif
175 176
            </div>

177 178 179 180
            <div class="wrapper-dnd">
                <%
                course_locator = context_course.location
                %>
181
                <h2 class="sr">${_("Course Outline")}</h2>
182
                <article class="outline outline-complex outline-course" data-locator="${course_locator | h}" data-course-key="${course_locator.course_key | h}">
183 184 185
                </article>
            </div>
            <div class="ui-loading">
Bertrand Marron committed
186
                <p><span class="spin"><i class="icon fa fa-refresh"></i></span> <span class="copy">${_("Loading")}</span></p>
187 188
            </div>
        </article>
189
        <aside class="content-supplementary" role="complementary">
190
            <div class="bit">
191 192 193 194 195 196 197 198 199 200
                <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>
                <h3 class="title-3">${_("Reorganizing your course")}</h3>
                <p>${_("Drag sections, subsections, and units to new locations in the outline.")}</p>
                <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>
                <h3 class="title-3">${_("Changing the content students see")}</h3>
                <p>${_("To publish draft content, select the Publish icon for a section, subsection, or unit.")}</p>
                <p>${_("To hide content from students, select the Configure icon for a section, subsection, or unit, then select {em_start}Hide from students{em_end}.").format(em_start='<strong>', em_end="</strong>")}</p>
201
            </div>
202 203 204
            <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 the course outline")}</a>
            </div>
205

206 207 208 209
        </aside>
    </section>
</div>
</%block>