Skip to content
Snippets Groups Projects
Commit 03514c47 authored by Marco De Donno's avatar Marco De Donno
Browse files

Filter the marks in the target view page

Without this commit, all marks are displayed in the target show page,
even the marks not related to the current target. This function should
fix this issue.

Note that the filter should be done in SQL for simplicity purpose in a
near future.
parent 48e28648
No related branches found
No related tags found
No related merge requests found
......@@ -160,7 +160,7 @@ def show_folder_inner( uuid, admin ):
segments_list = get_segment_list_for_target_folder( uuid, admin )
annotation_list = get_annotation_list_for_target_folder( uuid, admin )
marks_list = get_marks_list_for_target_folder( uuid, admin )
marks_list_tmp = get_marks_list_for_target_folder( uuid, admin )
if admin:
sql = """
......@@ -176,6 +176,12 @@ def show_folder_inner( uuid, admin ):
submission_id, pc, username = config.db.query_fetchone( sql, ( uuid, ) )
finger_name = "{} (F{})".format( segments_position_code[ pc ], pc )
marks_list = []
for m in marks_list_tmp:
for z in m[ "pfsp" ].split( "," ):
if pc in pfsp2fpc[ z ]:
marks_list.append( m )
sql = """
SELECT
users.id,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment