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)
|
||||
# 调用educoder的接口,返回对应的username list
|
||||
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)
|
||||
return users
|
||||
|
||||
|
@ -91,14 +91,14 @@ class ShowAnnotationView(View):
|
|||
users = get_group_users(user_id,file_id)
|
||||
# user_ids = []
|
||||
# 然后调用
|
||||
print(users)
|
||||
# print(users)
|
||||
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))
|
||||
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)
|
||||
else:
|
||||
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
|
||||
|
||||
|
||||
|
@ -1008,7 +1008,7 @@ def get_project_info(project_id):
|
|||
|
||||
files = File.objects.filter(project_id=project_id,has_annotation=True)
|
||||
anno_filenum = len(files)
|
||||
print(files)
|
||||
# print(files)
|
||||
# import time
|
||||
# current_time = time.time()
|
||||
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") {
|
||||
alert(data.msg)
|
||||
$("#ItemcommentPanel").remove()
|
||||
$("."+file_id+line_num).text("//"+content)
|
||||
show_annotation(file_id,line_num)
|
||||
}else{
|
||||
alert(data.msg)
|
||||
}
|
||||
}
|
||||
});
|
||||
$("."+file_id+line_num).text("//"+content)
|
||||
}
|
||||
|
||||
// FIXME
|
||||
|
|
Loading…
Reference in New Issue