diff --git a/app/services/duplicate_course_service.rb b/app/services/duplicate_course_service.rb index 27ae2f784..acff0a726 100644 --- a/app/services/duplicate_course_service.rb +++ b/app/services/duplicate_course_service.rb @@ -11,7 +11,7 @@ class DuplicateCourseService < ApplicationService @course = copy_course! copy_course_modules! - Rails.logger.info("###########second_category_list#{@second_category_list}") + join_course! copy_homework_commons! diff --git a/app/views/attachments/_attachment.json.jbuilder b/app/views/attachments/_attachment.json.jbuilder index 01a7f4163..b87154157 100644 --- a/app/views/attachments/_attachment.json.jbuilder +++ b/app/views/attachments/_attachment.json.jbuilder @@ -1,7 +1,8 @@ json.id attachment.id json.title attachment.title json.is_public attachment.publiced? -json.is_lock attachment.locked?(@is_member) +# json.is_lock attachment.locked?(@is_member) +json.is_lock !attachment.publiced? json.is_publish attachment.published? json.publish_time attachment.publish_time json.unified_setting attachment.unified_setting @@ -10,4 +11,6 @@ json.quotes attachment.quotes_count json.description attachment.description json.downloads_count attachment.downloads_count json.created_on attachment.created_on -json.url download_url(attachment) unless attachment.locked?(@is_member) +json.url download_url(attachment) + +# json.url download_url(attachment) unless attachment.locked?(@is_member) diff --git a/app/views/files/index.json.jbuilder b/app/views/files/index.json.jbuilder index 81fa406dd..7fe3bf5b7 100644 --- a/app/views/files/index.json.jbuilder +++ b/app/views/files/index.json.jbuilder @@ -8,6 +8,7 @@ json.data do json.course_is_public @course.is_public? json.files do json.array! @attachments do |attachment| + json.is_history_file attachment.attachment_histories.count > 0 #是否有历史文件 json.partial! "attachments/attachment", attachment: attachment json.author do json.partial! "users/user_simple", user: attachment.author diff --git a/public/react/src/modules/page/Index.js b/public/react/src/modules/page/Index.js index 1513405b0..3a273e0d6 100644 --- a/public/react/src/modules/page/Index.js +++ b/public/react/src/modules/page/Index.js @@ -242,7 +242,7 @@ class Index extends Component { updateChallengePath={context.updateChallengePath} - time_limit={context.time_limit} + time_limit={context.time_limit + 5} resetTestSetsExpandedArray={context.resetTestSetsExpandedArray} onRunCodeTestFinish={context.onRunCodeTestFinish}