mirror of
https://github.com/moodle/moodle.git
synced 2025-03-07 09:21:10 +01:00
Merge branch 'MDL-43693-master' of https://github.com/lucisgit/moodle
This commit is contained in:
commit
d0a0768b7f
@ -65,37 +65,39 @@ M.mod_assign.init_grading_table = function(Y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var batchform = Y.one('form.gradingbatchoperationsform');
|
var batchform = Y.one('form.gradingbatchoperationsform');
|
||||||
batchform.on('submit', function(e) {
|
if (batchform) {
|
||||||
checkboxes = Y.all('td.c0 input');
|
batchform.on('submit', function(e) {
|
||||||
var selectedusers = [];
|
checkboxes = Y.all('td.c0 input');
|
||||||
checkboxes.each(function(node) {
|
var selectedusers = [];
|
||||||
if (node.get('checked')) {
|
checkboxes.each(function(node) {
|
||||||
selectedusers[selectedusers.length] = node.get('value');
|
if (node.get('checked')) {
|
||||||
|
selectedusers[selectedusers.length] = node.get('value');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
operation = Y.one('#id_operation');
|
||||||
|
usersinput = Y.one('input.selectedusers');
|
||||||
|
usersinput.set('value', selectedusers.join(','));
|
||||||
|
if (selectedusers.length == 0) {
|
||||||
|
alert(M.str.assign.nousersselected);
|
||||||
|
e.preventDefault();
|
||||||
|
} else {
|
||||||
|
action = operation.get('value');
|
||||||
|
prefix = 'plugingradingbatchoperation_';
|
||||||
|
if (action.indexOf(prefix) == 0) {
|
||||||
|
pluginaction = action.substr(prefix.length);
|
||||||
|
plugin = pluginaction.split('_')[0];
|
||||||
|
action = pluginaction.substr(plugin.length + 1);
|
||||||
|
confirmmessage = eval('M.str.assignfeedback_' + plugin + '.batchoperationconfirm' + action);
|
||||||
|
} else {
|
||||||
|
confirmmessage = eval('M.str.assign.batchoperationconfirm' + operation.get('value'));
|
||||||
|
}
|
||||||
|
if (!confirm(confirmmessage)) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
operation = Y.one('#id_operation');
|
|
||||||
usersinput = Y.one('input.selectedusers');
|
|
||||||
usersinput.set('value', selectedusers.join(','));
|
|
||||||
if (selectedusers.length == 0) {
|
|
||||||
alert(M.str.assign.nousersselected);
|
|
||||||
e.preventDefault();
|
|
||||||
} else {
|
|
||||||
action = operation.get('value');
|
|
||||||
prefix = 'plugingradingbatchoperation_';
|
|
||||||
if (action.indexOf(prefix) == 0) {
|
|
||||||
pluginaction = action.substr(prefix.length);
|
|
||||||
plugin = pluginaction.split('_')[0];
|
|
||||||
action = pluginaction.substr(plugin.length + 1);
|
|
||||||
confirmmessage = eval('M.str.assignfeedback_' + plugin + '.batchoperationconfirm' + action);
|
|
||||||
} else {
|
|
||||||
confirmmessage = eval('M.str.assign.batchoperationconfirm' + operation.get('value'));
|
|
||||||
}
|
|
||||||
if (!confirm(confirmmessage)) {
|
|
||||||
e.preventDefault();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Y.use('node-menunav', function(Y) {
|
Y.use('node-menunav', function(Y) {
|
||||||
var menus = Y.all('.gradingtable .actionmenu');
|
var menus = Y.all('.gradingtable .actionmenu');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user