计算成绩功能调整

dev_forum
杨树明 5 years ago
parent 75d0d84c1a
commit 24f1f9e86e

@ -300,7 +300,7 @@ class Fileslistitem extends Component{
</WordsBtn> </WordsBtn>
</span>:""} </span>:""}
{this.props.current_user.login===discussMessage.author.login? {this.props.isStudent===true&&this.props.current_user.login===discussMessage.author.login?
<span className={"fr mrf2 mr10"}> <span className={"fr mrf2 mr10"}>
<WordsBtn style="blue" className="colorblue font-16 mr20 fr"> <WordsBtn style="blue" className="colorblue font-16 mr20 fr">

@ -131,9 +131,9 @@ class Exercisesetting extends Component{
// end_timetype:false // end_timetype:false
// }) // })
// }else{ // }else{
this.setState({ // this.setState({
end_timetype:true // end_timetype:true
}) // })
// } // }
} }

@ -1440,7 +1440,7 @@ class Listofworks extends Component {
<Link <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link> to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin() ? {this.props.isAdmin() ?
this.state.code_review === true ? "" : <Link this.state.code_review === true ||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"? "" : <Link
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`} // to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}> to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link> : ""} 代码查重</Link> : ""}

@ -748,11 +748,12 @@ class Listofworksstudentone extends Component {
} }
setComputeTime=()=>{ setComputeTime=()=>{
let {teacherdata}=this.state;
this.setState({ this.setState({
computeTimetype:false computeTimetype:false
}) })
let homeworkid = this.props.match.params.homeworkid; let homeworkid = this.props.match.params.homeworkid;
let url = "/homework_commons/"+homeworkid+"/update_student_score.json"; let url = "/homework_commons/"+homeworkid+"/update_student_score.json?shixun_id="+teacherdata.shixun_id;
axios.get(url).then((response) => { axios.get(url).then((response) => {
this.props.showNotification(`${response.data.message}`); this.props.showNotification(`${response.data.message}`);
@ -925,13 +926,13 @@ class Listofworksstudentone extends Component {
<div className="fr"> <div className="fr">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span> <span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
<span> {teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}> {computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩 计算成绩
</div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}> </div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}>
计算成绩 计算成绩
</div>} </div>}
</span> </span>}
</div> </div>
@ -1079,22 +1080,61 @@ class Listofworksstudentone extends Component {
<span className="ml20" <span className="ml20"
style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span>} style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span>}
</span>
<style>
{`
.startbox{
height: 48px;
background: rgba(255,104,0,0.1);
line-height: 48px;
text-align: center;
}
.startfont{
font-size:14px;
font-family:MicrosoftYaHei;
font-weight:400;
color:rgba(255,104,0,1);
}
.computeTime{
width: 73px;
height: 24px;
display: inline-block;
padding: 5px;
text-align: center;
line-height: 13px;
color: #4CACFF;
border: 1px solid #4CACFF;
cursor: pointer;
}
.computeTimes{
width: 73px;
height: 24px;
display: inline-block;
padding: 5px;
text-align: center;
line-height: 13px;
color: #C5C5C5;
border: 1px solid #EDEDED;
background:#EDEDED;
cursor: pointer;
}
`}
</style>
<div className="fr"> <div className="fr">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span> <span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
<span> {teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}> {computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩 计算成绩
</div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}> </div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}>
计算成绩 计算成绩
</div>} </div>}
</span> </span>}
</div> </div>
</span>
{/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/} {/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/}
{/*<div className="fr edu-menu-panel">*/} {/*<div className="fr edu-menu-panel">*/}
{/*<ul>*/} {/*<ul>*/}

@ -1676,7 +1676,7 @@ class Trainingjobsetting extends Component {
} }
<Link <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link> to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin()?this.state.code_review===true?"": <Link {this.props.isAdmin()?this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"": <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>代码查重</Link> : ""} to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>代码查重</Link> : ""}
<style>{ <style>{

@ -401,7 +401,7 @@ class Workquestionandanswer extends Component {
className="active" className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link> to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin()? {this.props.isAdmin()?
this.state.code_review===true?"":<Link this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"":<Link
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`} // to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}> to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link>:""} 代码查重</Link>:""}

@ -1,5 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {getImageUrl} from 'educoder'; import {getImageUrl,markdownToHTML} from 'educoder';
import DetailTop from './DetailTop.js'; import DetailTop from './DetailTop.js';
import DetailCards from './DetailCards.js' import DetailCards from './DetailCards.js'
import AddCollaborators from "./addCollaborators.js"; import AddCollaborators from "./addCollaborators.js";
@ -342,9 +342,7 @@ class PathDetailIndex extends Component{
<div className="color-grey-6 clearfix"> <div className="color-grey-6 clearfix">
<div id="shixuns_propaedeutics" className="new_li fl" style={{"padding":" 0px","textAlign": "justify;"}}> <div id="shixuns_propaedeutics" className="new_li fl" style={{"padding":" 0px","textAlign": "justify;"}}>
{detailInfoList === undefined ? "" :detailInfoList.description===null?"": {detailInfoList === undefined ? "" :detailInfoList.description===null?"":
<textarea> <div dangerouslySetInnerHTML={{__html: markdownToHTML(detailInfoList.description).replace(/▁/g,"▁▁▁")}}></div>
{detailInfoList.description}
</textarea>
} }
</div> </div>
</div> </div>

@ -1,6 +1,6 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {getUrl} from 'educoder'; import {getUrl,markdownToHTML} from 'educoder';
import {Input} from 'antd'; import {Input} from 'antd';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";

Loading…
Cancel
Save