mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-62748 course: maxsections is a limit
For course formats shipped with core, maxsections should be a limit to the number of sections allowed in the course.
This commit is contained in:
parent
f468f6d02a
commit
7c05d8a3d2
6 changed files with 60 additions and 13 deletions
2
course/amd/build/actions.min.js
vendored
2
course/amd/build/actions.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -588,9 +588,10 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/str'
|
|||
// Add a handler for "Add sections" link to ask for a number of sections to add.
|
||||
str.get_string('numberweeks').done(function(strNumberSections) {
|
||||
var trigger = $(SELECTOR.ADDSECTIONS),
|
||||
modalTitle = trigger.attr('data-add-sections');
|
||||
modalTitle = trigger.attr('data-add-sections'),
|
||||
newSections = trigger.attr('new-sections');
|
||||
var modalBody = $('<div><label for="add_section_numsections"></label> ' +
|
||||
'<input id="add_section_numsections" type="number" min="1" value="1"></div>');
|
||||
'<input id="add_section_numsections" type="number" min="1" max="' + newSections + '" value="1"></div>');
|
||||
modalBody.find('label').html(strNumberSections);
|
||||
ModalFactory.create({
|
||||
title: modalTitle,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue