chromesetting
杨树林 5 years ago
commit 1afac6f800

@ -346,7 +346,7 @@ class HomeworksService
work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) unless work.ultimate_score work.work_score = format("%.2f",(score < 0 ? 0 : score).to_f) unless work.ultimate_score
#logger.info("#############work_score: #{score}") #logger.info("#############work_score: #{score}")
work.calculation_time = Time.now work.calculation_time = Time.now
work.save! work.save(validate: false)
end end
end end
end end

@ -52,7 +52,6 @@ export function initAxiosInterceptors(props) {
//proxy="http://47.96.87.25:48080" //proxy="http://47.96.87.25:48080"
proxy="https://pre-newweb.educoder.net" proxy="https://pre-newweb.educoder.net"
proxy="https://test-newweb.educoder.net" proxy="https://test-newweb.educoder.net"
proxy="https://test-jupyterweb.educoder.net"
//proxy="http://192.168.2.63:3001" //proxy="http://192.168.2.63:3001"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求 // 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求

@ -392,12 +392,13 @@ class Statistics extends Component{
) )
} }
// console.log(this.props.isAdmin) // console.log("Statistics");
// console.log(this.props.user.course_is_end)
const course_is_endismy=this.props&&this.props.user&&this.props.user.course_is_end;
const operations = <React.Fragment> const operations = <React.Fragment>
{course_grouptype===false||this.state.course_groups.length===0?"": {course_grouptype===false||this.state.course_groups.length===0?"":
this.state.activeKey==="1"? this.props.isAdmin()===true?
<Dropdownbox <Dropdownbox
{...this.props} {...this.props}
{...this.state} {...this.state}
@ -408,12 +409,17 @@ class Statistics extends Component{
} }
{ {
this.state.activeKey==="1"? this.state.activeKey==="1"?
<a className={"ml20 ant-btn-link"} onClick={()=>this.setComputeTimet(this.props.match.params.coursesId)}>获取最新成绩</a> (
course_is_endismy===false?
<a className={"ml20 ant-btn-link"} onClick={()=>this.setComputeTimet(this.props.match.params.coursesId)}>获取最新成绩</a>
:
""
)
:"" :""
} }
{ {
this.state.activeKey==="1"? this.props.isAdmin()===true?
<a className={"ml20 ant-btn-link"} onClick={()=>this.derivefun(this.state.activeKey==="1"?`/courses/${this.props.match.params.coursesId}/export_member_scores_excel.xlsx`:`/courses/${this.props.match.params.coursesId}/export_member_act_score.xlsx`)}>导出</a> <a className={"ml20 ant-btn-link"} onClick={()=>this.derivefun(this.state.activeKey==="1"?`/courses/${this.props.match.params.coursesId}/export_member_scores_excel.xlsx`:`/courses/${this.props.match.params.coursesId}/export_member_act_score.xlsx`)}>导出</a>
:"" :""
} }
</React.Fragment>; </React.Fragment>;
@ -592,7 +598,7 @@ class Statistics extends Component{
} }
` `
}</style> }</style>
<Tabs className="statisticsTabs" activeKey={this.state.activeKey} onChange={this.activeKey} tabBarExtraContent={this.props.isAdmin()===true?operations:""}> <Tabs className="statisticsTabs" activeKey={this.state.activeKey} onChange={this.activeKey} tabBarExtraContent={operations}>
<TabPane tab="学习成绩" key="1" className={"statisticsTabs1"} > <TabPane tab="学习成绩" key="1" className={"statisticsTabs1"} >
{bomdata===undefined||bomdata===null?"":bomdata.length===0?<NoneData/>:<Table {bomdata===undefined||bomdata===null?"":bomdata.length===0?<NoneData/>:<Table
columns={columns} columns={columns}

@ -53,13 +53,8 @@ class TPMNav extends Component {
{/*jupyter*/} {/*jupyter*/}
{ {
this.props.is_jupyter===true? this.props.is_jupyter===true?
(
is_teacher===true?
<Link to={`/shixuns/${shixunId}/dataset`} <Link to={`/shixuns/${shixunId}/dataset`}
className={`${match.url.indexOf('dataset') != -1 ? 'active' : ''} fl mr40`}>数据集</Link> className={`${match.url.indexOf('dataset') != -1 ? 'active' : ''} fl mr40`}>数据集</Link>
:""
)
:"" :""
} }
@ -80,12 +75,8 @@ class TPMNav extends Component {
<Link to={`/shixuns/${shixunId}/audit_situation`} <Link to={`/shixuns/${shixunId}/audit_situation`}
className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link> className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link>
: :
is_teacher===true?
<Link to={`/shixuns/${shixunId}/audit_situation`} <Link to={`/shixuns/${shixunId}/audit_situation`}
className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link> className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link>
:
""
) )

@ -189,6 +189,7 @@ class Challengesjupyter extends Component {
const business = this.props&&this.props.current_user&&this.props.current_user.business?this.props.current_user.business:false; const business = this.props&&this.props.current_user&&this.props.current_user.business?this.props.current_user.business:false;
//管理员 //管理员
const admin = this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false; const admin = this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
let mysidentity =false; let mysidentity =false;
try { try {
mysidentity =this.props.identity < 5 &&ChallengesDataList&& ChallengesDataList.shixun_status< 3?true:false; mysidentity =this.props.identity < 5 &&ChallengesDataList&& ChallengesDataList.shixun_status< 3?true:false;

Loading…
Cancel
Save