diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 67c3bfbe2..f75dacecc 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -207,7 +207,7 @@ class ShixunsController < ApplicationController @new_shixun = Shixun.new @new_shixun.attributes = @shixun.attributes.dup.except("id","user_id","visits","gpid","status", "identifier", "averge_star", "homepage_show","repo_name", "myshixuns_count", "challenges_count", - "can_copy", "created_at", "updated_at") + "can_copy", "created_at", "updated_at", "public") @new_shixun.user_id = User.current.id @new_shixun.averge_star = 5 @new_shixun.identifier = generate_identifier Shixun, 8 diff --git a/app/services/subjects/copy_subject_service.rb b/app/services/subjects/copy_subject_service.rb index 94157dc7b..f44191fda 100644 --- a/app/services/subjects/copy_subject_service.rb +++ b/app/services/subjects/copy_subject_service.rb @@ -60,7 +60,7 @@ class Subjects::CopySubjectService < ApplicationService shixun = stage_shixun.shixun to_shixun = Shixun.new to_shixun.attributes = shixun.attributes.dup.except('id', 'user_id', 'identifier', 'homepage_show', - 'use_scope', 'averge_star', 'myshixuns_count', 'challenges_count') + 'use_scope', 'averge_star', 'myshixuns_count', 'challenges_count', "public") to_shixun.identifier = Util::UUID.generate_identifier(Shixun, 8) to_shixun.user_id = user.id if laboratory diff --git a/app/services/users/shixun_service.rb b/app/services/users/shixun_service.rb index ef399ce8c..279d147f4 100644 --- a/app/services/users/shixun_service.rb +++ b/app/services/users/shixun_service.rb @@ -44,7 +44,7 @@ class Users::ShixunService def user_policy_filter(relations) # 只有自己或者管理员才有过滤筛选及查看全部状态下实训功能 if self_or_admin? - relations = relations.where.not(status: -1) + relations = relations.where.not(status: -1).where(hidden: false) status_filter(relations) else relations.where(status: [2, 3], hidden: false) diff --git a/app/services/users/subject_service.rb b/app/services/users/subject_service.rb index 8a4fdce3b..53ff3f4b9 100644 --- a/app/services/users/subject_service.rb +++ b/app/services/users/subject_service.rb @@ -35,7 +35,7 @@ class Users::SubjectService def user_policy_filter(relations) # 只有自己或者管理员才有过滤筛选及查看全部状态下实训功能 if self_or_admin? - status_filter(relations) + status_filter(relations.unhidden) else relations.where(status: 2, hidden: false) end diff --git a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js index 52cf945a0..5ee763951 100644 --- a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js +++ b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js @@ -591,7 +591,7 @@ class NewShixunModel extends Component{ this.props.type==='shixuns'? ( item.is_jupyter===true? -
Jupyter
diff --git a/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css b/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css index b69c41e25..9bdf44e68 100644 --- a/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css +++ b/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css @@ -391,7 +391,6 @@ text-align: center; border-radius:5px; border:1px solid #FF6802; - margin-top: 4px; } .myysljupytertest{ width:54px; diff --git a/public/react/src/modules/courses/elearning/YslDetailCards.js b/public/react/src/modules/courses/elearning/YslDetailCards.js index 55bed2b5e..6ca63a42a 100644 --- a/public/react/src/modules/courses/elearning/YslDetailCards.js +++ b/public/react/src/modules/courses/elearning/YslDetailCards.js @@ -529,6 +529,7 @@ class YslDetailCards extends Component{ { this.props.isAdmin()===true?
实训名称:
diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js
index ed89de173..bf13313fd 100644
--- a/public/react/src/modules/tpm/TPMBanner.js
+++ b/public/react/src/modules/tpm/TPMBanner.js
@@ -1223,7 +1223,7 @@ class TPMBanner extends Component {
}
- {this.props.identity < 8 && shixunsDetails.shixun_status != -1 && shixunsDetails.shixun_status != 0?
+ {this.props.identity < 5 && shixunsDetails.shixun_status != -1 && shixunsDetails.shixun_status != 0?