|
|
|
@ -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,21 +81,24 @@ function buildColumns(that, student_works) {
|
|
|
|
|
{text}
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
}, {
|
|
|
|
|
width: 180,
|
|
|
|
|
title: '学号',
|
|
|
|
|
dataIndex: 'student_id',
|
|
|
|
|
key: 'student_id',
|
|
|
|
|
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.student_id}</a>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
}]
|
|
|
|
|
if (!niPingAndIsStudent) {
|
|
|
|
|
columns.push({
|
|
|
|
|
width: 180,
|
|
|
|
|
title: '学号',
|
|
|
|
|
dataIndex: 'student_id',
|
|
|
|
|
key: 'student_id',
|
|
|
|
|
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<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,45 +162,52 @@ function buildColumns(that, student_works) {
|
|
|
|
|
<a href="javascript:;" style={{color:'#989898'}}>{update_time ? moment(update_time).format('YYYY-MM-DD hh:mm') : '--'}</a>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
}, {
|
|
|
|
|
width: 72,
|
|
|
|
|
title: '教师评分',
|
|
|
|
|
key: 'teacher_score',
|
|
|
|
|
dataIndex: 'teacher_score',
|
|
|
|
|
}])
|
|
|
|
|
if (!niPingAndIsStudent) {
|
|
|
|
|
columns.push({
|
|
|
|
|
width: 72,
|
|
|
|
|
title: '教师评分',
|
|
|
|
|
key: 'teacher_score',
|
|
|
|
|
dataIndex: 'teacher_score',
|
|
|
|
|
|
|
|
|
|
render: (teacher_score, record) => (
|
|
|
|
|
|
|
|
|
|
render: (teacher_score, record) => (
|
|
|
|
|
<Tooltip title={ getScoreTip(teacher_score, teacher_score) }>
|
|
|
|
|
<span>
|
|
|
|
|
{ renderScore(teacher_score) }
|
|
|
|
|
</span>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
),
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
<Tooltip title={ getScoreTip(teacher_score, teacher_score) }>
|
|
|
|
|
columns.push({
|
|
|
|
|
width: 72,
|
|
|
|
|
title: '助教评分',
|
|
|
|
|
key: 'teaching_asistant_score',
|
|
|
|
|
dataIndex: 'teaching_asistant_score',
|
|
|
|
|
/**
|
|
|
|
|
* 2名助教进行了评分
|
|
|
|
|
平均分:85.0分
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
render: (teaching_asistant_score, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
{ renderScore(teacher_score) }
|
|
|
|
|
</span>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
),
|
|
|
|
|
}, {
|
|
|
|
|
width: 72,
|
|
|
|
|
title: '助教评分',
|
|
|
|
|
key: 'teaching_asistant_score',
|
|
|
|
|
dataIndex: 'teaching_asistant_score',
|
|
|
|
|
/**
|
|
|
|
|
* 2名助教进行了评分
|
|
|
|
|
平均分:85.0分
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
render: (teaching_asistant_score, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
{ <Tooltip placement="bottom" title={
|
|
|
|
|
getScoreTip(teaching_asistant_score,
|
|
|
|
|
<div>
|
|
|
|
|
<div>{record.ta_comment_count}名助教进行了评分</div>
|
|
|
|
|
<div>{that.state.ta_mode == 1 ? '平均分': '复审分'}:{teaching_asistant_score}分</div>
|
|
|
|
|
</div>) }
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
{renderScore(teaching_asistant_score) }
|
|
|
|
|
</Tooltip> }
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
}])
|
|
|
|
|
{ <Tooltip placement="bottom" title={
|
|
|
|
|
getScoreTip(teaching_asistant_score,
|
|
|
|
|
<div>
|
|
|
|
|
<div>{record.ta_comment_count}名助教进行了评分</div>
|
|
|
|
|
<div>{that.state.ta_mode == 1 ? '平均分': '复审分'}:{teaching_asistant_score}分</div>
|
|
|
|
|
</div>) }
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
{renderScore(teaching_asistant_score) }
|
|
|
|
|
</Tooltip> }
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (that.state.anonymous_comment) {
|
|
|
|
|
/**
|
|
|
|
@ -242,36 +257,37 @@ function buildColumns(that, student_works) {
|
|
|
|
|
),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
columns.push({
|
|
|
|
|
width: 72,
|
|
|
|
|
title: '最终成绩',
|
|
|
|
|
key: 'work_score',
|
|
|
|
|
dataIndex: 'work_score',
|
|
|
|
|
render: (work_score, record) => {
|
|
|
|
|
return (
|
|
|
|
|
<span>
|
|
|
|
|
<Tooltip title={
|
|
|
|
|
getScoreTip(work_score,
|
|
|
|
|
<div>
|
|
|
|
|
<div>{`${record.user_name}(${record.user_login})`}</div>
|
|
|
|
|
{ record.ultimate_score ?
|
|
|
|
|
<div>最终调整成绩:{record.work_score}分</div> :
|
|
|
|
|
if (!niPingAndIsStudent) {
|
|
|
|
|
columns.push({
|
|
|
|
|
width: 72,
|
|
|
|
|
title: '最终成绩',
|
|
|
|
|
key: 'work_score',
|
|
|
|
|
dataIndex: 'work_score',
|
|
|
|
|
render: (work_score, record) => {
|
|
|
|
|
return (
|
|
|
|
|
<span>
|
|
|
|
|
<Tooltip title={
|
|
|
|
|
getScoreTip(work_score,
|
|
|
|
|
<div>
|
|
|
|
|
{ record.final_score && <div>作业评分:{record.final_score}分</div> }
|
|
|
|
|
{ record.late_penalty >= 0 && <div>迟交扣分:{record.late_penalty}分</div>}
|
|
|
|
|
{ record.absence_penalty >= 0 && <div>缺评扣分:{record.absence_penalty}分</div>}
|
|
|
|
|
{ record.appeal_penalty >= 0 && <div>违规匿评扣分:{record.appeal_penalty}分</div>}
|
|
|
|
|
<div>最终成绩:{record.work_score}分</div>
|
|
|
|
|
</div> }
|
|
|
|
|
</div>)
|
|
|
|
|
}>
|
|
|
|
|
{ renderScore(work_score) }
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</span>
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
<div>{`${record.user_name}(${record.user_login})`}</div>
|
|
|
|
|
{ record.ultimate_score ?
|
|
|
|
|
<div>最终调整成绩:{record.work_score}分</div> :
|
|
|
|
|
<div>
|
|
|
|
|
{ record.final_score && <div>作业评分:{record.final_score}分</div> }
|
|
|
|
|
{ record.late_penalty >= 0 && <div>迟交扣分:{record.late_penalty}分</div>}
|
|
|
|
|
{ record.absence_penalty >= 0 && <div>缺评扣分:{record.absence_penalty}分</div>}
|
|
|
|
|
{ record.appeal_penalty >= 0 && <div>违规匿评扣分:{record.appeal_penalty}分</div>}
|
|
|
|
|
<div>最终成绩:{record.work_score}分</div>
|
|
|
|
|
</div> }
|
|
|
|
|
</div>)
|
|
|
|
|
}>
|
|
|
|
|
{ renderScore(work_score) }
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</span>
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (isAdminOrStudent || that.props.work_public == true) {
|
|
|
|
|
columns.push({
|
|
|
|
|
width: 92,
|
|
|
|
|