$("#all_students_list").empty();
<% @users.each do |user|%>
var link = "
<%=user.show_name %>";
<% unless user.user_extensions.student_id == "" %>
link += "(<%=user.user_extensions.student_id %>)";
<% end %>
link += "";
$("#all_students_list").append(link);
var str = $("#group_member_ids").val();
var choose_str = "";
var lists = $("#choose_students_list li");
if(lists.length > 0) {
for(var i=0; i
if (str.indexOf(<%=user.id.to_s %>) < 0 && choose_str.indexOf(<%=user.id.to_s %>) < 0) {
$("#student_<%=user.id %>").one("click",function choose_student() {
var li = "
li += " onclick='delete_student(<%=user.id %>);'";
<% end %>
li += ">" + $("#student_<%=user.id %>").html()+"";
$("#choose_students_list").append(li);
});
}
<% elsif !user.member_of_course?(@course) %>
if (str.indexOf(<%=user.id.to_s %>) < 0) {
$("#student_<%=user.id %>").attr("title","该项目成员不是本课程的学生");
}
<% else %>
if (str.indexOf(<%=user.id.to_s %>) < 0) {
$("#student_<%=user.id %>").attr("title","该学生已加入其它分组");
}
<% end %>
<% end %>