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>
|
<h2 class="accesshide">{{{title}}}</h2>
|
||||||
{{{completionhelp}}}
|
{{{completionhelp}}}
|
||||||
<ul class="{{format}}" data-for="course_sectionlist">
|
<ul class="{{format}}" data-for="course_sectionlist">
|
||||||
@ -202,6 +202,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{{#js}}
|
{{#js}}
|
||||||
require(['core_courseformat/local/content'], function(component) {
|
require(['core_courseformat/local/content'], function(component) {
|
||||||
component.init('{{uniqid}}-course-format', {}, {{sectionreturn}});
|
component.init('course-format-{{uniqid}}', {}, {{sectionreturn}});
|
||||||
});
|
});
|
||||||
{{/js}}
|
{{/js}}
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
{{^accessvisible}}dimmed{{/accessvisible}}
|
{{^accessvisible}}dimmed{{/accessvisible}}
|
||||||
{{#url}} d-flex {{/url}} {{^url}} d-flex-noedit {{/url}}
|
{{#url}} d-flex {{/url}} {{^url}} d-flex-noedit {{/url}}
|
||||||
{{#indent}} indented {{/indent}}"
|
{{#indent}} indented {{/indent}}"
|
||||||
id="{{uniqid}}-course-index-cm-{{id}}"
|
id="course-index-cm-{{id}}"
|
||||||
data-for="cm"
|
data-for="cm"
|
||||||
data-id="{{id}}"
|
data-id="{{id}}"
|
||||||
role="treeitem"
|
role="treeitem"
|
||||||
@ -68,6 +68,6 @@
|
|||||||
</li>
|
</li>
|
||||||
{{#js}}
|
{{#js}}
|
||||||
require(['core_courseformat/local/courseindex/cm'], function(component) {
|
require(['core_courseformat/local/courseindex/cm'], function(component) {
|
||||||
component.init('{{uniqid}}-course-index-cm-{{id}}');
|
component.init('course-index-cm-{{id}}');
|
||||||
});
|
});
|
||||||
{{/js}}
|
{{/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}}
|
{{#sections}}
|
||||||
{{> core_courseformat/local/courseindex/section }}
|
{{> core_courseformat/local/courseindex/section }}
|
||||||
{{/sections}}
|
{{/sections}}
|
||||||
</div>
|
</div>
|
||||||
{{#js}}
|
{{#js}}
|
||||||
require(['core_courseformat/local/courseindex/courseindex'], function(component) {
|
require(['core_courseformat/local/courseindex/courseindex'], function(component) {
|
||||||
component.init('{{uniqid}}-course-index');
|
component.init('course-index');
|
||||||
});
|
});
|
||||||
{{/js}}
|
{{/js}}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
Example context (json):
|
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">
|
<ul class="media-list">
|
||||||
<li class="media">
|
<li class="media">
|
||||||
<div class="media-body col-md-6 p-0 d-flex align-items-center">
|
<div class="media-body col-md-6 p-0 d-flex align-items-center">
|
||||||
@ -52,6 +52,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{{#js}}
|
{{#js}}
|
||||||
require(['core_courseformat/local/courseindex/placeholder'], function(component) {
|
require(['core_courseformat/local/courseindex/placeholder'], function(component) {
|
||||||
component.init('{{uniqid}}-course-index-placeholder');
|
component.init('course-index-placeholder');
|
||||||
});
|
});
|
||||||
{{/js}}
|
{{/js}}
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
}}
|
}}
|
||||||
<div
|
<div
|
||||||
class="courseindex-section {{#current}}current{{/current}}"
|
class="courseindex-section {{#current}}current{{/current}}"
|
||||||
id="{{uniqid}}-course-index-section-{{id}}"
|
id="course-index-section-{{id}}"
|
||||||
data-for="section"
|
data-for="section"
|
||||||
data-id="{{id}}"
|
data-id="{{id}}"
|
||||||
data-number="{{number}}"
|
data-number="{{number}}"
|
||||||
@ -119,6 +119,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{{#js}}
|
{{#js}}
|
||||||
require(['core_courseformat/local/courseindex/section'], function(component) {
|
require(['core_courseformat/local/courseindex/section'], function(component) {
|
||||||
component.init('{{uniqid}}-course-index-section-{{id}}');
|
component.init('course-index-section-{{id}}');
|
||||||
});
|
});
|
||||||
{{/js}}
|
{{/js}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user