Files
edx-platform/cms/templates/settings_advanced.html
Braden MacDonald 9b9b88df52 chore: remove some usages of six (Python2 compat) (#32554)
* get rid of six.text_type(s)
* get rid of six.b()
* get rid of six.string_types
* get rid of six.PY2/six.PY3
* get rid of six.iteritems() and six.viewvalues()
2023-07-17 12:18:43 -07:00

161 lines
6.7 KiB
HTML

<%page expression_filter="h"/>
<%inherit file="base.html" />
<%def name="online_help_token()"><% return "advanced" %></%def>
<%namespace name='static' file='static_content.html'/>
<%!
from six.moves.urllib.parse import quote
from django.utils.translation import gettext as _
from cms.djangoapps.contentstore import utils
from openedx.core.djangolib.js_utils import (
dump_js_escaped_json, js_escaped_string
)
from openedx.core.djangolib.markup import HTML, Text
%>
<%block name="title">${_("Advanced Settings")}</%block>
<%block name="bodyclass">is-signedin course advanced view-settings</%block>
<%block name="header_extras">
% for template_name in ["advanced_entry", "basic-modal", "modal-button", "validation-error-modal"]:
<script type="text/template" id="${template_name}-tpl">
<%static:include path="js/${template_name}.underscore" />
</script>
% endfor
</%block>
<%block name="requirejs">
require(["js/factories/settings_advanced"], function(SettingsAdvancedFactory) {
SettingsAdvancedFactory(
${advanced_dict | n, dump_js_escaped_json},
"${advanced_settings_url | n, js_escaped_string}",
${publisher_enabled | n, dump_js_escaped_json}
);
});
</%block>
<%block name="page_alert">
%if proctoring_errors:
<div class="wrapper wrapper-alert wrapper-alert-error is-shown">
<div class="alert announcement has-actions">
<span class="feedback-symbol fa fa-warning" aria-hidden="true"></span>
<div class="exam-settings-alert copy">
<h2 class="title title-3">${_("This course has proctored exam settings that are incomplete or invalid.")}</h2>
<p>
% if mfe_proctored_exam_settings_url:
<% url_encoded_course_id = quote(str(context_course.id).encode('utf-8'), safe='') %>
${Text(_("You will be unable to make changes until the errors are resolved. To update these settings go to the {link_start}Proctored Exam Settings page{link_end}.")).format(
link_start=HTML('<a href="{mfe_proctored_exam_settings_url}">').format(
mfe_proctored_exam_settings_url=mfe_proctored_exam_settings_url
),
link_end=HTML("</a>")
)}
% else:
${_("You will be unable to make changes until the following settings are updated on the page below.")}
% endif
</p>
<div class="errors-list">
<nav class="nav-related" aria-label="${_('Proctoring Settings Errors')}">
<ul>
% for error in proctoring_errors:
<li class="nav-item">
<h3 class="title title-4">${error.get('model', {}).get('display_name')}</h3>
<p>${error.get('message')}</p>
</li>
% endfor
</ul>
</nav>
</div>
</div>
</div>
</div>
%endif
</%block>
<%block name="content">
<div class="wrapper-mast wrapper">
<header class="mast has-subtitle">
<h1 class="page-header">
<small class="subtitle">${_("Settings")}</small>
<span class="sr">&gt; </span>${_("Advanced Settings")}
</h1>
</header>
</div>
<div class="wrapper-content wrapper">
<section class="content">
<article class="content-primary" role="main">
<form id="settings_advanced" class="settings-advanced" method="post" action="">
<div class="message message-status confirm">
${_("Your policy changes have been saved.")}
</div>
<div class="message message-status error">
${_("There was an error saving your information. Please see below.")}
</div>
<section class="group-settings advanced-policies">
<header>
<h2 class="title-2">${_("Manual Policy Definition")}</h2>
</header>
<p class="instructions">${Text(_("{strong_start}Warning{strong_end}: Do not modify these policies unless you are familiar with their purpose.")).format(
strong_start=HTML('<strong>'),
strong_end=HTML('</strong>')
)}</p>
<div class="wrapper-options">
<div class="wrapper-deprecated-setting">
<input id="deprecated-settings" class="deprecated-settings-toggle" type="checkbox" name="Show Deprecated">
<label for="deprecated-settings" class="deprecated-settings-label">${_("Show Deprecated Settings")}</label>
</div>
</div>
<ul class="list-input course-advanced-policy-list enum">
</ul>
</section>
</form>
</article>
<aside class="content-supplementary" role="complementary">
<div class="bit">
<h3 class="title-3">${_("What do advanced settings do?")}</h3>
<p>${_("Advanced settings control specific course functionality. On this page, you can edit manual policies, which are JSON-based key and value pairs that control specific course settings.")}</p>
<p>${_("Any policies you modify here override all other information you've defined elsewhere in {studio_name}. Do not edit policies unless you are familiar with both their purpose and syntax.").format(studio_name=settings.STUDIO_SHORT_NAME)}</p>
<p>${Text(_('{em_start}Note:{em_end} When you enter strings as policy values, ensure that you use double quotation marks (\") around the string. Do not use single quotation marks (\').')).format(
em_start=HTML('<strong>'),
em_end=HTML('</strong>')
)}</p>
</div>
<div class="bit">
% if context_course:
<%
url_encoded_course_id = quote(str(context_course.id).encode('utf-8'), safe='')
details_url = utils.reverse_course_url('settings_handler', context_course.id)
grading_url = utils.reverse_course_url('grading_handler', context_course.id)
course_team_url = utils.reverse_course_url('course_team_handler', context_course.id)
%>
<h3 class="title-3">${_("Other Course Settings")}</h3>
<nav class="nav-related" aria-label="${_('Other Course Settings')}">
<ul>
<li class="nav-item"><a href="${details_url}">${_("Details & Schedule")}</a></li>
<li class="nav-item"><a href="${grading_url}">${_("Grading")}</a></li>
<li class="nav-item"><a href="${course_team_url}">${_("Course Team")}</a></li>
<li class="nav-item"><a href="${utils.reverse_course_url('group_configurations_list_handler', context_course.id)}">${_("Group Configurations")}</a></li>
% if mfe_proctored_exam_settings_url:
<li class="nav-item"><a href="${mfe_proctored_exam_settings_url}">${_("Proctored Exam Settings")}</a></li>
% endif
</ul>
</nav>
% endif
</div>
</aside>
</section>
</div>
</%block>