@ -8,19 +8,19 @@ $("#all_students_list").empty();
$("#all_students_list").append(link);
$("#all_students_list").append(link);
var str = $("#group_member_ids").val();
var str = $("#group_member_ids").val();
/* var str = "";
var choose_ str = "";
var lists = $("#choose_students_list li");
var lists = $("#choose_students_list li");
if(lists.length > 0) {
if(lists.length > 0) {
for(var i=0; i<lists.length; i++) {
for(var i=0; i<lists.length; i++) {
var id = $(lists[i]).attr("id").replace(/[^0-9]/ig,"");
var id = $(lists[i]).attr("id").replace(/[^0-9]/ig,"");
str += id;
choose_ str += id;
if (i != lists.length -1) {
if (i != lists.length -1) {
str += ",";
choose_ str += ",";
}
}
}
}
}*/
}
<% if user.id.to_i != User.current.id.to_i && (@commit_student_ids.find{|e| e.to_i == user.id.to_i}).nil? && user.member_of_course?(@course) %>
<% if user.id.to_i != User.current.id.to_i && (@commit_student_ids.find{|e| e.to_i == user.id.to_i}).nil? && user.member_of_course?(@course) %>
if (str.indexOf(<%=user.id.to_s %>) < 0) {
if (str.indexOf(<%=user.id.to_s %>) < 0 && choose_str.indexOf(<%=user.id.to_s %>) < 0 ) {
$("#student_<%=user.id %>").one("click",function choose_student() {
$("#student_<%=user.id %>").one("click",function choose_student() {
var li = "<li id='choose_student_<%=user.id %>'";
var li = "<li id='choose_student_<%=user.id %>'";
<% if user.id.to_i != User.current.id.to_i %>
<% if user.id.to_i != User.current.id.to_i %>