diff --git a/app/views/files/index.json.jbuilder b/app/views/files/index.json.jbuilder index f1b3f26d0..394c02b2e 100644 --- a/app/views/files/index.json.jbuilder +++ b/app/views/files/index.json.jbuilder @@ -17,7 +17,7 @@ json.data do end # json.partial! "files/course_groups", attachment_group_settings: attachment.attachment_group_settings json.category_id attachment.course_second_category_id - if (@parent_category_id.blank? || @parent_category_id != 0) && attachment.course_second_category&.parent_id.to_i != 0 + if (@course_second_category_id.to_i == 0 && attachment.course_second_category.present?) || (@parent_category_id == 0 && attachment.course_second_category&.parent_id.to_i != 0) json.category_name attachment.course_second_category&.name end end diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 8834df1af..454b11c6f 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -38,7 +38,8 @@ class ShixunWorkReport extends Component { work_comment_hidden:undefined, work_comment:undefined, has_commit: false, - shixun_detail:[] + shixun_detail:[], + view_tpi:false } } @@ -115,7 +116,8 @@ class ShixunWorkReport extends Component { work_comment:result.data.work_comment, spinning: false, has_commit: result.data.has_commit, - shixun_detail:result.data.shixun_detail + shixun_detail:result.data.shixun_detail, + view_tpi:result.data.view_tpi }) } @@ -307,7 +309,7 @@ class ShixunWorkReport extends Component { } render() { - let {data, showAppraiseModaltype, work_comment_hidden, work_comment, has_commit,shixun_detail} = this.state; + let {data, showAppraiseModaltype, work_comment_hidden, work_comment, has_commit,shixun_detail,view_tpi} = this.state; let category_id=data===undefined?"":data.category===null?"":data.category.category_id; let homework_common_id=data===undefined?"":data.homework_common_id; @@ -461,7 +463,7 @@ class ShixunWorkReport extends Component {
{ @@ -97,17 +132,21 @@ class Teacherentry extends Component {