niPingAndIsStudent

dev_forum
hjm 6 years ago
parent 9d954ea61e
commit c152a950be

@ -47,9 +47,14 @@ function buildColumns(that, student_works) {
}
let courseId= that.props.match.params.coursesId;
let workId= that.props.match.params.workId;
const { course_group_count } = that.state;
const { course_group_count, homework_status } = that.state;
const isAdmin = that.props.isAdmin()
const isAdminOrStudent = that.props.isAdminOrStudent()
const isStudent = that.props.isStudent()
const isNiPing = homework_status.indexOf('匿评中') != -1
// https://www.trustie.net/issues/21450 分组作业作品列表 学时视角,匿评阶段的列表显示信息不正确
const niPingAndIsStudent = isStudent && isNiPing
let columns = [{
width: 60,
title: '序号',
@ -76,7 +81,9 @@ function buildColumns(that, student_works) {
{text}
</div>
),
}, {
}]
if (!niPingAndIsStudent) {
columns.push({
width: 180,
title: '学号',
dataIndex: 'student_id',
@ -87,10 +94,11 @@ function buildColumns(that, student_works) {
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.student_id}</a>
</span>
),
}]
})
}
// TODO 只有有分班时才显示分班列
if (course_group_count != 0) {
if (course_group_count != 0 && !niPingAndIsStudent) {
columns.push( {
title: '分班',
key: 'group_name',
@ -103,7 +111,7 @@ function buildColumns(that, student_works) {
),
} )
}
if (gotWorkGroup) {
if (gotWorkGroup && !niPingAndIsStudent) {
columns.push({
width: 72,
title: '分组',
@ -154,7 +162,9 @@ function buildColumns(that, student_works) {
<a href="javascript:;" style={{color:'#989898'}}>{update_time ? moment(update_time).format('YYYY-MM-DD hh:mm') : '--'}</a>
</span>
),
}, {
}])
if (!niPingAndIsStudent) {
columns.push({
width: 72,
title: '教师评分',
key: 'teacher_score',
@ -168,14 +178,16 @@ function buildColumns(that, student_works) {
</span>
</Tooltip>
),
}, {
})
columns.push({
width: 72,
title: '助教评分',
key: 'teaching_asistant_score',
dataIndex: 'teaching_asistant_score',
/**
/**
* 2名助教进行了评分
平均分85.0
平均分85.0
*
*/
render: (teaching_asistant_score, record) => (
@ -192,7 +204,10 @@ function buildColumns(that, student_works) {
</Tooltip> }
</span>
),
}])
})
}
if (that.state.anonymous_comment) {
/**
@ -242,7 +257,7 @@ function buildColumns(that, student_works) {
),
})
}
if (!niPingAndIsStudent) {
columns.push({
width: 72,
title: '最终成绩',
@ -272,6 +287,7 @@ function buildColumns(that, student_works) {
)
},
})
}
if (isAdminOrStudent || that.props.work_public == true) {
columns.push({
width: 92,

Loading…
Cancel
Save