Skip to content

Commit

Permalink
Address yet another comment from code checker
Browse files Browse the repository at this point in the history
  • Loading branch information
FMCorz committed Apr 23, 2024
1 parent bbc2016 commit 9477045
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/completion-rules-scope-switcher.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@
</div>
{{#js}}
require(['block_xp/course-selector'], function(CourseSelector) {
const trigger = document.getElementById('block_xp-course-selector-{{uniqid}}');
const courseUrlTemplate = "{{ courseurltemplate }}";
trigger.addEventListener('click', () => {
var trigger = document.getElementById('block_xp-course-selector-{{uniqid}}');
var courseUrlTemplate = "{{ courseurltemplate }}";
trigger.addEventListener('click', function() {
CourseSelector.openCourseSelector(function(course) {
window.location.href = courseUrlTemplate.replace('CONTEXTID', course.contextid);
});
})
});
});
{{/js}}

0 comments on commit 9477045

Please sign in to comment.