杨树林 6 years ago
commit 5da56cfec9

@ -75,12 +75,16 @@ class WorkDetailPageHeader extends Component{
return(
<React.Fragment>
<div>
<div className="newMain clearfix worklist1">
<div className="newMain clearfix worklist1 workDetailPageHeader">
<div className={"educontent mt20"}>
<style>{`
.memoContent {
background: #fff;
}
.workDetailPageHeader .summaryname {
line-height: 20px;
margin-top: 13px;
}
`}</style>
<CBreadcrumb items={[
{ to: `/courses/${courseId}`, name: course_name},
@ -93,7 +97,7 @@ class WorkDetailPageHeader extends Component{
]}></CBreadcrumb>
<div style={{ width:'100%',height:'52px'}} >
<span className=" fl color-black summaryname">
<span className=" fl color-black summaryname" style={{}}>
{homework_name}
{/* <Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link> */}
</span>

@ -135,6 +135,10 @@ class ShixunStudentWork extends Component {
this.setState({
duplicatechecking: true
})
notification.open({
message:"提示",
description: response.data.message
});
}
if (response.data.status === -1) {
@ -144,6 +148,8 @@ class ShixunStudentWork extends Component {
});
}
}).catch((error) => {
console.log(error)
});
@ -197,6 +203,10 @@ class ShixunStudentWork extends Component {
this.setState({
duplicatechecking: true
})
notification.open({
message:"提示",
description: response.data.message
});
}
if (response.data.status === -1) {

@ -95,7 +95,7 @@ class ShixunWorkDetails extends Component {
</div>
<div className="padding10-30 edu-back-white clearfix" style={{
padding: '10px 2px'
padding: '10px 13px'
}}>
<span className="fl color-orange font-14">非编程类型任务不参与查重</span>
<span className="fr mt4">

@ -143,7 +143,7 @@ class ShixunWorkReport extends Component {
<div className="stud-class-set bor-bottom-greyE">
<div className="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitle ml20">总体评价</div>
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">总体评价</div>
<ConclusionEvaluation
data={data}
@ -155,7 +155,7 @@ class ShixunWorkReport extends Component {
<div className="stud-class-set">
<div className="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitle ml20">阶段成绩</div>
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">阶段成绩</div>
<OfficialAcademicTranscript
data={data}
@ -169,7 +169,7 @@ class ShixunWorkReport extends Component {
style={{display:data&&data.work_description===null?"none":""}}
>
<div className="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitle ml20">个人总结</div>
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">个人总结</div>
<style>
{`
.personalsummary{
@ -203,7 +203,7 @@ class ShixunWorkReport extends Component {
<div className="stud-class-set bor-bottom-greyE">
<div className="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitle ml20">图形统计</div>
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">图形统计</div>
<Shixunechart
data={data}
/>
@ -213,7 +213,7 @@ class ShixunWorkReport extends Component {
<div className="stud-class-set bor-bottom-greyE">
<div className="clearfix edu-back-white poll_list pad40px">
<div className="font-16 color-dark-21 shixunreporttitle ml20">实训详情</div>
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">实训详情</div>
<style>
{`
.poll_list a{

@ -50,14 +50,20 @@ class ShixunCustomsPass extends Component {
.backgroud4CACFF{
background: #4CACFF;
}
.fontpass{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 346px;
}
`}
</style>
<span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF">
<i className="fa fa-code font-16 color_white"></i>
</span>
<span className="fl mt3 font-14">
<span className="fl mt3 font-14 fontpass">
<span className="font-bd mr15">{record.customs.position}</span>
<span className={"font-14"}>{record.customs.subject}</span>
<span className={"font-14"} title={record.customs.subject}>{record.customs.subject}</span>
</span>
</span>
),

@ -180,6 +180,7 @@ class ShixunWorkModal extends Component{
group_ids: group_ids,
})
.then((response) => {
// console.log(this.props)
if (response.data.status === 0) {
this.props.updatas()
this.props.issCancel()
@ -187,7 +188,7 @@ class ShixunWorkModal extends Component{
message:"提示",
description: response.data.message
});
console.log(this.props)
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work`);
}else if(response.data.status === -1){
notification.open({
message:"提示",
@ -223,7 +224,7 @@ class ShixunWorkModal extends Component{
let {course_groups,group_ids,onChangetype,group_list}=this.state;
// let {data}=this.props;
// console.log(group_list)
console.log(group_list)
// console.log(group_list)
return(
<div>
<Modal

@ -217,7 +217,7 @@ class TraineetraininginformationModal extends Component {
<span className="ml10 " style={{"text-align": "left","color":'#29BD8B'}} >经验值<span style={{"color":'#29BD8B'}}> {this.props.experience=== undefined?"0" :this.props.experience}/</span><span style={{"color":'#29BD8B'}}>{this.props.viewtrainingdata === undefined ? "" : this.props.viewtrainingdata.shixun_score}</span></span>
</div>
{/*<Button type="primary" className="ml30" >实训报告</Button>*/}
<Button type="primary" className="lh38 fr" style={{"text-align": "center","width": "100px",color: "#fff"}} href={`/courses/${this.props.coursesId}/shixun_homeworks/${this.props.viewtrainingdata.work_id}/shixun_work_report`}>
<Button type="primary" target="_blank" className="lh38 fr" style={{"text-align": "center","width": "100px",color: "#fff"}} href={`/courses/${this.props.coursesId}/shixun_homeworks/${this.props.viewtrainingdata.work_id}/shixun_work_report`}>
实训报告
</Button>
{/*这里到时候要做判断*/}

@ -57,9 +57,10 @@ class OfficialAcademicTranscript extends Component {
title: '任务名称',
dataIndex: 'taskname',
key: 'taskname',
className:"TaskForms",
render: (text, record) => (
<span>
<span className={"task-hide"} style={{color:"#676767"}}><a className="tasknameName font-14" onClick={()=>this.myjumptopic("id"+record.customs)} >{record.taskname.name}</a></span>
<span className={"task-hide"} style={{color:"#676767"}}><a className="tasknameName font-14" onClick={()=>this.myjumptopic("id"+record.customs)} title={record.taskname.name} >{record.taskname.name}</a></span>
{record.taskname.complete_status===2?<span className={"tasknamebox ml10"}>延时</span>:record.taskname.complete_status===3?<span className={"tasknameboxs ml10"}></span>:""}
</span>
),
@ -152,17 +153,30 @@ class OfficialAcademicTranscript extends Component {
font-size:14px;
}
.task-hide{
max-width: 345px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 345px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ant-table-tbody > tr{
height:64px;
}
.tasknameName:link{color:#676767}
.tasknameName:hover{color:#4CACFF}
.tasknameName{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 500px;
text-align: left !important;
}
.TaskForms{
width: 500px;
}
.TaskForms.ant-table-header-column{
width: 100%;
text-align: center;
}
`}
</style>
{datas===undefined?"":<Table

@ -212,7 +212,7 @@ class Index extends Component {
<MainContentContainer
onDrawerButtonClick={this.onDrawerButtonClick}
grade={context.grade}
allowed_unlock={context.allowed_unlock}
user={context.user}
power={context.power}
myshixun_manager={context.myshixun_manager}

@ -91,7 +91,7 @@ class UpdateDrawer extends Component {
// const url = `/myshixuns/${myshixun.identifier}/stages/${game.identifier}/system_update`
// const url = `/api/v1/games/${game.identifier}/system_update?myshixun_id=${myshixun.id}`
const url = `/tasks/${game.identifier}/system_update?myshixun_id=${myshixun.id}`
const url = `/tasks/${game.identifier}/system_update.json?myshixun_id=${myshixun.id}`
this.setState({ loading: true })
axios.get(url, {
// withCredentials: true,

@ -234,8 +234,8 @@ class CodeEvaluateView extends Component {
</React.Fragment>
) :
<p className="color-orange -task-testline pl20">
{ allowed_unlock === true ? '隐藏测试集,暂不支持解锁和查看。' : '此为隐藏测试项。'}
{ power === 0 ? <a href="javascript:void(0)" className="color_white test_set_data"
{ !allowed_unlock ? '隐藏测试集,暂不支持解锁和查看。' : '此为隐藏测试项。'}
{ (power === 0 && allowed_unlock == true) ? <a href="javascript:void(0)" className="color_white test_set_data"
onClick={()=>showDialog({ contentText, callback: testSetUnlock , moreButtonsRender})}
style={{"textDecoration": "underline"}}>解锁</a> : '' }
</p>

@ -81,10 +81,10 @@ class LeftViewContainer extends Component {
if ( tabIndex === 2 && this.state.gameAnswer === '') { // 参考答案
// 多级答案后换了接口
// 选择题(st === 1)还是走以前的接口
if (true || (this.props.st === 0)) {
if ((this.props.st === 0)) {
this.fetchIfCouldGetAnswerWithoutGoldForMultiLevelAnswer()
} else if (this.props.st === 1) {
this.fetchIfCouldGetAnswerWithoutGold();
this.fetchIfCouldGetAnswerWithoutGoldForChoose();
}
return;
}
@ -337,7 +337,41 @@ class LeftViewContainer extends Component {
console.log(error);
});
}
fetchIfCouldGetAnswerWithoutGold() {
// 选择题查看答案
fetchIfCouldGetAnswerWithoutGoldForChoose() {
const url = `/tasks/${this.props.game.identifier}/get_choose_answer.json`
axios.get(url, {
// withCredentials: true,
})
.then((response) => {
if (response.data.status == 0) {
this.props.showSnackbar(response.data.message)
return;
}
/*
将扣除XXX点金币是否确认查看答案     
已经过职业认证的教师可以免金币查看答案哟
继续查看 立即认证新开页
*/
// 答案测试 TODO
// if (false && response.data.view_answer === true) {
if (response.data.choose_answers) {
this.showAnswer(response.data.choose_answers)
} else if (response.data.status == 1) {
// 三个角色 普通用户、未认证教师、已认证教师,这里要区分普通用户和未认证教师用户
this.setState({
dialogOpen: true,
})
}
})
.catch(function (error) {
console.log(error);
});
return;
// 查看是否有权限直接查看true可以直接查看false需要扣金币查看
// var getAnswerUrl = `/api/v1/games/${this.props.game.identifier}/answer`;
var getAnswerUrl = `/tasks/${this.props.game.identifier}/answer.json`
@ -445,12 +479,16 @@ class LeftViewContainer extends Component {
const challenge_score = this.props.challenge.score
// 前端计算扣除金币数
let goldToMinuse = 0
for (let i = 0; i < lockedAnswers.length; i++) {
let answer = lockedAnswers[i];
goldToMinuse = goldToMinuse + answer.score * challenge_score / 100;
if (answer.id == paramSelectID) {
break;
if (this.state.isMultiLevelAnswer) {
for (let i = 0; i < lockedAnswers.length; i++) {
let answer = lockedAnswers[i];
goldToMinuse = goldToMinuse + answer.score * challenge_score / 100;
if (answer.id == paramSelectID) {
break;
}
}
} else {
goldToMinuse = challenge_score
}
this.props.readGameAnswer({
@ -474,39 +512,26 @@ class LeftViewContainer extends Component {
console.log(error);
});
}
handleDialogReadAnswer(selectID) {
this.handleMultiLevelAnswer(selectID || this.state.singleAnswerId)
return ;
if (this.state.isMultiLevelAnswer) {
}
if (selectID) {
}
// var getAnswerUrl = `/api/v1/games/${this.props.game.identifier}/answer_grade`
var getAnswerUrl = `/tasks/${this.props.game.identifier}/answer_grade.json`
axios.get(getAnswerUrl, {
getChooseAnswer = () => {
const url = `/tasks/${this.props.game.identifier}/unlock_choose_answer.json`
axios.get(url, {
// withCredentials: true,
})
.then((response) => {
// {message: "您没有足够的金币", status: -1}
if (response.data.status == 0) {
this.props.showSnackbar(response.data.message)
this.props.showSnackbar(response.data.message)
return;
}
const gameAnswer = response.data.answer;
const final_score = response.data.final_score;
const gameAnswer = response.data.choose_answers;
// const final_score = response.data.final_score;
const grade = response.data.grade;
this.props.readGameAnswer({
final_score,
grade,
// final_score,
grade: this.props.grade - this.props.challenge.score
})
this.showAnswer(gameAnswer)
@ -516,6 +541,14 @@ class LeftViewContainer extends Component {
console.log(error);
});
}
handleDialogReadAnswer(selectID) {
if (this.props.st === 1) {
// 选择题
this.getChooseAnswer()
} else {
this.handleMultiLevelAnswer(selectID || this.state.singleAnswerId)
}
}
createNewComment = (page) => {
const flag = this.props.createNewComment(page)
if (flag === true) {

Loading…
Cancel
Save