Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 34 additions & 11 deletions lms/static/js/instructor_dashboard/membership.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,14 +503,20 @@ such that the value can be defined later than this assignment (file load order).
}));
$idsList = $('<ul/>');
$taskResSection.append($idsList);
for (j = 0, len1 = ids.length; j < len1; j++) {
identifier = ids[j];
$idsList.append($('<li/>', {
text: identifier
}));
}
if (ids && ids.length > 0) {
for (j = 0, len1 = ids.length; j < len1; j++) {
identifier = ids[j];
$idsList.append($('<li/>', {
text: identifier
}));
}
}
return displayResponse.$task_response.append($taskResSection);
};
if (errors.length === 0 && successes.length === 0 && noUsers.length === 0) {
// Translators: For cases when the input field is empty;
renderList(gettext('This field must not be blank'), []);
}
if (successes.length && dataFromServer.action === 'add') {
var j, len1, inActiveUsers, activeUsers; // eslint-disable-line vars-on-top
activeUsers = [];
Expand Down Expand Up @@ -585,6 +591,9 @@ such that the value can be defined later than this assignment (file load order).
sr = noUsers[j];
results.push(sr.identifier);
}
results.unshift(
gettext('Users must create and activate their account before they can be promoted to beta tester.')
);
return results;
}()));
}
Expand Down Expand Up @@ -699,14 +708,28 @@ such that the value can be defined later than this assignment (file load order).
}));
$idsList = $('<ul/>');
$taskResSection.append($idsList);
for (h = 0, len3 = ids.length; h < len3; h++) {
identifier = ids[h];
$idsList.append($('<li/>', {
text: identifier
}));
if (ids && ids.length > 0) {
for (h = 0, len3 = ids.length; h < len3; h++) {
identifier = ids[h];
$idsList.append($('<li/>', {
text: identifier
}));
}
}
return displayResponse.$task_response.append($taskResSection);
};
if (
invalidIdentifier.length === 0
&& errors.length === 0
&& enrolled.length === 0
&& allowed.length === 0
&& autoenrolled.length === 0
&& notenrolled.length === 0
&& notunenrolled.length === 0
) {
// Translators: For cases when the input field is empty;
renderList(gettext('This field must not be blank'), []);
}
if (invalidIdentifier.length) {
renderList(gettext('The following email addresses and/or usernames are invalid:'), (function() {
var m, len4, results;
Expand Down