add
This commit is contained in:
parent
c3600f2158
commit
72c61c5f49
|
@ -49,7 +49,7 @@ def get_group_users(user_id,file_id):
|
||||||
# print(educoder_userid)
|
# print(educoder_userid)
|
||||||
# 调用educoder的接口,返回对应的username list
|
# 调用educoder的接口,返回对应的username list
|
||||||
educoder_userids = get_educoder_group_userlist_by_educoder_userid(educoder_userid,file_id)
|
educoder_userids = get_educoder_group_userlist_by_educoder_userid(educoder_userid,file_id)
|
||||||
print(educoder_userids)
|
# print(educoder_userids)
|
||||||
users = User.objects.filter(educoder_userid__in=educoder_userids)
|
users = User.objects.filter(educoder_userid__in=educoder_userids)
|
||||||
return users
|
return users
|
||||||
|
|
||||||
|
@ -91,14 +91,14 @@ class ShowAnnotationView(View):
|
||||||
users = get_group_users(user_id,file_id)
|
users = get_group_users(user_id,file_id)
|
||||||
# user_ids = []
|
# user_ids = []
|
||||||
# 然后调用
|
# 然后调用
|
||||||
print(users)
|
# print(users)
|
||||||
commit_id = self.get_current_commitid_by_fileid(file_id)
|
commit_id = self.get_current_commitid_by_fileid(file_id)
|
||||||
# print(Annotation.objects.filter(file_id=file_id, linenum=line_num,is_latest=1,commit_id=commit_id))
|
# print(Annotation.objects.filter(file_id=file_id, linenum=line_num,is_latest=1,commit_id=commit_id))
|
||||||
if len(users)==0:
|
if len(users)==0:
|
||||||
annotations = Annotation.objects.filter(file_id=file_id, linenum=line_num,user_id=user_id,is_latest=1,commit_id=commit_id)
|
annotations = Annotation.objects.filter(file_id=file_id, linenum=line_num,user_id=user_id,is_latest=1,commit_id=commit_id)
|
||||||
else:
|
else:
|
||||||
annotations = Annotation.objects.filter(file_id=file_id, linenum=line_num,user__in=users,is_latest=1,commit_id=commit_id)
|
annotations = Annotation.objects.filter(file_id=file_id, linenum=line_num,user__in=users,is_latest=1,commit_id=commit_id)
|
||||||
print(annotations)
|
# print(annotations)
|
||||||
return annotations
|
return annotations
|
||||||
|
|
||||||
|
|
||||||
|
@ -1008,7 +1008,7 @@ def get_project_info(project_id):
|
||||||
|
|
||||||
files = File.objects.filter(project_id=project_id,has_annotation=True)
|
files = File.objects.filter(project_id=project_id,has_annotation=True)
|
||||||
anno_filenum = len(files)
|
anno_filenum = len(files)
|
||||||
print(files)
|
# print(files)
|
||||||
# import time
|
# import time
|
||||||
# current_time = time.time()
|
# current_time = time.time()
|
||||||
fileid_name_anno_issue = get_fileid_name_anno_issue(files)
|
fileid_name_anno_issue = get_fileid_name_anno_issue(files)
|
||||||
|
|
|
@ -105,13 +105,13 @@ function modify_anno(file_id,line_num,anno_id){
|
||||||
if (data.status === "success") {
|
if (data.status === "success") {
|
||||||
alert(data.msg)
|
alert(data.msg)
|
||||||
$("#ItemcommentPanel").remove()
|
$("#ItemcommentPanel").remove()
|
||||||
|
$("."+file_id+line_num).text("//"+content)
|
||||||
show_annotation(file_id,line_num)
|
show_annotation(file_id,line_num)
|
||||||
}else{
|
}else{
|
||||||
alert(data.msg)
|
alert(data.msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("."+file_id+line_num).text("//"+content)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME
|
// FIXME
|
||||||
|
|
Loading…
Reference in New Issue