hjm 5 years ago
commit c633f4e5c6

@ -29,7 +29,7 @@ const env = getClientEnvironment(publicUrl);
module.exports = {
// You may want 'eval' instead if you prefer to see the compiled output in DevTools.
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
// devtool: "source-map", // 开启调试
devtool: "source-map", // 开启调试
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS.

@ -249,10 +249,10 @@ class ShixunModal extends Component{
}
<ul className="clearfix greybackHead edu-txt-center">
<li className="fl with40 paddingleft22" >实训名称</li>
<li className="fl with30 edu-txt-left">使用院校</li>
<li className="fl with10">使用人数</li>
<li className="fl with10">评价等级</li>
<li className="fl with10"></li>
<li className="fl with25 edu-txt-left">院校</li>
<li className="fl with11">学习人数</li>
<li className="fl with11">难度</li>
<li className="fl with11"></li>
</ul>
@ -271,6 +271,10 @@ class ShixunModal extends Component{
margin-top:0px !important;
height: 40px;
}
.with11{
width: 11%;
box-sizing: border-box;
}
`
}
</style>
@ -290,11 +294,11 @@ class ShixunModal extends Component{
<span style={{"textAlign":"left","color":"#05101A"}} className="task-hide color-grey-name">{item.shixun_name}</span>
</Checkbox>
</li>
<li className="fl with30 edu-txt-left task-hide paddingl5">{item.school_users}</li>
<li className="fl with10 paddingl10">{item.myshixuns_count}</li>
<li className="fl with10 color-orange-tip paddingl10">{item.preference}</li>
<li className="fl with25 edu-txt-left task-hide paddingl5">{item.school}</li>
<li className="fl with11 paddingl10">{item.myshixuns_count}</li>
<li className="fl with11 color-orange-tip paddingl10">{item.level}</li>
<Tooltip title="新窗口查看详情">
<li className="fl with10"><a className="color-blue" href={"/shixuns/"+item.identifier+"/challenges"} target="_blank">详情</a></li>
<li className="fl with11"><a className="color-blue" href={"/shixuns/"+item.identifier+"/challenges"} target="_blank">详情</a></li>
</Tooltip>
</div>
)

@ -172,7 +172,9 @@ class Exercisestatisticalresult extends Component {
.bor-greyE{
border: 1px solid #EEEEEE!important;
}
.padtop24{
padding-top: 24px;
}
`}
</style>
@ -191,7 +193,7 @@ class Exercisestatisticalresult extends Component {
{/*<span className="markdown-body" dangerouslySetInnerHTML={createMarkup(item.ques_title)}></span>*/}
</div>
</div>
<div className="fr shixunreporttitles">正确率<span style={{color:'#FF6800'}}> {item.right_percent}%</span></div>
<div className="fr shixunreporttitles mt3">正确率<span style={{color:'#FF6800'}}> {item.right_percent}%</span></div>
</div>
{item.ques_type===5?
@ -199,9 +201,10 @@ class Exercisestatisticalresult extends Component {
return(
<div className={"mt20"}>
<div className="clearfix edu-back-white poll_list" style={{padding: '0px 20px'}}>
<div className="font-16 shixunreporttitle fl" >
<div className="font-16 shixunreporttitle fl padding20">
<span>{ite.challenge_position}{ite.challenge_name}</span>
</div>
<div className="fr shixunreporttitles padtop24">正确率<span style={{color:'#FF6800'}}>{ite.challenge_percent}%</span></div>
</div>
<Exercisetablesmubu
data={ite.challenge_details}
@ -227,7 +230,7 @@ class Exercisestatisticalresult extends Component {
<div className="mb40 edu-txt-center padding20-30"
style={
{
display: data&&data===undefined?1:data&&data.commit_results.length< 10 ? 'none' : 'block'
display: data&&data===undefined?1:data&&data.questions_count.length< 10 ? 'none' : 'block'
}
}>

@ -169,7 +169,12 @@ class Testpapersettinghomepage extends Component{
Loadtype:false
})
}
DownloadType=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
@ -187,7 +192,7 @@ class Testpapersettinghomepage extends Component{
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
modalsType={this.DownloadType}
/>
<div className={"educontent mb20"} style={{width:"1200px"}}>
{/* 公用的提示弹框 */}

@ -1360,13 +1360,6 @@ class Listofworks extends Component {
// });
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
@ -1376,7 +1369,7 @@ class Listofworks extends Component {
let {columns,computeTimetype, page, boolgalist,limit,experience,course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state;
//
// console.log(teacherdata&&teacherdata.shixun_identifier)
// console.log(course_group_info)
// console.log(this.props.teacherdata&&this.props.teacherdata.publish_immediately)
// console.log(JSON.stringify(this.props));
return (
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
@ -1512,7 +1505,7 @@ class Listofworks extends Component {
<li className="clearfix ">
<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>
{computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
{this.props.teacherdata&&this.props.teacherdata.publish_immediately===false&&computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}>
计算成绩

@ -2,19 +2,24 @@ import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn} from 'educoder';
import axios from 'axios';
import {
notification
} from "antd";
import '../css/members.css';
import "../common/formCommon.css";
import '../css/Courses.css';
import './style.css';
import '../css/busyWork.css'
import '../poll/pollStyle.css'
import '../css/busyWork.css';
import '../poll/pollStyle.css';
import Listofworks from "./Listofworks";
import Listofworksstudentone from './Listofworksstudentone'
import Trainingjobsetting from './Trainingjobsetting'
import Workquestionandanswer from './Workquestionandanswer'
import Listofworksstudentone from './Listofworksstudentone';
import Trainingjobsetting from './Trainingjobsetting';
import Workquestionandanswer from './Workquestionandanswer';
import CoursesListType from '../coursesPublic/CoursesListType';
import ShixunStudentWork from "./ShixunStudentWork";
import Startshixuntask from "../coursesPublic/Startshixuntask";
import HomeworkModal from "../coursesPublic/HomeworkModal";
import moment from 'moment';
class ShixunHomeworkPage extends Component {
constructor(props) {
@ -71,12 +76,190 @@ class ShixunHomeworkPage extends Component {
shixuntypes: types[3]
})
}
//立即发布
homeworkstart = () => {
debugger
let homeworkid = this.props.match.params.homeworkid;
let url = "/homework_commons/" + homeworkid + "/publish_groups.json";
axios.get(url).then((response) => {
if (response.status === 200) {
let starttime = this.props.getNowFormatDates(1);
let endtime = this.props.getNowFormatDates(2);
this.setState({
modalname: "立即发布",
modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
svisible: true,
Topval:"学生将立即收到作业",
// Botvalleft:"暂不发布",
Botval:`本操作只对"未发布"的分班有效`,
starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime: "截止时间:" + endtime,
starttimes:starttime,
typs:"start",
Cancelname: "暂不发布",
Savesname: "立即发布",
Cancel: this.homeworkhide,
Saves: this.homeworkstartend,
course_groups: response.data.course_groups,
})
}
}).catch((error) => {
console.log(error)
});
}
getcourse_groupslist = (id) => {
this.setState({
course_groupslist: id
})
}
isupdatas = () => {
// var homeworkid = this.props.match.params.homeworkid;
// // this.Gettitleinformation(homeworkid);
// this.Getalistofworks(homeworkid);
}
homeworkhide = () => {
this.isupdatas()
this.setState({
modalname: undefined,
modaltype: undefined,
svisible: false,
Topval: undefined,
Topvalright: undefined,
Botvalleft: undefined,
Botval: undefined,
starttime: undefined,
endtime: undefined,
Cancelname: undefined,
Savesname: undefined,
Cancel: undefined,
Saves: undefined,
StudentList_value: undefined,
addname: undefined,
addnametype: false,
addnametab: undefined,
course_groupyslstwo: undefined,
typs:undefined,
starttimes:undefined,
})
}
// 立即发布
homeworkstartend = (ds,endtime) => {
var homeworkid = this.props.match.params.homeworkid;
let {course_groupslist} = this.state;
let coursesId = this.props.match.params.coursesId;
let url = "/courses/" + coursesId + "/homework_commons/publish_homework.json";
axios.post(url, {
homework_ids: [homeworkid],
group_ids: course_groupslist,
end_time:endtime,
}).then((result) => {
if (result.status === 200) {
if (result.data.status === 0) {
notification.open({
message: "提示",
description: result.data.message
});
this.homeworkhide()
}
}
}).catch((error) => {
console.log(error);
})
}
//立即截止
homeworkends = () => {
let homeworkid = this.props.match.params.homeworkid;
let url = "/homework_commons/" + homeworkid + "/end_groups.json";
axios.get(url).then((response) => {
if (response.status === 200) {
this.setState({})
this.setState({
modalname: "立即截止",
modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
svisible: true,
Topval:"学生将不能再提交作业",
// Botvalleft:"暂不截止",
Botval:`本操作只对"提交中"的分班有效`,
Cancelname: "暂不截止",
Savesname: "立即截止",
Cancel: this.homeworkhide,
Saves: this.coursetaskend,
starttime: undefined,
endtime: undefined,
course_groups: response.data.course_groups,
typs:"end",
})
}
}).catch((error) => {
console.log(error)
});
}
//立即截止确定按钮
coursetaskend = () => {
var homeworkid = this.props.match.params.homeworkid;
let {course_groupslist} = this.state;
const cid = this.props.match.params.coursesId;
let url = "/courses/" + cid + "/homework_commons/end_homework.json";
axios.post(url, {
group_ids: course_groupslist,
homework_ids: [homeworkid],
})
.then((response) => {
if (response.data.status == 0) {
notification.open({
message: "提示",
description: response.data.message
});
this.homeworkhide()
}
})
.catch(function (error) {
console.log(error);
});
}
render() {
let {tab, jobsettingsdata, teacherdata} = this.state;
const isAdmin = this.props.isAdmin();
return (
<div className="newMain clearfix ">
{/*立即发布*/}
<HomeworkModal
modaltype={this.state.modaltype}
modalname={this.state.modalname}
visible={this.state.svisible}
Topval={this.state.Topval}
Topvalright={this.state.Topvalright}
Botvalleft={this.state.Botvalleft}
Botval={this.state.Botval}
starttime={this.state.starttime}
endtime={this.state.endtime}
Cancelname={this.state.Cancelname}
Savesname={this.state.Savesname}
Cancel={this.state.Cancel}
Saves={this.state.Saves}
course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes}
typs={this.state.typs}
/>
<div className={"educontent mb20"} style={{width: "1200px"}}>
<div className="educontent mb20">

@ -501,13 +501,6 @@ class ShixunStudentWork extends Component {
// console.log(error)
// });
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}

@ -94,12 +94,6 @@ class ShixunWorkReport extends Component {
}
}
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
let{data} =this.state;
let category_id=data===undefined?"":data.category.category_id;

@ -1714,12 +1714,7 @@ class Trainingjobsetting extends Component {
// });
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
testscripttip =(e)=>{
if(e === 0){
this.setState({

@ -344,12 +344,6 @@ class Workquestionandanswer extends Component {
// console.log(error)
// });
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}

@ -20,6 +20,12 @@ class DownloadMessage extends Component {
window.open(`/users/${this.props.user.login}/private_messages`)
}
DownloadType=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
Downloadcal=()=>{
this.setState({
DownloadType:false,

@ -58,7 +58,8 @@ export default class TPMchallengesnew extends Component {
marktype:false,
editPracticesendtype:false,
CreatePracticesendtype:false,
exec_time:20
exec_time:20,
shixunExec_timeType:false
}
}
@ -212,6 +213,13 @@ export default class TPMchallengesnew extends Component {
this.props.showSnackbar("技能标签为空")
return
}
if(exec_time===null||exec_time===undefined||exec_time===""){
this.setState({
shixunExec_timeType:false
})
return
}
const exercise_editormdvalue = this.exercisememoMDRef.current.getValue().trim();
let id = this.props.match.params.shixunId;
@ -329,6 +337,14 @@ export default class TPMchallengesnew extends Component {
})
return
}
if(exec_time===null||exec_time===undefined||exec_time===""){
debugger
this.setState({
shixunExec_timeType:false
})
return
}
axios.put(url, {
tab:0,
identifier:id,
@ -394,6 +410,8 @@ export default class TPMchallengesnew extends Component {
)
})
console.log(this.state.shixunExec_timeType )
return (
<React.Fragment>
<div className="educontent mt30 mb30">
@ -572,11 +590,14 @@ export default class TPMchallengesnew extends Component {
<div className="edu-back-white padding40-20 mb20">
<p className="color-grey-6 font-16 mb30">服务配置</p>
<div className="clearfix mb5">
<span className="mr30 color-orange pt10">*</span>
<span className="color-orange pt10 fl">*</span>
<label className="panel-form-label fl">评测时限(S)</label>
<div className="pr fl with80 status_con">
<input value={this.state.exec_time} className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" onInput={this.setexec_time}/>
</div>
<span
className={this.state.shixunExec_timeType === true ? "color-orange mt8 fl block ml20" : "color-orange mt8 fl none"}
id="new_shixun_name"><i className="fa fa-exclamation-circle mr3"></i></span>
<div className="cl"></div>
</div>
</div>

Loading…
Cancel
Save