diff --git a/test_server/examtest/exports.py b/test_server/examtest/exports.py index d6f5f0a..20b0eb7 100644 --- a/test_server/examtest/exports.py +++ b/test_server/examtest/exports.py @@ -34,7 +34,7 @@ def exportw_test(obj, bool): """ 导出个人考试记录word版本 """ - filename = obj.exam.name + '-' + str(obj.exam.id) + '-' + obj.consumer.name + '-' + obj.consumer.id + '.docx' + filename = obj.exam.name + '-' + str(obj.exam.id) + '-' + obj.consumer_detail['name'] + '-' + str(obj.score) + '.docx' path = '/media/export/' + filename fullpath = BASE_DIR + path if bool or (not os.path.exists(fullpath)):