|
|
|
@ -18,7 +18,7 @@ $("#all_students_list").empty();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
<% if user.id.to_i != User.current.id.to_i && (@commit_student_ids.find{|e| e.to_i == user.id.to_i}).nil? %>
|
|
|
|
|
<% 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) {
|
|
|
|
|
$("#student_<%=user.id %>").one("click",function choose_student() {
|
|
|
|
|
var li = "<li id='choose_student_<%=user.id %>'";
|
|
|
|
@ -29,6 +29,10 @@ $("#all_students_list").empty();
|
|
|
|
|
$("#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","该学生已加入其它分组");
|
|
|
|
|