mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 20:50:21 +01:00
MDL-78148 core_courseformat: reduce the use of uniqid in templates
This commit is contained in:
parent
090baf556e
commit
b01dd76331
@ -158,7 +158,7 @@
|
||||
}
|
||||
}
|
||||
}}
|
||||
<div id="{{uniqid}}-course-format">
|
||||
<div id="course-format-{{uniqid}}">
|
||||
<h2 class="accesshide">{{{title}}}</h2>
|
||||
{{{completionhelp}}}
|
||||
<ul class="{{format}}" data-for="course_sectionlist">
|
||||
@ -202,6 +202,6 @@
|
||||
</div>
|
||||
{{#js}}
|
||||
require(['core_courseformat/local/content'], function(component) {
|
||||
component.init('{{uniqid}}-course-format', {}, {{sectionreturn}});
|
||||
component.init('course-format-{{uniqid}}', {}, {{sectionreturn}});
|
||||
});
|
||||
{{/js}}
|
||||
|
@ -38,7 +38,7 @@
|
||||
{{^accessvisible}}dimmed{{/accessvisible}}
|
||||
{{#url}} d-flex {{/url}} {{^url}} d-flex-noedit {{/url}}
|
||||
{{#indent}} indented {{/indent}}"
|
||||
id="{{uniqid}}-course-index-cm-{{id}}"
|
||||
id="course-index-cm-{{id}}"
|
||||
data-for="cm"
|
||||
data-id="{{id}}"
|
||||
role="treeitem"
|
||||
@ -68,6 +68,6 @@
|
||||
</li>
|
||||
{{#js}}
|
||||
require(['core_courseformat/local/courseindex/cm'], function(component) {
|
||||
component.init('{{uniqid}}-course-index-cm-{{id}}');
|
||||
component.init('course-index-cm-{{id}}');
|
||||
});
|
||||
{{/js}}
|
||||
|
@ -99,13 +99,13 @@
|
||||
}
|
||||
|
||||
}}
|
||||
<div id="{{uniqid}}-course-index" class="courseindex {{#editmode}} editing {{/editmode}}" role="tree">
|
||||
<div id="course-index" class="courseindex {{#editmode}} editing {{/editmode}}" role="tree">
|
||||
{{#sections}}
|
||||
{{> core_courseformat/local/courseindex/section }}
|
||||
{{/sections}}
|
||||
</div>
|
||||
{{#js}}
|
||||
require(['core_courseformat/local/courseindex/courseindex'], function(component) {
|
||||
component.init('{{uniqid}}-course-index');
|
||||
component.init('course-index');
|
||||
});
|
||||
{{/js}}
|
||||
|
@ -22,7 +22,7 @@
|
||||
Example context (json):
|
||||
{}
|
||||
}}
|
||||
<div data-region="loading-placeholder-content" aria-hidden="true" id="{{uniqid}}-course-index-placeholder">
|
||||
<div data-region="loading-placeholder-content" aria-hidden="true" id="course-index-placeholder">
|
||||
<ul class="media-list">
|
||||
<li class="media">
|
||||
<div class="media-body col-md-6 p-0 d-flex align-items-center">
|
||||
@ -52,6 +52,6 @@
|
||||
</div>
|
||||
{{#js}}
|
||||
require(['core_courseformat/local/courseindex/placeholder'], function(component) {
|
||||
component.init('{{uniqid}}-course-index-placeholder');
|
||||
component.init('course-index-placeholder');
|
||||
});
|
||||
{{/js}}
|
||||
|
@ -57,7 +57,7 @@
|
||||
}}
|
||||
<div
|
||||
class="courseindex-section {{#current}}current{{/current}}"
|
||||
id="{{uniqid}}-course-index-section-{{id}}"
|
||||
id="course-index-section-{{id}}"
|
||||
data-for="section"
|
||||
data-id="{{id}}"
|
||||
data-number="{{number}}"
|
||||
@ -119,6 +119,6 @@
|
||||
</div>
|
||||
{{#js}}
|
||||
require(['core_courseformat/local/courseindex/section'], function(component) {
|
||||
component.init('{{uniqid}}-course-index-section-{{id}}');
|
||||
component.init('course-index-section-{{id}}');
|
||||
});
|
||||
{{/js}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user