mirror of
https://github.com/moodle/moodle.git
synced 2025-03-06 16:59:56 +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');
|
||||
batchform.on('submit', function(e) {
|
||||
checkboxes = Y.all('td.c0 input');
|
||||
var selectedusers = [];
|
||||
checkboxes.each(function(node) {
|
||||
if (node.get('checked')) {
|
||||
selectedusers[selectedusers.length] = node.get('value');
|
||||
if (batchform) {
|
||||
batchform.on('submit', function(e) {
|
||||
checkboxes = Y.all('td.c0 input');
|
||||
var selectedusers = [];
|
||||
checkboxes.each(function(node) {
|
||||
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) {
|
||||
var menus = Y.all('.gradingtable .actionmenu');
|
||||
|
Loading…
x
Reference in New Issue
Block a user