杨树明 5 years ago
commit 10fa6d9c7c

@ -6,7 +6,7 @@
"@flatten/array": "^1.1.7",
"@icedesign/base": "^0.2.5",
"@novnc/novnc": "^1.1.0",
"antd": "^3.6.5",
"antd": "^3.20.1",
"array-flatten": "^2.1.2",
"autoprefixer": "7.1.6",
"axios": "^0.18.0",

@ -1799,7 +1799,20 @@ ol.linenums{margin-top:0;margin-bottom:0}li.L1,li.L3,li.L5,li.L7,li.L9{backgroun
.page--body {
margin-top: 54px;
}
#myshixun_top {
display: flex;
height: 54px;
}
.yslflexhome {
display: flex;
flex-direction: row;
}
.yslflexhomes {
display: flex;
flex-direction: row;
}
#games_repository_contents,
.cm-s-railscasts .CodeMirror-gutters,
.split-panel--second {

@ -455,7 +455,7 @@ li.li-width7{width: 7%;text-align: left}
.top-black-trangle{display: block;border-width: 8px;position: absolute;top: -16px;right: 4px;border-style: dashed solid dashed dashed;border-color: transparent transparent rgba(5,16,26,0.6) transparent;font-size: 0;line-height: 0;}
.right-black-trangle{display: block;border-width: 8px;position: absolute;top: 10px;right: -16px;border-style: dashed solid dashed dashed;border-color: transparent transparent transparent rgba(5,16,26,0.6);font-size: 0;line-height: 0;}
.activity-nav.active{color: #4CACFF!important;}
.yslinvitetip{right: 140px;color: #fff; box-sizing: border-box;width: 170px;text-align: center;border-radius: 2px;background-color: rgba(5,16,26,0.6)}
.courseNewNum{display: block;background: #FF6800;border-radius:30px;padding:0px 2px;color: #fff!important;font-size: 11px;
height: 16px;line-height: 15px;min-width: 12px;text-align: center;margin-top: 17px;}

File diff suppressed because one or more lines are too long

@ -209,7 +209,7 @@ const UsersInfo = Loadable({
// 兴趣页面
const Interestpage = Loadable({
loader: () => import('./modules/user/Interestpage'),
loader: () => import('./modules/login/EducoderInteresse'),
loading: Loading,
})
@ -301,7 +301,10 @@ class App extends Component {
<Route
path="/changepassword" component={EducoderLogin}
/>
<Route
path="/interesse" component={Interestpage}
/>
<Route path="/shixuns/new" component={Newshixuns}>
</Route>

@ -21,6 +21,7 @@ function locationurl(list){
const debugType =window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin'
window._debugType = debugType;
// const debugType ="";
export function initAxiosInterceptors(props) {
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation
@ -145,7 +146,10 @@ export function initAxiosInterceptors(props) {
}
if (response.data.status === 402) {
locationurl(response.data.url);
debugger
console.log(response.data.status);
console.log(response.data);
locationurl(response.data.message);
}

File diff suppressed because one or more lines are too long

@ -73,6 +73,10 @@ const WrappedCoursesNewApp= Loadable({
loading: Loading,
})
const ShixunHomeworkPage =Loadable({
loader: () => import('./shixunHomework/ShixunHomeworkPage'),
loading: Loading,
})
//实训作业
const ShixunHomework= Loadable({
loader: () => import('./shixunHomework/shixunHomework'),
@ -95,7 +99,6 @@ const Listofworks= Loadable({
// loader: () => import('./shixunHomework/Listofworksstudentone'),
// loading: Loading,
// })
//实训作业列表完成的
const Studenthascompleted= Loadable({
loader: () => import('./shixunHomework/Listofworksstudentone'),
@ -720,12 +723,12 @@ class CoursesIndex extends Component{
{/*实训查重列表*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/student_work"
render={
(props) => (<ShixunStudentWork {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/student_work"
render={
(props) => (<ShixunStudentWork {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
@ -744,24 +747,29 @@ class CoursesIndex extends Component{
{/*教师列表*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/list"
render={
(props) => (<Listofworks {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/list"
render={
(props) => (<Listofworks {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*实训作业page*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/Page"
render={
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*实训作业设置*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/settings"
render={
(props) => (<Trainingjobsetting {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/settings"
render={
(props) => (<Trainingjobsetting {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*/!*实训作品列表教师*!/*/}
@ -790,13 +798,13 @@ class CoursesIndex extends Component{
{/*实训学生作品列表已公布*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/openlist"
render={
(props) => (<Studenthascompleted {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*实训学生作品列表已公布*/}
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/openlist"
render={
(props) => (<Studenthascompleted {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
@ -805,14 +813,14 @@ class CoursesIndex extends Component{
{/*实训作业问答主目录*/}
<Route path="/courses/:coursesId/shixun_homeworks/:homeworkid/questions"
render={
(props) => (<Workquestionandanswer {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>
{/*实训作业问答子目录*/}
<Route path="/courses/:coursesId/shixun_homework/:homeworkid/questions"
render={
(props) => (<Workquestionandanswer {...this.props} {...props} {...this.state} />)
(props) => (<ShixunHomeworkPage {...this.props} {...props} {...this.state} />)
}
></Route>

@ -150,7 +150,9 @@ class CommonWorkDetailIndex extends Component{
]}></CBreadcrumb>
<div style={{ width:'100%',height:'52px'}} >
<span className=" fl color-black summaryname" title={`${homework_name && homework_name.length > 36 ? homework_name : ''}`}>
<span className=" fl color-black summaryname" title={`${homework_name && homework_name.length > 36 ? homework_name : ''}`}
style={{height: 'auto'}}
>
{homework_name}
{/* <Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link> */}
</span>

@ -70,7 +70,7 @@ function buildColumns(that, student_works) {
render: (text, record, index) => {
return (
<span style={{ minWidth: '50px', display: 'inline-block', textAlign: 'center' }} >
{record.isMine == true ? '我' : (that.state.page - 1) * PAGE_SIZE + index + 1}
{record.isMine == true && (student_works && student_works.length) ? '我' : (that.state.page - 1) * PAGE_SIZE + index + 1}
</span>
)},
}, {

@ -92,8 +92,16 @@ class CommonWorkPost extends Component{
} else {
axios.get(url).then((response)=>{
if(response.data.course_id){
const mine = {
user_id: response.data.user_id,
user_name: response.data.user_name,
student_id: response.data.user_student_id,
group_name: response.data.group_name,
}
this.setState({
...response.data,
selectmemberslist: [mine],
memberNumMin: response.data.min_num,
memberNumMax: response.data.max_num,
})
@ -102,30 +110,6 @@ class CommonWorkPost extends Component{
console.log(error)
})
}
return
const responseData = {
"course_id": 1309,
"course_name": "计算机开发实战课-示例",
"category": {
"category_id": 11551,
"category_name": "分组作业"
},
"homework_status": [
"申诉中"
],
"homework_name": "小米便签的功能改进",
"homework_id": 7013,
"homework_type": "group",
"user_id": 15582,
"user_name": "胡莎莎",
"user_student_id": null,
"group_name": "示例A班"
}
this.setState({
...responseData
})
}
@ -420,84 +404,6 @@ class CommonWorkPost extends Component{
}).catch((error)=>{
console.log(error)
})
return
const member = {
"members": [
{
"user_id": 8686,
"user_name": "陈晓婷",
"group_name": "未分班",
"student_id": "2018201801106004",
"commit_status": false
},
{
"user_id": 46220,
"user_name": "刘恩",
"group_name": "未分班",
"student_id": "173139241573",
"commit_status": false
},
{
"user_id": 57106,
"user_name": "曾啸笛",
"group_name": "未分班",
"student_id": "184962010005",
"commit_status": false
},
{
"user_id": 57110,
"user_name": "王玉龙",
"group_name": "未分班",
"student_id": "184962710013",
"commit_status": false
},
{
"user_id": 57280,
"user_name": "陈涛",
"group_name": "未分班",
"student_id": "184962020046",
"commit_status": false
},
{
"user_id": 57341,
"user_name": "何仁杰",
"group_name": "未分班",
"student_id": "18496232002036",
"commit_status": false
},
{
"user_id": 57386,
"user_name": "王震东",
"group_name": "未分班",
"student_id": "1849620100012",
"commit_status": false
},
{
"user_id": 58337,
"user_name": "李游",
"group_name": "未分班",
"student_id": null,
"commit_status": false
},
{
"user_id": 58787,
"user_name": "彭然",
"group_name": "未分班",
"student_id": null,
"commit_status": false
},
{
"user_id": 59553,
"user_name": "李明霞",
"group_name": "未分班",
"student_id": null,
"commit_status": false
}
]
}
this.setState({
members: member.members
})
}

@ -97,7 +97,7 @@ class WorkDetailPageHeader extends Component{
]}></CBreadcrumb>
<div style={{ width:'100%',height:'52px'}} >
<span className=" fl color-black summaryname" style={{}}>
<span className=" fl color-black summaryname" style={{height: 'auto'}}>
{homework_name}
{/* <Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"}>{homework_name}</Link> */}
</span>

@ -553,19 +553,28 @@ class Coursesleftnav extends Component{
// notification.open({
// message: "删除成功",
// });
// this.props.history.replace(url);
window.location.href = url;
}
deletenavchilds=(url)=>{
deletenavchilds=(url,mainurl)=>{
axios.delete(url).then((result)=>{
if(result.data.status===0){
if(mainurl===undefined){
this.updatadeleteSecondary(result.data.right_url)
}else{
this.updatadeleteSecondary(mainurl)
}
}
}).catch((error)=>{
console.log(error)
})
}
deleteSecondary=(e,type,id)=>{
deleteSecondary=(e,type,id,mainurl)=>{
e.stopPropagation();//阻止冒泡
if(type===1){
let url="/course_second_categories/"+id+".json"
@ -593,7 +602,7 @@ class Coursesleftnav extends Component{
ModalsType:true,
Modalstopval:"该目录下的内容将被移动到父目录,",
ModalsBottomval:"是否确认删除?",
ModalSave:()=>this.deletenavchilds(url),
ModalSave:()=>this.deletenavchilds(url,mainurl),
})
}
@ -726,7 +735,7 @@ class Coursesleftnav extends Component{
{item.type==="course_group"?<div onClick={e=>this.deleteSecondary(e,2,iem.category_id)}>删除</div>:""}
{/*讨论区*/}
{item.type==="board"?<div onClick={e=>this.Navmodalnames(e,7,"editSecondname",iem.category_id,iem.category_name)}>重命名</div>:""}
{item.type==="board"?<div onClick={e=>this.deleteSecondary(e,3,iem.category_id)}>删除</div>:""}
{item.type==="board"?<div onClick={e=>this.deleteSecondary(e,3,iem.category_id,item.category_url)}>删除</div>:""}
</div>)
}

@ -40,7 +40,8 @@ class coursesHomeCard extends Component{
className="mt80 mb25"/>
<p className="font-14 color-white">非成员不能访问</p>
</div>
<a href={item.first_category_url} className="square-img" >
{/*<a href={item.first_category_url} className="square-img" >*/}
<a href={`/courses/${item.id}/students`} className="square-img" >
{/*target="_blank"*/}
{
item.is_public===1&&item.id===1309?

@ -211,15 +211,15 @@ class ShixunModal extends Component{
<a onClick={()=>this.changeTag("all")} className={ type==="all" ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>全部</a>
</li>
{
shixunmodallist && shixunmodallist.tags.map((item,key)=>{
return(
<li className="fl mr5 mt5" key={key}>
<a onClick={()=>this.changeTag(item.tag_id)} className={ parseInt(type) === parseInt(item.tag_id) ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>{item.tag_name}</a>
</li>
)
})
}
{/*{*/}
{/*shixunmodallist && shixunmodallist.tags.map((item,key)=>{*/}
{/*return(*/}
{/*<li className="fl mr5 mt5" key={key}>*/}
{/*<a onClick={()=>this.changeTag(item.tag_id)} className={ parseInt(type) === parseInt(item.tag_id) ? "active edu-filter-cir-grey font-12":"edu-filter-cir-grey font-12"}>{item.tag_name}</a>*/}
{/*</li>*/}
{/*)*/}
{/*})*/}
{/*}*/}
</div>
<div className="clearfix mb10" id="shixun_search_form_div" style={{height:"30px"}}>
@ -251,9 +251,9 @@ 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 with30 edu-txt-left">院校</li>
<li className="fl with10">学习人数</li>
<li className="fl with10">难度</li>
<li className="fl with10"></li>
</ul>
@ -292,9 +292,9 @@ 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 with30 edu-txt-left task-hide paddingl5">{item.school}</li>
<li className="fl with10 paddingl10">{item.myshixuns_count}</li>
<li className="fl with10 color-orange-tip paddingl10">{item.preference}</li>
<li className="fl with10 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>
</Tooltip>

@ -159,8 +159,8 @@ class Startshixuntask extends Component{
{this.props.isStudent?
<span>
{this.props.data.task_operation&&this.props.data.task_operation?startbtn===false?<span onClick={()=>this.taskoperationId( this.props.data.task_operation[1])}>
{this.props.data.task_operation[0]}
{this.props.data&&this.props.data.task_operation&&this.props.data.task_operation?startbtn===false?<span onClick={()=>this.taskoperationId( this.props.data&&this.props.data.task_operation[1])}>
{this.props.data&&this.props.data.task_operation[0]}
</span>:"":""}
</span>:""
}

@ -891,37 +891,34 @@ class GraduationTaskssettingapp extends Component{
}
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.refs.DownloadMessage.confirmysl(url);
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
render(){
const { getFieldDecorator } = this.props.form;
@ -999,9 +996,7 @@ class GraduationTaskssettingapp extends Component{
{/*/>*/}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
ref="DownloadMessage"
/>
<HomeworkModal
starttimes={this.state.starttimes}

@ -41,7 +41,7 @@ class GraduationTaskssettinglist extends Component{
cross_comment:null,
search:null,
order:"updated_at",
b_order:"asc",
b_order:"desc",
course_group:undefined,
loadingstate:true,
operationId:null,
@ -622,7 +622,7 @@ class GraduationTaskssettinglist extends Component{
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state;
axios.get(url,{
let params ={
teacher_comment:teacher_comment,
task_status:task_status,
course_group:course_group,
@ -630,37 +630,8 @@ class GraduationTaskssettinglist extends Component{
order:order,
b_order:b_order,
search:search,
}).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
this.refs.DownloadMessage.confirmysl(url,params);
}
render(){
@ -1010,13 +981,7 @@ class GraduationTaskssettinglist extends Component{
setupdate={this.setupdate}
/>:""}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
<DownloadMessage ref="DownloadMessage" {...this.props} />
{taskslistdata&&taskslistdata?
// 教师列表

@ -191,31 +191,32 @@ class GraduationTasksquestions extends Component{
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
this.refs.DownloadMessage.confirmysl(url);
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
Downloadcal=()=>{
this.setState({
@ -256,9 +257,7 @@ class GraduationTasksquestions extends Component{
{/*/>*/}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
ref="DownloadMessage"
/>
<HomeworkModal
starttimes={this.state.starttimes}

@ -2,8 +2,16 @@ import React, { useState, useEffect } from 'react'
import { trigger } from 'educoder'
import { Input, Checkbox } from "antd";
function CourseGroupChooser({ course_groups, isAdminOrCreator, item, index, arg_course_groups, checkAllValue
, coursesids, onCheckAllChange, joinCourseGroup }) {
/**
arg_course_groups 选中的id数组
joinCourseGroup 选中时触发 joinCourseGroup(checkedValues, item, index) 传入item数据对象index 数据对象index
checkAllValue 是否全选
onCheckAllChange 全选 onCheckAllChange(e, item, index)
course_groups 所有的group
*/
function CourseGroupChooser({ course_groups, isAdminOrCreator = true, item, index, arg_course_groups, checkAllValue, alwaysShow
, onCheckAllChange, joinCourseGroup }) {
const [state, setState] = useState({counter: 0})
const [search, setSearch] = useState('')
// useEffect(() => {
@ -30,8 +38,15 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator, item, index, arg_
that.state.checkAllArray[index] - checkAllValue
*/
console.log('arg_course_groups', arg_course_groups)
const urlStyle = {"lef":"tunset", minWidth: '262px'};
if (alwaysShow == true) {
urlStyle.display = 'block'
}
return (
<ul className="drop_down_menu" style={{"lef":"tunset", minWidth: '262px'}}>
<ul className="drop_down_menu" style={urlStyle}>
{
course_groups && course_groups.length > 10?
(<p className="drop_down_search">
@ -41,15 +56,15 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator, item, index, arg_
}
<Checkbox.Group onChange={(checkedValues) => joinCourseGroup(checkedValues, item, index)}
value={arg_course_groups.map(item => item.id)}
value={arg_course_groups.length && arg_course_groups[0].id ? arg_course_groups.map(item => item.id): arg_course_groups}
disabled={!isAdminOrCreator} className="mainGroup"
>
{course_groups && course_groups.length > 1 && <li key={'_all' + index} >
{/* 防止被外面group包裹 */}
<Checkbox.Group>
<Checkbox.Group onChange={(e) => onCheckAllChange(e, item, index)} value={[checkAllValue]}>
<Checkbox
checked={checkAllValue}
style={{ marginRight: '6px' }} onClick={(e) => onCheckAllChange(e, item, index)} onChange={() => {}}
value={true}
style={{ marginRight: '6px' }} onClick={() => {}}
>全选</Checkbox>
</Checkbox.Group>
</li>}
@ -60,9 +75,10 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator, item, index, arg_
return(
<li key={item.id} value={item.id} >
<Checkbox value={item.id}
id={`check${item.id}`}
style={{ marginRight: '6px' }}
></Checkbox>
{item.name}
<label for={`check${item.id}`}>{item.name}</label>
</li>
)
})
@ -71,7 +87,7 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator, item, index, arg_
</Checkbox.Group>
<p className="drop_down_btn">
<a href="javascript:void(0)" className="color-grey-6"
onClick={() => trigger('groupAdd', coursesids)}
onClick={() => trigger('groupAdd')}
>添加分班...</a>
</p>
</ul>

@ -0,0 +1,108 @@
import React, { useState, useEffect, useRef } from 'react'
import { trigger } from 'educoder'
import { Input, Checkbox } from "antd";
import CourseGroupChooser from '../CourseGroupChooser'
import ModalWrapper from "../../common/ModalWrapper"
import axios from 'axios'
/**
arg_course_groups 选中的id数组
joinCourseGroup 选中时触发 joinCourseGroup(checkedValues, item, index) 传入item数据对象index 数据对象index
checkAllValue 是否全选
onCheckAllChange 全选 onCheckAllChange(e, item, index)
course_groups 所有的group
*/
function CourseGroupChooserModal({ course_groups = [], isAdminOrCreator, item, index,
setVisible, visible, record = {}, props = {}, fetchAll
}) {
// , arg_course_groups, checkAllValue , onCheckAllChange, joinCourseGroup
const [checkAllValue, setCheckAllValue] = useState(true)
const [arg_course_groups, setArg_course_groups] = useState(course_groups.map(item => item.id))
const modalEl = useRef(null);
useEffect(() => {
setCheckAllValue(true)
setArg_course_groups(course_groups.map(item => item.id))
}, [course_groups, visible])
useEffect(() => {
if (visible != undefined) {
modalEl.current.setVisible(true)
}
}, [visible])
const joinCourseGroup = (checks) => {
setArg_course_groups(checks)
}
const onCheckAllChange = (e) => {
if (checkAllValue) {
setArg_course_groups([])
} else {
setArg_course_groups(course_groups.map(item => item.id))
}
setCheckAllValue(!checkAllValue)
}
const onOk = async () => {
console.log(checkAllValue, arg_course_groups)
let approval = 1
const courseId = props.match.params.coursesId
let url = `/courses/${courseId}/teacher_application_review.json`
const response = await axios.post(url, {
user_id: record.user_id,
application_id: record.application_id,
approval: approval,
group_id: arg_course_groups
})
props.showNotification(`${approval == 1? '同意' : '拒绝'}`)
fetchAll(1)
modalEl.current.setVisible(false)
}
return (
<ModalWrapper
ref={modalEl}
width="600px"
title={`同意`}
visible={visible}
onOk={onOk}
className="courseGroupChooserModal"
>
<style>{`
.courseGroupChooserModal .description {
font-size: 16px;
text-align: center;
margin-bottom: 20px;
}
.courseGroupChooserModal .drop_down_menu {
position: relative;
top: auto;
box-shadow: none;
padding: 0 20px;
background: #f2f9ff;
padding-top: 12px;
}
.courseGroupChooserModal .drop_down_menu .mainGroup.ant-checkbox-group {
width: 100%;
max-height: 300px
}
.courseGroupChooserModal .drop_down_search {
margin: 0;
margin-bottom: 10px;
}
.courseGroupChooserModal .drop_down_menu li {
padding: 0px;
}
.courseGroupChooserModal .drop_down_menu .drop_down_btn {
padding: 0px 20px;
margin: 0;
}
`}</style>
{/* <React.Fragment>
<React.Fragment> */}
<div className="description">确认同意TA的加入并设置TA的分班管理权限</div>
<CourseGroupChooser
{...{ checkAllValue, isAdminOrCreator, course_groups, arg_course_groups, item, index,
joinCourseGroup, onCheckAllChange, alwaysShow: true }}
></CourseGroupChooser>
</ModalWrapper>
)
}
export default CourseGroupChooserModal

@ -472,7 +472,7 @@ class studentsList extends Component{
const { course_group_name, invite_code } = this.state;
const courseId = this.props.match.params.coursesId
let exportUrl = "/api/courses/${courseId}/export_member_scores_excel.xlsx?"
let exportUrl = `/api/courses/${courseId}/export_member_scores_excel.xlsx?`
const params = {}
if (course_group_id) {
params.group_id = course_group_id

@ -2,6 +2,7 @@ import React,{ Component } from "react";
import { Input,Checkbox,Table, Divider, Tooltip,Spin, Menu } from "antd";
import CourseLayoutcomponent from '../common/CourseLayoutComponent'
import NoneData from "../coursesPublic/NoneData"
import Titlesearchsection from '../common/titleSearch/TitleSearchSection'
import ColorCountText from '../common/titleSearch/ColorCountText'
@ -20,6 +21,7 @@ import { from } from "array-flatten";
// import AddStudentModal from './modal/AddStudentModal'
import AddGraduationGroupModal from './modal/AddGraduationGroupModal'
import AddAdminModal from './modal/AddAdminModal'
import CourseGroupChooserModal from './modal/CourseGroupChooserModal'
import { ROLE_TEACHER_NUM, ROLE_ASSISTANT_NUM } from './common'
import CourseGroupChooser from './CourseGroupChooser'
@ -100,8 +102,7 @@ function buildColumns(that) {
{...{course_groups, isAdminOrCreator, item, index, arg_course_groups,
checkAllValue: that.state.checkAllArray[index],
joinCourseGroup: that.joinCourseGroup,
onCheckAllChange: that.onCheckAllChange,
coursesids: that.props.coursesids }}
onCheckAllChange: that.onCheckAllChange}}
></CourseGroupChooser>}
</React.Fragment> }
</span>
@ -211,10 +212,21 @@ class studentsList extends Component{
}
// approval 2 - 拒绝
onAgree = (record, approval = 1) => {
const isAdminOrCreator = this.props.isAdminOrCreator()
const { course_groups } = this.state
if (approval == 1 && isAdminOrCreator && course_groups && course_groups.length) {
this.setState({ clickRecord: record}, () => {
this.setGroupChooserModalVisible(true)
})
return;
}
const courseId = this.props.match.params.coursesId
let url = `/courses/${courseId}/teacher_application_review.json`
this.props.confirm({
content: `是否确认${ approval == 1 ? '同意' : '拒绝'}TA的加入`,
onOk: () => {
axios.post(url, {
user_id: record.user_id,
application_id: record.application_id,
@ -230,6 +242,10 @@ class studentsList extends Component{
console.log(error);
});
}
})
}
onRefuse = (record) => {
this.onAgree(record, 2)
}
@ -560,11 +576,15 @@ class studentsList extends Component{
this.fetchAll();
})
}
setGroupChooserModalVisible = (visible) => {
// 这里只会调用open
this.setState({groupChooserModalVisible: !this.state.groupChooserModalVisible})
}
render(){
const isAdmin = this.props.isAdmin()
const columns = buildColumns(this)
let {
searchValue, checkBoxValues, checkAllValue,
searchValue, checkBoxValues, checkAllValue, course_groups,
groupList, total_count, teachers, order, page, apply_size, filterKey
}=this.state
@ -616,7 +636,7 @@ class studentsList extends Component{
</React.Fragment>
}
secondRowLeft={
isAdminOrTeacher ? <div className="fl mt6 task_menu_ul ">
isAdminOrTeacher ? <div className="fl mt6 task_menu_ul " style={{ width: '600px' }}>
<Menu mode="horizontal" defaultSelectedKeys="1" onClick={this.selectedStatus}>
<Menu.Item key="1">已审批({total_count})</Menu.Item>
<Menu.Item key="2">待审批({apply_size})</Menu.Item>
@ -646,6 +666,15 @@ class studentsList extends Component{
}
`}</style>
<div className="mt20 edu-back-white padding20 teacherList">
<CourseGroupChooserModal
props={this.props}
record={this.state.clickRecord}
fetchAll={this.fetchAll}
course_groups={course_groups}
visible={this.state.groupChooserModalVisible}
setVisible={this.setGroupChooserModalVisible}
></CourseGroupChooserModal>
{filterKey == '1' && <div className="clearfix stu_head" style={{paddingLeft: '15px'}}>
{ isAdminOrTeacher && hasGraduationModule && <Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox> }
{ filterKey == '1' && <div className="studentList_operation_ul">
@ -688,6 +717,7 @@ class studentsList extends Component{
</div>}
<Spin size="large" spinning={this.state.isSpin}>
<div className="clearfix stu_table">
{combineArray.length ?
<Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
{/* pagination={{ current: page, total: total_count, pageSize:20, onChange: this.onPageChange }} */}
<Table columns={columns} dataSource={combineArray}
@ -700,6 +730,8 @@ class studentsList extends Component{
} : false}
></Table>
</Checkbox.Group>
:
<NoneData></NoneData>}
</div>
</Spin>
</div>

@ -9,6 +9,8 @@ import PollTabSecond from './PollDetailTabSecond'
import PollTabThird from './PollDetailTabThird'
import PollTabForth from './PollDetailTabForth'
import DownloadMessage from '../../modals/DownloadMessage';
import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish'
import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd'
import CancelPublish from './pollPublicBtn/CancelPublish'
@ -69,6 +71,10 @@ class PollDetailIndex extends Component{
})
}
confirmysl(url){
this.refs.DownloadMessage.confirmysl(url);
}
render(){
let {tab,pollDetail,user_permission}=this.state;
@ -76,6 +82,7 @@ class PollDetailIndex extends Component{
const isStudent = this.props.isStudent();
return(
<div className="newMain">
<DownloadMessage {...this.props} ref="DownloadMessage" />
<div className="educontent mt10 mb50">
<p className="clearfix mb20">
<WordsBtn style="grey" className="fl" to={`/courses/${this.props.match.params.coursesId}/students`}>{this.props.coursedata.name}</WordsBtn>
@ -152,7 +159,7 @@ class PollDetailIndex extends Component{
</li>
:""
} */}
<a className="fl color-blue font-16" href={`/api/polls/${this.props.match.params.pollId}/commit_result.xlsx`}>导出统计</a>
<a className="fl color-blue font-16" onClick={()=>this.confirmysl("/polls/"+this.props.match.params.pollId+"/commit_result.xlsx")} href="javascript:void(0);">导出统计</a>
</span>
}
{

@ -38,7 +38,21 @@
.problemShow:last-child{
border-bottom: none;
}
.invite-tipysls{position: absolute;top: -8px;right: 140px;color: #fff; box-sizing: border-box;width: 170px;text-align: center;border-radius: 2px;background-color: rgba(5,16,26,0.6)}
.yslinvitetip{display: block;border-width: 8px;position: absolute;top: 10px;right: -16px;border-style: dashed solid dashed dashed;border-color: transparent transparent transparent rgba(5,16,26,0.6);font-size: 0;line-height: 0;}
.right-black-trangle{border-width: 8px;position: absolute;top: 10px;left: -16px;border-style: dashed solid dashed dashed;border-color: transparent transparent transparent rgba(5,16,26,0.6);font-size: 0;line-height: 0;}
.right-black-trangles{border-width: 8px;position: absolute;top: 10px;left: -16px;border-style: dashed solid dashed dashed;border-color: transparent rgba(5,16,26,0.6) transparent transparent;font-size: 0;line-height: 0;}
.top-black-trangle{border-width: 8px;position: absolute;top: -16px;right: 4px;border-style: dashed solid dashed dashed;border-color: transparent transparent rgba(5,16,26,0.6) transparent;font-size: 0;line-height: 0;}
.invite-tipysl{color: #999999; box-sizing: border-box;text-align: center;border-radius: 2px;font-size: 14px}
.edu-position-hideysl li a:hover{ background:#F1F1F1; color:#05101A;}
.to-back-left {
width: 0;
height: 0;
margin-top: 27px;
border-right: 15px solid #FAFAFA;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
}
/* 问卷详情 */
/* 答题列表 */
.unlimit{

@ -98,7 +98,7 @@ class CommitSummary extends Component{
// console.log("提交总结接口")
// console.log(JSON.stringify(result))
// message.success(result.data.message);
this.props.history.push(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist`);
this.props.history.push(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`);
}
}).catch((error) => {
console.log(error)
@ -136,7 +136,7 @@ class CommitSummary extends Component{
</div>
<div>
<p className="ml29 fl color-black mt10 summaryname" onClick={this.asdasdsad}>提交总结</p>
<a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist`} className="color-grey-6 fr font-16 ml30 mt10">返回</a>
<a href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`} className="color-grey-6 fr font-16 ml30 mt10">返回</a>
</div>
{/*educontentbox*/}
<div className="stud-class-set pt40 pb40">
@ -155,7 +155,7 @@ class CommitSummary extends Component{
className="mdInForm">
{getFieldDecorator('description', {
rules: [{
required: true, message: '请输入帖子内容',
required: true, message: '请在此输入总结内容,最多5000个字符',
}, {
max: 5000, message: '最大限制为5000个字符',
}],
@ -171,7 +171,7 @@ class CommitSummary extends Component{
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20" >
提交
</Button>
<a className="defalutCancelbtn fl" href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist`}>取消</a>
<a className="defalutCancelbtn fl" href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/openlist?tab=0`}>取消</a>
</div>
</Form.Item>
</Form>

@ -89,7 +89,7 @@ class Homeworddescription extends Component {
{/*<TextArea placeholder="作业说明..." value={this.state.description} onInput={this.settextarea} style={{"height": "120px"}}/>*/}
{/*<TextArea style={{"height": "120px"}}*/}
{/* autoComplete="off" ></TextArea>*/}
<TPMMDEditor ref={this.mdRef} placeholder={'作业说明'}
<TPMMDEditor ref={this.mdRef} placeholder={'请输入作业说明'}
mdID={'courseMessageMD'} initValue={this.state.description} className="courseMessageMD" onChange={this.settextarea} style={{"height": "120px"}}></TPMMDEditor>
</Form.Item>
<div className="clearfix mt10">

@ -29,6 +29,7 @@ import Associationmodel from '../coursesPublic/Associationmodel';
import '../css/members.css'
import '../css/busyWork.css'
import '../poll/pollStyle.css'
import './style.css';
import moment from 'moment';
import 'moment/locale/zh-cn';
import {getImageUrl, toPath} from 'educoder';
@ -140,7 +141,6 @@ class Listofworks extends Component {
dataIndex: 'classroom',
align: 'center',
className:'font-14',
width:"260px",
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
)
@ -386,7 +386,6 @@ class Listofworks extends Component {
dataIndex: 'classroom',
align: 'center',
className:'font-14',
width:"260px",
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>
)
@ -596,6 +595,8 @@ class Listofworks extends Component {
}
componentDidMount() {
console.log("Listofworks");
console.log("componentDidMount");
var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid)
// this.Gettitleinformation(homeworkid);
@ -655,6 +656,7 @@ class Listofworks extends Component {
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);
} }
}).catch((error) => {
@ -714,6 +716,7 @@ class Listofworks extends Component {
code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
})
this.props.Getdataback(result,result.data);
this.seacthdata(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
}
}
@ -1329,31 +1332,32 @@ class Listofworks extends Component {
}
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
this.refs.DownloadMessage.confirmysl(url);
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
Downloadcal=()=>{
@ -1362,6 +1366,10 @@ class Listofworks extends Component {
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() {
// console.log("Listofworks.js000")
@ -1371,7 +1379,7 @@ class Listofworks extends Component {
// console.log(course_group_info)
// console.log(JSON.stringify(this.props));
return (
<div className="newMain clearfix ">
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{visible === true ? <ModulationModal
visible={visible}
Cancel={this.cancelModulationModel}
@ -1389,9 +1397,7 @@ class Listofworks extends Component {
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
ref="DownloadMessage"
/>
{visibles === true ?
@ -1444,99 +1450,11 @@ class Listofworks extends Component {
starttimes={this.state.starttimes}
typs={this.state.typs}
/>
<div className={"educontent mb20"}>
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"":jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{teacherdata === undefined ? "" : teacherdata.homework_name}
</p>
<CoursesListType
typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"": jobsettingsdata.data.category.category_id}`}>返回</a>
<a className="color-grey-9 fr font-16 mr20"
href={`/shixuns/${teacherdata === undefined ? "" : teacherdata.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a>
</div>
<div className={"educontent "}>
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<Link className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link>
<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 ||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.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link> : ""}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{/*{this.props.isAdmin() ? <a*/}
{/* className="fr color-blue font-16"*/}
{/* href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}*/}
{/*>导出</a> : ""}*/}
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-0px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>实训报告</a></li>
<li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)} >学生成绩</a></li>
</ul>
</li>:""}
{this.props.isAdmin() ?
teacherdata && teacherdata.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : ""
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.publish_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : ""
: ""}
{/*<a className="fr color-blue font-16" href={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/commitsummary`}>提交总结</a>*/}
{this.props.isAdmin() ?
this.state.code_review === false ?
""
: <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a> : ""}
</div>
</div>
<style>
{`
@ -1678,6 +1596,15 @@ class Listofworks extends Component {
<div className="clearfix">
<span className="fl color-grey-6 font-12"><span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.student_works.length}</span>{teacherdata === undefined ? "" : teacherdata.all_member_count} </span>
<style>
{
`
.edu-position-hide li a:hover {
background: #F0F0F0;
}
`
}
</style>
<div className="fr edu-menu-panel">
<ul>
<li className="edu-position edu-position-hidebox">
@ -1755,3 +1682,91 @@ class Listofworks extends Component {
}
export default Listofworks;
{/*<div className="educontent mb20">*/}
{/* <p className="clearfix mb20 mt10">*/}
{/* <ActionBtn className=" btn colorgrey fl hovercolorblue "*/}
{/* to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>*/}
{/* <span className="color-grey-9 fl ml3 mr3">&gt;</span>*/}
{/* <ActionBtn*/}
{/* className=" btn colorgrey fl hovercolorblue "*/}
{/* to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"":jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>*/}
{/* <span className="color-grey-9 fl ml3 mr3">&gt;</span>*/}
{/* <WordsBtn className="fl">作业详情</WordsBtn>*/}
{/* </p>*/}
{/*</div>*/}
{/*<div className="educontent mb20">*/}
{/* <p className=" fl color-black summaryname" style={{heigth:"33px"}}>*/}
{/*{teacherdata === undefined ? "" : teacherdata.homework_name}*/}
{/*</p>*/}
{/*<CoursesListType*/}
{/*typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}*/}
{/*/>*/}
{/*<a className="color-grey-9 fr font-16 summaryname ml20 mr20"*/}
{/*href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"": jobsettingsdata.data.category.category_id}`}>返回</a>*/}
{/*<a className="color-grey-9 fr font-16 mr20"*/}
{/*href={`/shixuns/${teacherdata === undefined ? "" : teacherdata.shixun_identifier}/challenges`}*/}
{/*target={"_blank"}>实训详情</a>*/}
{/*</div>*/}
// <div className="stud-class-set bor-bottom-greyE ">
// <div className=" clearfix edu-back-white poll_list">
// <a className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
// <a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
// {this.props.isAdmin() ?
// this.state.code_review === true ||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"? "" : <a
// // to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}
// onClick={(e)=>this.ChangeTab(2)}>
// 代码查重</a> : ""}
// <a
// onClick={(e)=>this.ChangeTab(3)}
// >设置</a>
// {/*{this.props.isAdmin() ? <a*/}
// {/* className="fr color-blue font-16"*/}
// {/* href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}*/}
// {/*>导出</a> : ""}*/}
// <style>{`
// .drop_down_menu li a {
// padding: 0px;
// font-size: 14px;
// }
// .drop_down_menu {
// width: 93px;
// }
// .drop_down_menu li {
// overflow: visible;
// width: 93px;
// }
// .drop_down_menu, .drop_down_normal {
// padding-top: 10px;
// padding-bottom: 8px;
// }
// a:hover {
// color:#1A0B00 !important;
// }
// `}</style>
// {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
// 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
// <ul className="drop_down_menu" style={{"right":"-0px","left":"unset","height":"auto"}}>
// <li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>实训报告</a></li>
// <li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)} >学生成绩</a></li>
//
// </ul>
// </li>:""}
// {this.props.isAdmin() ?
// teacherdata && teacherdata.end_immediately === true ?
// <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
// : ""
// : ""}
// {this.props.isAdmin() ?
// teacherdata && teacherdata.publish_immediately === true ?
// <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>
// : ""
// : ""}
// {this.props.isAdmin() ?
// teacherdata && teacherdata.code_review === true ?
// <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
// : "": ""}
{/* </div>*/}
{/*</div>*/}

@ -159,7 +159,6 @@ class Listofworksstudentone extends Component {
dataIndex: 'classroom',
align: "center",
className:'font-14',
width:'260px',
render: (text, record) => (
<span>
<span style={{
@ -316,7 +315,8 @@ class Listofworksstudentone extends Component {
}
componentDidMount() {
console.log("Listofworksstudentone");
console.log("componentDidMount");
var homeworkid = this.props.match.params.homeworkid;
this.Getalistofworks(homeworkid);
let query = this.props.location.pathname;
@ -347,7 +347,9 @@ class Listofworksstudentone extends Component {
course_group: "",
}
axios.post(urll, data).then((result) => {
if(result === undefined){
return
}
if (result.status === 200) {
if(this.props.isNotMember()===false) {
this.setState({
@ -364,6 +366,7 @@ class Listofworksstudentone extends Component {
challenges_count: result.data.challenges_count,
view_report: result.data.view_report,
})
this.props.Getdataback(result,result.data);
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(result.data);
} else {
@ -421,6 +424,7 @@ class Listofworksstudentone extends Component {
challenges_count:result.data.challenges_count,
view_report:result.data.view_report,
})
this.props.Getdataback(result,result.data);
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
this.seacthdata(result.data);
} else {
@ -457,7 +461,7 @@ class Listofworksstudentone extends Component {
else if(item.title==="效率分"){
}
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
@ -550,6 +554,8 @@ class Listofworksstudentone extends Component {
}
}
// console.log("554");
// console.log(columns2);
this.setState({
@ -577,7 +583,7 @@ class Listofworksstudentone extends Component {
}
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
@ -640,6 +646,8 @@ class Listofworksstudentone extends Component {
}
// console.log("datalistdatalist文件");
// console.log(datalist);
// console.log("645");
// console.log(columns2);
this.setState({
data: datalist,
teacherlist: teacherlist,
@ -781,6 +789,7 @@ class Listofworksstudentone extends Component {
challenges_count:result.data.challenges_count,
view_report:result.data.view_report,
})
this.props.Getdataback(result,result.data);
this.seacthdata(result.data);
}
}
@ -833,13 +842,18 @@ class Listofworksstudentone extends Component {
});
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() {
let {visibles, game_list,columns, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;
// console.log(this.state.data);
// console.log("841");
// console.log(this.state.columns);
return (
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
// 学生不能查看别人的
<div className="newMain clearfix ">
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
<style>
{`
.startbox{
@ -908,58 +922,9 @@ class Listofworksstudentone extends Component {
: ""
}
<div className={"educontent mb20"}>
<div className="educontent mb30">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb30" style={{width: "1250px"}}>
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{teacherdata === undefined ? "" : teacherdata.homework_name}
</p>
<CoursesListType
typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回</a>
<p className="color-grey-9 fr font-16"></p>
<div className={"educontent "}>
<div className="edu-back-white" style={{width: "1200"}}>
</div>
<div className="edu-back-white" style={{width: "1250px"}}>
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<Link className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{this.state.view_report===true?<Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/shixun_work_report`}>
查看实训报告
</Link>:""}
{/*<a className="fr color-blue font-16">查看实训报告</a>*/}
{
teacherdata === undefined ? ""
: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :
<a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>
}
{teacherdata === undefined ? "" : <Startshixuntask
{...this.props}
data={teacherdata}
/>}
</div>
</div>
{computeTimetype===false?<li className="clearfix startbox mb20">
@ -974,8 +939,7 @@ class Listofworksstudentone extends Component {
<div>
<div id="graduation_work_list"
style={{
"padding": '0px 20px 10px 20px',
"margin-top": "20px",
"padding": '20px 20px 10px 20px',
"margin-bottom": "10px"
}}>
@ -1018,7 +982,7 @@ class Listofworksstudentone extends Component {
}
`}</style>
<div className="edu-table edu-back-white ">
{data === undefined ? "" : <Table
{data === undefined ? "222222" : <Table
dataSource={data}
columns={columns}
pagination={false}
@ -1048,7 +1012,7 @@ class Listofworksstudentone extends Component {
</div>
:
// 学生能查看别人的
<div className="newMain clearfix ">
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{visibles === true ?
<TraineetraininginformationModal
homeworkid={this.props.match.params.homeworkid}
@ -1088,31 +1052,7 @@ class Listofworksstudentone extends Component {
</div>
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<Link className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{this.state.view_report===true?<Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}>
查看实训报告
</Link>:""}
{
teacherdata === undefined ? ""
: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :
<a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>
}
{teacherdata === undefined ? "" : <Startshixuntask
{...this.props}
data={teacherdata}
/>}
</div>
</div>
{computeTimetype===false?<li className="clearfix startbox mb20">
<span className={"startfont"}>
@ -1135,8 +1075,7 @@ class Listofworksstudentone extends Component {
{JSON.stringify(datas) !== "[]" ?
<div>
<div id="graduation_work_list" style={{
"padding": '0px 20px 10px 20px',
"margin-top": "20px",
"padding": '20px 20px 10px 20px',
"margin-bottom": "10px"
}}>
<div className="clearfix">
@ -1284,3 +1223,48 @@ class Listofworksstudentone extends Component {
}
export default Listofworksstudentone;
{/*<div className="stud-class-set bor-bottom-greyE ">*/}
{/* <div className=" clearfix edu-back-white poll_list">*/}
{/* <a className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</a>*/}
{/* <a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>*/}
{/* <a*/}
{/* onClick={(e)=>this.ChangeTab(3)}*/}
{/* >设置</a>*/}
{/* {this.state.view_report===true?<a className="fr color-blue font-16" target={"_blank"}*/}
{/* href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/shixun_work_report`}>*/}
{/* 查看实训报告*/}
{/* </a>:""}*/}
{/* /!*<a className="fr color-blue font-16">查看实训报告</a>*!/*/}
{/* {*/}
{/* teacherdata === undefined ? ""*/}
{/* : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :*/}
{/* <a className="fr color-blue font-16"*/}
{/* href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>*/}
{/* }*/}
{/* {teacherdata === undefined ? "" : <Startshixuntask*/}
{/* {...this.props}*/}
{/* data={teacherdata}*/}
{/* />}*/}
{/* </div>*/}
{/*</div>*/}
{/*<div className="stud-class-set bor-bottom-greyE ">*/}
{/* <div className=" clearfix edu-back-white poll_list">*/}
{/* <Link className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</Link>*/}
{/* <Link onClick={(e)=>this.ChangeTab(1)}>作业问答</Link>*/}
{/* <Link onClick={(e)=>this.ChangeTab(3)}>设置</Link>*/}
{/* {this.state.view_report===true?<Link className="fr color-blue font-16" target={"_blank"}*/}
{/* to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}>*/}
{/* 查看实训报告*/}
{/* </Link>:""}*/}
{/* {*/}
{/* teacherdata === undefined ? ""*/}
{/* : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :*/}
{/* <a className="fr color-blue font-16"*/}
{/* href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>*/}
{/* }*/}
{/* {teacherdata === undefined ? "" : <Startshixuntask*/}
{/* {...this.props}*/}
{/* data={teacherdata}*/}
{/* />}*/}
{/* </div>*/}
{/*</div>*/}

@ -0,0 +1,264 @@
import React, {Component} from "react";
import {Link, NavLink} from 'react-router-dom';
import {WordsBtn, ActionBtn} from 'educoder';
import axios from 'axios';
import '../css/members.css';
import "../common/formCommon.css";
import '../css/Courses.css';
import './style.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 CoursesListType from '../coursesPublic/CoursesListType';
import ShixunStudentWork from "./ShixunStudentWork";
import Startshixuntask from "../coursesPublic/Startshixuntask";
class ShixunHomeworkPage extends Component {
constructor(props) {
super(props);
this.state = {
tab: ["0"],
jobsettingsdata: undefined,
teacherdata: undefined,
code_review: false,
view_report: false,
}
}
//切换tab
ChangeTab = (e) => {
// console.log(e);
this.setState({
tab: e
})
try {
var currenturl = window.location.href;
var newUrl = (currenturl.split("?"))[0];
window.history.pushState('','',newUrl+'?tab='+e);
}catch (e) {
console.log(e);
console.log("44");
}
}
Getdataback = (jobsettingsdata, teacherdata) => {
this.setState({
jobsettingsdata: jobsettingsdata,
teacherdata: teacherdata,
code_review: teacherdata.code_review,
view_report: teacherdata.view_report,
})
}
componentDidMount() {
const query = this.props.location.search;
const type = query.split('?tab=');
// let sum = []
// sum.push(type[1])
// console.log("componentDidMountcomponentDidMount");
console.log(type);
this.setState({
tab: type[1],
})
let querys = this.props.location.pathname;
const types = querys.split('/');
console.log(types);
this.setState({
shixuntypes: types[3]
})
}
render() {
let {tab, jobsettingsdata, teacherdata} = this.state;
const isAdmin = this.props.isAdmin();
return (
<div className="newMain clearfix ">
<div className={"educontent mb20"} style={{width: "1200px"}}>
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth: "33px"}}>
{teacherdata === undefined ? "" : teacherdata.homework_name}
</p>
<CoursesListType
typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回</a>
<a className="color-grey-9 fr font-16 mr20"
href={`/shixuns/${teacherdata === undefined ? "" : teacherdata.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a>
</div>
<div className="edu-back-white ">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
<a className={parseInt(tab) === 0 ? "active" : ""} onClick={(e) => this.ChangeTab(0)}>作品列表</a>
<a className={parseInt(tab) === 1 ? "active" : ""} onClick={(e) => this.ChangeTab(1)}>作业问答</a>
{this.props.isAdmin() ?
this.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" :
<a
className={parseInt(tab) === 2 ? "active" : ""}
onClick={(e) => this.ChangeTab(2)}>
代码查重</a> : ""}
{parseInt(tab) === 3?
<style>{
`
.poll_list a.active:after {
content: '';
width: 57px;
left: 10px;
bottom: 0px;
height: 2px;
background-color: #4CACFF;
position: absolute;
}
`
}</style>
:""}
<a className={parseInt(tab) === 3 ? "active" : ""}
onClick={(e) => this.ChangeTab(3)}
>设置</a>
{/*{this.props.isAdmin() ? <a*/}
{/* className="fr color-blue font-16"*/}
{/* href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}*/}
{/*>导出</a> : ""}*/}
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{this.props.isAdmin() ?
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a
onClick={() => this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>实训报告</a>
</li>
<li><a
onClick={() => this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo}&search=${this.state.searchtext}`)}>学生成绩</a>
</li>
</ul>
</li> : ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
: ""
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.publish_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>
: ""
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.code_review === true ?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "" : ""}
{this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}>
查看实训报告
</Link> : ""}
{
teacherdata === undefined ? ""
: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :
<a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>
}
{teacherdata === undefined ? "" : <Startshixuntask
{...this.props}
data={teacherdata}
/>}
</div>
</div>
</div>
{
// 教师列表
parseInt(tab) === 0 ? (isAdmin === true ?
<Listofworks {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworks>
:
<Listofworksstudentone {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>)
:
parseInt(tab) === 1 ?
<Workquestionandanswer {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>
:
parseInt(tab) === 2 ?
<ShixunStudentWork {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>
:
<Trainingjobsetting {...this.props} {...this.state}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>
}
</div>
</div>
)
}
}
export default ShixunHomeworkPage;
// <div className="edu-back-white mt10" >
// <div className="stud-class-set bor-bottom-greyE ">
// <div className=" clearfix edu-back-white pl30 pr30">
// <div className="fl task_menu_ul">
// {this.props.isAdmin() === true ?
//
// <Menu mode="horizontal" selectedKeys={tab} onClick={(e)=>this.changeTab(e)}>
// <Menu.Item key="0">作品列表</Menu.Item>
// <Menu.Item key="1">作业回答</Menu.Item>
// <Menu.Item key="2">代码查重</Menu.Item>
// <Menu.Item key="3">设置</Menu.Item>
// </Menu>
// :
// <Menu mode="horizontal" selectedKeys={tab} onClick={(e)=>this.changeTab(e)}>
// <Menu.Item key="0">作品列表</Menu.Item>
// <Menu.Item key="1">作业回答</Menu.Item>
// <Menu.Item key="2">代码查重</Menu.Item>
// </Menu>
// }
//
// </div>
// </div>
{/* </div>*/
}
{/*</div>*/
}

@ -33,6 +33,7 @@ import '../css/Courses.css'
import './style.css'
import moment from 'moment';
import 'moment/locale/zh-cn';
import Startshixuntask from "../coursesPublic/Startshixuntask";
const Search = Input.Search;
const CheckboxGroup = Checkbox.Group;
@ -73,6 +74,8 @@ class ShixunStudentWork extends Component {
}
componentDidMount() {
console.log("ShixunStudentWork");
console.log("componentDidMount");
this.getupdata();
this.getTrainingjobsetting();
}
@ -87,6 +90,8 @@ class ShixunStudentWork extends Component {
jobsettingsdata: result,
})
this.props.Getdataback(result,result.data);
}
})
}
@ -469,31 +474,32 @@ class ShixunStudentWork extends Component {
// 导出实习报告批量
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
this.refs.DownloadMessage.confirmysl(url);
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
Downloadcal=()=>{
@ -502,6 +508,9 @@ class ShixunStudentWork extends Component {
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() {
let {
data,
@ -582,7 +591,7 @@ class ShixunStudentWork extends Component {
}
return (
<div className="newMain clearfix ">
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{this.state.showmodel===true?<ShixunWorkModal
{...this.props}
visible={this.state.showmodel}
@ -594,9 +603,7 @@ class ShixunStudentWork extends Component {
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
refs="DownloadMessage"
/>
{/*立即发布*/}
<HomeworkModal
@ -618,100 +625,10 @@ class ShixunStudentWork extends Component {
starttimes={this.state.starttimes}
typs={this.state.typs}
/>
<div className={"educontent mb20"}>
<div className="educontent mb20">
<p className="clearfix mb20 mt5">
<ActionBtn className=" btn colorgrey fl hovercolorblue mt5"
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
{/*<ActionBtn className="btn colorgrey fl hovercolorblue" href={"/courses/"+data.course_id+"/students"}>{data.course_name}</ActionBtn>*/}
<span className="color-grey-9 fl ml3 mr3 mt5">&gt;</span>
<ActionBtn
className=" btn colorgrey fl hovercolorblue mt5"
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
{/*<ActionBtn className="btn colorgrey fl hovercolorblue" href={"/courses/"+data.course_id+"/"+this.state.shixuntypes+"/"+this.props.match.params.homeworkid}>实训作业</ActionBtn>*/}
{/*<ActionBtn className="btn colorgrey fl hovercolorblue" href={"/courses/"+data.course_id+"/"+this.state.shixuntypes+"/"+data.category.category_id}>{data.category.category_name}</ActionBtn>*/}
<span className="color-grey-9 fl ml3 mr3 mt5">&gt;</span>
<ActionBtn className="fl">作业详情</ActionBtn>
</p>
</div>
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p>
<CoursesListType
typelist={jobsettingsdata === undefined ? [] : jobsettingsdata.data.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}`}>返回</a>
<a className={"color-grey-9 fr font-16 mr20"} href={`/shixuns/${jobsettingsdata===undefined?"":jobsettingsdata.data.shixun_identifier}/challenges`} target={"_blank"}>实训详情</a>
<div className={"educontent "}>
</div>
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
{/*<Link*/}
{/* to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/listofworks`}>作品列表(教师)</Link>*/}
{this.props.isAdmin() === true?
<Link to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link>:
<Link to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
}
{/*<Link*/}
{/*to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/Listofworksstudentone`}>作品列表(学生未完成)</Link>*/}
{/*<Link*/}
{/*to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/Listofworksstudenttwo`}>作品列表(学生完成)</Link>*/}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/questions`}>作业问答</Link>
{this.props.isAdmin()?<Link className="active"
// 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`}>
代码查重</Link>:""}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li>
<li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
</li>
</ul>
</li> : ""}
{this.props.isAdmin()?
data&&data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "" : ""}
{this.props.isAdmin()?
data&&data.publish_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "" : ""}
{/*{this.props.isAdmin()?*/}
{/*jobsettingsdata&&jobsettingsdata.data.code_review===true?*/}
{/*<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>*/}
{/*:"":""}*/}
</div>
</div>
<style>
{`
.startbox{
@ -875,3 +792,57 @@ class ShixunStudentWork extends Component {
}
export default ShixunStudentWork;
// <div className="stud-class-set bor-bottom-greyE ">
// <div className=" clearfix edu-back-white poll_list">
// <a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
// <a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
// {this.props.isAdmin()?<a className="active" onClick={(e)=>this.ChangeTab(2)}>代码查重</a>:""}
// <a onClick={(e)=>this.ChangeTab(3)}>设置</a>
// <style>{`
// .drop_down_menu li a {
// padding: 0px;
// font-size: 14px;
// }
// .drop_down_menu {
// width: 93px;
// }
// .drop_down_menu li {
// overflow: visible;
// width: 93px;
// }
// .drop_down_menu, .drop_down_normal {
// padding-top: 10px;
// padding-bottom: 8px;
// }
// a:hover {
// color:#1A0B00 !important;
// }
// `}</style>
// {this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
// 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
// <ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
// <li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
// </li>
// <li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
// </li>
// </ul>
// </li> : ""}
// {this.props.isAdmin()?
// data&&data.end_immediately===true?
// <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
// :"": ""}
// {this.props.isAdmin()?
// data&&data.publish_immediately===true?
// <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "": ""}
// {
// jobsettingsdata&& jobsettingsdata.data === undefined ? ""
// : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :
// <a className="fr color-blue font-16"
// href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>
// }
// { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask
// {...this.props}
// data={ jobsettingsdata&& jobsettingsdata.data}
// />}
{/* </div>*/}
{/*</div>*/}

@ -30,31 +30,34 @@ class ShixunWorkReport extends Component {
}
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.refs.DownloadMessage.confirmysl(url);
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
@ -117,16 +120,14 @@ class ShixunWorkReport extends Component {
<span className={"color-grey-9"}>{data&&data.category.category_name}</span>
</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+homework_common_id+"/list"} className="fl color-grey-9">作业详情</WordsBtn>
<WordsBtn to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+homework_common_id+"/list?tab=0"} className="fl color-grey-9">作业详情</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">{data&&data.username}</WordsBtn>
</p>
</div>
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
ref="DownloadMessage"
/>
<div style={{ width:'100%',height:'75px'}} >
<p className=" fl color-black mt25 summaryname">{data&&data.shixun_name}</p>

@ -294,19 +294,19 @@ class ShixunhomeWorkItem extends Component{
{/*/courses/1309/9373/listofworks*/}
{/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/}
{
this.props.isAdmin?<Link to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list"}
this.props.isAdmin?<Link to={"/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0"}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
}
{
this.props.isStudent? <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist`}
this.props.isStudent? <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist?tab=0`}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
}
{
this.props.isNotMember===true? this.props.discussMessage.private_icon===true?
<span className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</span>
: <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist`}
: <Link to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/openlist?tab=0`}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</Link>:""
}
@ -360,7 +360,7 @@ class ShixunhomeWorkItem extends Component{
{this.props.isAdmin?<div className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"44px","display":"block"}}>
<a className="btn colorblue font-16" href={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</a>
{this.props.isAdminOrCreator()?<a onClick={()=>this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名</a>:""}
<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings`} > 设置</WordsBtn>
<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings?tab=3`} > 设置</WordsBtn>
</div>:""}

@ -188,7 +188,7 @@ class ShixunWorkModal extends Component{
// message:"提示",
// description: response.data.message
// });
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work`);
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work?tab=2`);
}else if(response.data.status === -1){
notification.open({
message:"提示",

@ -1,7 +1,7 @@
import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import {WordsBtn, ActionBtn, handleDateString} from 'educoder';
import {WordsBtn, ActionBtn, handleDateString,getImageUrl} from 'educoder';
import PollDetailTabForthRules from '../poll/PollDetailTabForthRules';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import {
@ -12,7 +12,7 @@ import {
DatePicker,
Radio,
Tooltip,
notification
notification,
} from "antd";
import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN';
@ -27,6 +27,7 @@ import moment from 'moment';
import 'moment/locale/zh-cn';
import Modals from "../../modals/Modals";
import DownloadMessage from '../../modals/DownloadMessage';
import Startshixuntask from "../coursesPublic/Startshixuntask";
const RadioGroup = Radio.Group;
//GraduationTaskssetting.js
@ -112,7 +113,8 @@ class Trainingjobsetting extends Component {
group_settings:undefined,
rulesdata:[],
showmodel:false,
code_review:false
code_review:false,
testscripttiptype:false,
}
// console.log("获取到的值")
// console.log("Trainingjobsetting")
@ -124,6 +126,8 @@ class Trainingjobsetting extends Component {
}
componentDidMount() {
console.log("Trainingjobsetting");
console.log("componentDidMount");
this.getTrainingjobsetting();
let query = this.props.location.pathname;
const type = query.split('/');
@ -142,13 +146,17 @@ class Trainingjobsetting extends Component {
// console.log(homeworkid)
let url = `/homework_commons/${homeworkid}/settings.json`;
axios.get(url).then((result) => {
console.log(url);
console.log(result);
if (result!=undefined) {
this.props.Getdataback(result,result.data);
// console.log(result.data.code_review)
// console.log("设置页")
// console.log(JSON.stringify(result))
let array=[];
let arrays=[];
var rulesdatas=[];
if(result.data.group_settings !== undefined){
if(result.data.group_settings.length === 0){
array.push({
course_group_id:[],
@ -180,7 +188,9 @@ class Trainingjobsetting extends Component {
}
}
}
}
if(result.data.group_settings!== undefined){
for(var i=0;i<result.data.group_settings.length;i++){
arrays.push({
@ -205,6 +215,8 @@ class Trainingjobsetting extends Component {
})
}
}
}
this.setState({
rules:array,
rulest:arrays,
@ -221,7 +233,7 @@ class Trainingjobsetting extends Component {
deadline: result.data.end_time === undefined ? undefined : result.data.end_time === null ? undefined : result.data.end_time,
late_time: result.data.late_time === undefined ? undefined : result.data.late_time === null ? undefined : result.data.late_time,
late_times: result.data.late_time === undefined ? undefined : result.data.late_time === null ? undefined : result.data.late_time,
allowreplenishment: result.data.allow_late === true ? "允许补交" : "禁止补交",
allowreplenishment: result.data.allow_late,
latededuction: result.data.late_penalty,
level: result.data.answer_open_evaluation === true ? "满分" : "扣分",
completionefficiencyscore: result.data.work_efficiency,
@ -231,10 +243,6 @@ class Trainingjobsetting extends Component {
challenge_settings: result.data.challenge_settings,
code_review:result.data.code_review
})
}
})
@ -262,7 +270,7 @@ class Trainingjobsetting extends Component {
if (datas[i].checked === true) {
var object = {
challenge_id: datas[i].challenge_id,
challenge_score: parseInt(datas[i].challenge_score),
challenge_score: datas[i].challenge_score,
};
challenge_scoredata.push(datas[i].challenge_score);
array.push(object)
@ -337,7 +345,7 @@ class Trainingjobsetting extends Component {
}
}
}
if (this.state.allowreplenishment === "允许补交") {
if (this.state.allowreplenishment === true) {
if (this.state.late_times === undefined || this.state.late_times === null || this.state.late_times === "") {
@ -409,7 +417,7 @@ class Trainingjobsetting extends Component {
if (this.state.allowreplenishment === "允许补交") {
if (this.state.allowreplenishment === true) {
if (this.state.latededuction === undefined) {
this.props.showNotification(`请输入迟交扣分数`);
@ -530,7 +538,7 @@ class Trainingjobsetting extends Component {
unified_setting: this.state.unifiedsetting, //统一配置
publish_time: moment(this.state.publish_time).format('YYYY-MM-DD HH:mm'), //发布时间
end_time: moment(this.state.end_time).format('YYYY-MM-DD HH:mm'), //截止时间
allow_late: this.state.allowreplenishment === "允许补交" ? true : false, //补交
allow_late: this.state.allowreplenishment, //补交
late_penalty: parseInt(this.state.latededuction), //迟交扣分
late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间
answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项
@ -546,7 +554,7 @@ class Trainingjobsetting extends Component {
data = {
unified_setting: this.state.unifiedsetting, //非统一配置
group_settings: this.state.rulesdata,
allow_late: this.state.allowreplenishment === "允许补交" ? true : false, //补交
allow_late: this.state.allowreplenishment, //补交
late_penalty: parseInt(this.state.latededuction), //迟交扣分
late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间
answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项
@ -651,9 +659,8 @@ class Trainingjobsetting extends Component {
//允许补交
onChanges = (e) => {
// console.log("640");
// console.log(this.state.end_time);
if(e.target.value ==="允许补交"){
if(e.target.checked ===true){
if(this.state.end_time !== null && this.state.end_time!== undefined){
// console.log(this.state.end_time);
// var times = this.state.deadline.format('YYYY-MM-DD HH:mm');
@ -665,16 +672,19 @@ class Trainingjobsetting extends Component {
this.setState({
allowreplenishment: e.target.value,
allowreplenishment: e.target.checked,
latededuction:5,
whethertopay:true,
})
}else {
this.setState({
allowreplenishment: e.target.value,
allowreplenishment: e.target.checked,
latededuction:0,
whethertopay:false,
hand__e_tip: "",
hand_flags: false,
handclass:"",
})
}
@ -1049,7 +1059,7 @@ class Trainingjobsetting extends Component {
var challenge_settings = this.state.challenge_settings;
for (var i = 0; i < challenge_settings.length; i++) {
if (i === index) {
challenge_settings[i].challenge_score = parseInt(value);
challenge_settings[i].challenge_score = value;
}
}
@ -1239,13 +1249,22 @@ class Trainingjobsetting extends Component {
this.setState({
publish_time:moment(handleDateString(dateString))
})
if(this.state.allowreplenishment === "允许补交") {
if(this.state.allowreplenishment === true) {
this.setState({
end_time:moment(handleDateString(dateString)).add(1, 'months'),
deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'),
late_time:moment(handleDateString(dateString)).add(2, 'months'),
late_times:moment(handleDateString(dateString)).add(2, 'months').format('YYYY-MM-DD HH:mm'),
});
try {
this.setState({
unit_e_tip: "",
p_flag: false,
borredss:undefined,
})
} catch (e) {
}
}else{
this.setState({
end_time:moment(handleDateString(dateString)).add(1, 'months'),
@ -1303,7 +1322,7 @@ class Trainingjobsetting extends Component {
end_time:moment(handleDateString(dateString))
})
// this.onChangedata('end_time', value, dateString);
if(this.state.allowreplenishment === "允许补交"){
if(this.state.allowreplenishment === true){
this.setState({
deadline:moment(handleDateString(dateString)).format('YYYY-MM-DD HH:mm'),
late_time:moment(handleDateString(dateString)).add(2, 'months'),
@ -1580,7 +1599,7 @@ class Trainingjobsetting extends Component {
if(moment(this.state.late_time,"YYYY-MM-DD HH:mm")<=moment()){
endtime=false;
}
if(this.state.allowreplenishment === "禁止补交"){
if(this.state.allowreplenishment === false){
whethertopays=false;
}
this.setState({
@ -1668,30 +1687,31 @@ class Trainingjobsetting extends Component {
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
this.refs.DownloadMessage.confirmysl(url);
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
Downloadcal=()=>{
@ -1700,18 +1720,40 @@ class Trainingjobsetting extends Component {
DownloadMessageval:undefined
})
}
testscripttip =(e)=>{
if(e === 0){
this.setState({
testscripttiptype:true,
})
}else {
this.setState({
testscripttiptype:false,
})
}
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() {
const dataformat = 'YYYY-MM-DD HH:mm';
let {flagPageEdit,flagPageEdits,flagPageEditstwo,flagPageEditsbox,whethertopay,handclass,flagPageEditsthrees, flagPageEditsfor,rules,rulest,unifiedsetting,group_settings, course_group,unit_e_tip, borreds,borredss,unit_p_tip, end_time, late_time, score_open, publish_time, starttimetype, modalsType, modalsTopval, loadtype, modalSave, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, endOpen, mystyle, mystyles} = this.state;
let {flagPageEdit,testscripttiptype,flagPageEdits,flagPageEditstwo,flagPageEditsbox,whethertopay,handclass,flagPageEditsthrees, flagPageEditsfor,rules,rulest,unifiedsetting,group_settings, course_group,unit_e_tip, borreds,borredss,unit_p_tip, end_time, late_time, score_open, publish_time, starttimetype, modalsType, modalsTopval, loadtype, modalSave, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, endOpen, mystyle, mystyles} = this.state;
const radioStyle = {
display: 'block',
height: '30px',
lineHeight: '30px',
color:"#666666"
};
const radioStyles = {
display: 'block',
height: '30px',
lineHeight: '30px',
color:"#666666",
marginLeft:'38px',
};
// const startDate=moment(this.state.publish_time).format('YYYY-MM-DD HH:mm');
// const endDate =moment(this.state.publish_time).add('months',1).format('YYYY-MM-DD HH:mm');
@ -1725,7 +1767,7 @@ class Trainingjobsetting extends Component {
// console.log(this.props.isAdmin())
// console.log(this.state.code_review===false)
return (
<div className="newMain clearfix " ref='targetElementTrainingjobsetting'>
<div className=" clearfix " ref='targetElementTrainingjobsetting' style={{margin: "auto", minWidth:"1200px"}}>
{this.state.showmodel===true?<ShixunWorkModal
{...this.props}
visible={this.state.showmodel}
@ -1736,9 +1778,7 @@ class Trainingjobsetting extends Component {
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
ref="DownloadMessage"
/>
{/*立即发布*/}
@ -1767,105 +1807,11 @@ class Trainingjobsetting extends Component {
loadtype={loadtype}
modalSave={modalSave}
></Modals>
<div className={"educontent mb20"}>
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/students`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb20">
<p className=" fl color-black summaryname mt5" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p>
<CoursesListType
typelist={jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20" href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id}`}>返回</a>
<a className="color-grey-9 fr font-16 mr20" href={`/shixuns/${jobsettingsdata===undefined?"":jobsettingsdata.data.shixun_identifier}/challenges`} target={"_blank"}>实训详情</a>
</div>
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
{this.props.isAdmin() === true ? <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link> : <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
}
<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||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> : ""}
<style>{
`
.poll_list a.active:after {
content: '';
width: 57px;
left: 10px;
bottom: 0px;
height: 2px;
background-color: #4CACFF;
position: absolute;
}
`
}</style>
<Link className="active"
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{/*<Link className="ml30" to={`/courses/${this.state.props.match.params.coursesId}/shixun_homeworks/${this.state.props.match.params.homeworkid}/shixun_work_report`}>*/}
{/*<a className="color-blue">查看实训报告</a>*/}
{/*</Link>*/}
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li>
<li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
</li>
</ul>
</li>: ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "": ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "": ""}
{this.props.isAdmin()?
this.state.code_review===true?<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "":""}
</div>
</div>
<div className={"educontent "}>
<div className="edu-back-white" style={{paddingTop: "20px"}}>
{/*发布设置*/}
<div className="stud-class-set bor-bottom-greyE edu-back-white">
<div className=" mt20 pl20">
<div className=" pl20">
<p className=" clearfix " style={{height:"41px"}}>
<span className="font-16 fl "style={{"color":"#05101A"}}>发布设置 <span className="ml15 color-grey-9" style={{"font-size":"14px","text-align":"left"}}></span></span>
{
@ -1881,7 +1827,7 @@ class Trainingjobsetting extends Component {
<Checkbox className="ml15 font-16" style={{"color":"#666666"}} onChange={this.onChange}
checked={this.state.unifiedsetting}
defaultChecked={this.state.boolUnite} disabled={!flagPageEdit}>统一设置<span
className={"font-14 ml15"} style={{"color":"#999999","text-align":"left"}}>(选中则所有分班使用相同的发布设置否则各个分班单独设置)</span></Checkbox>
className={"font-14 ml15 color-grey-c"} style={{"text-align":"left"}}>(选中则所有分班使用相同的发布设置否则各个分班单独设置)</span></Checkbox>
</div>
:<div></div>
}
@ -1897,7 +1843,7 @@ class Trainingjobsetting extends Component {
unifiedsetting === undefined ? "" : unifiedsetting=== true ?
<div>
<div className="clearfix mb5 ml15">
<span className="font-16 fl mt6" style={{"color":"#999999"}}>发布时间</span>
<span className="font-16 fl mt3" style={{"color":"#999999"}}>发布时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditstwo === true ? "发布时间已过,则不能修改" : ""}>
<div className="fl">
<DatePicker
@ -1921,16 +1867,16 @@ class Trainingjobsetting extends Component {
/>
</div>
</Tooltip>
<span className="ml20 fl mt10" style={{"color":"#999999","text-align":"left","font-size":"14px"}}>(学生收到作业的时间)</span>
<span className="ml20 fl mt5 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(学生收到作业的时间)</span>
</div>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{
unit_p_tip && unit_p_tip != "" ? <span className="fl">{ unit_p_tip }</span>
unit_p_tip && unit_p_tip != "" ? <span className="fl" style={{marginLeft: "94px"}}>{ unit_p_tip }</span>
: ""
}
</p>
<div className="clearfix ml15 mb5">
<span className=" fl mt10 font-16" style={{"color":"#999999"}}>截止时间</span>
<span className=" fl mt3 font-16" style={{"color":"#999999"}}>截止时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditsthrees === true ? "截止时间已过,则不能修改" : ""}>
<div className="fl">
<DatePicker
@ -1955,11 +1901,11 @@ class Trainingjobsetting extends Component {
</div>
</Tooltip>
<span className=" ml20 fl mt10 color-grey-9" style={{"text-align":"left","font-size":"14px"}}>(学生按时提交作品的时间截点)</span>
<span className=" ml20 fl mt5 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(学生按时提交作品的时间截点)</span>
</div>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{
unit_e_tip && unit_e_tip != "" ? <span className="fl">{ unit_e_tip }</span> :""
unit_e_tip && unit_e_tip != "" ? <span className="fl" style={{marginLeft: "94px"}}>{ unit_e_tip }</span> :""
}
</p>
</div>
@ -1985,13 +1931,13 @@ class Trainingjobsetting extends Component {
<div className=" clearfix edu-back-white poll_list mt10">
<div className={"font-16 color-dark fl pl20 mt10 "} style={{"color":"#05101A"}}>补交设置</div>
</div>
{/*value={this.state.allowreplenishment}*/}
<div className="ml40 mt10"
>
<Checkbox style={radioStyle} value={"允许补交"} checked={this.state.allowreplenishment} onChange={this.onChanges} disabled={!flagPageEdit}>开启补交 <span
className={"font-14 ml10 color-grey-c"} style={{"text-align":"left","font-size":"14px"}} >(选中则允许学生延时提交作品)</span></Checkbox>
<RadioGroup className="ml40 mt10" onChange={this.onChanges}
value={this.state.allowreplenishment}>
<Radio style={radioStyle} value={"允许补交"} disabled={!flagPageEdit}>允许补交 <span
className={"font-14 ml10 color-grey-9"} style={{"text-align":"left","font-size":"14px"}} >(选中则允许学生延时提交作品)</span></Radio>
<div className={"h21 mb30 ml30 mt20"}>
<div className={"h21 mb30 mt20"}>
<span style={{"width": "100px","color":"#999999"}}>迟交扣分</span>
<style>
{
@ -2009,11 +1955,11 @@ class Trainingjobsetting extends Component {
style={{"color":"#999999","height": "40px"}}
value={this.state.latededuction}/>
<span className="ml10 color-grey-9" ></span>
<span className="ml15 color-grey-9" style={{"text-align":"left","font-size":"14px"}}>(延时提交作品时学生成绩将被扣减的分值)</span>
<span className="ml15 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(延时提交作品时学生成绩将被扣减的分值)</span>
{/*{latepenaltytype===true?<div className={"color-red ml40"}></div>:""}*/}
</div>
<div className={"h20 mb50 ml30"}>
<div className={"h20 mb20 "}>
<span style={{"width": "100px","color":"#999999"}}>结束时间</span>
<DatePicker
showToday={false}
@ -2032,7 +1978,7 @@ class Trainingjobsetting extends Component {
dropdownClassName="hideDisable"
className={handclass}
/>
<span className="ml15 color-grey-9" style={{"text-align":"left","font-size":"14px"}}>(学生延时提交作品的时间截点)</span>
<span className="ml15 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(学生延时提交作品的时间截点)</span>
{/*{latetimetype===true?<div className={"color-red "}>结束时间不能小于截止时间</div>:""}*/}
<style>
{
@ -2049,8 +1995,8 @@ class Trainingjobsetting extends Component {
}
</p>
</div>
<Radio style={radioStyle} value={"禁止补交"} disabled={!flagPageEdit}>禁止补交</Radio>
</RadioGroup>
{/*<Radio style={radioStyle} value={"禁止补交"} disabled={!flagPageEdit}>禁止补交</Radio>*/}
</div>
<div className="h20 mb10 "></div>
</div>
{/*评分设置*/}
@ -2058,26 +2004,23 @@ class Trainingjobsetting extends Component {
<div className=" clearfix edu-back-white poll_list mt20">
<div className={"font-16 color-dark fl pl20 "} style={{"color":"#05101A"}}>评分设置</div>
</div>
<p className="ml40 mt20 c_grey font-13 " style={{"color":"#666666"}}> 查看参考答案才通过评测的关卡扣分规则<span
className=" font-14 color-grey-9 ml15" style={{"text-align":"left"}}>(学生通过评测后再查看参考答案不对成绩产生影响)</span></p>
<RadioGroup className="ml60 mt20" onChange={this.onChangeslevel} value={this.state.level}>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey" value={"扣分"}>按查看答案级别扣分<span
className="color-grey-9 font-14 ml15" style={{"text-align":"left"}}>根据学员选择查看的实训答案级别(解题思路完整答案)扣减相应的分值</span></Radio>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt15"
value={"满分"}>不扣分 </Radio>
</RadioGroup>
<div className="ml40 mt10 mt20">
<span className="c_grey font-13" style={{"color":"#333333"}}> 关卡任务的选择和分值设置 </span><span className="ml15 font-14 color-grey-9" style={{"text-align":"left"}}>( = + )</span>
<div className="yslflexhomes">
<div style={{width:"700px"}}>
<div className="ml20 mt10 mt20">
<span className="c_grey font-13" style={{"color":"#333333"}}> 关卡任务的选择和分值设置 </span><span className="ml15 font-14 color-grey-c" style={{"text-align":"left"}}>( = + )</span>
</div>
<div className=" clearfix edu-back-white poll_list mt10">
<Checkbox disabled={!flagPageEdit} className="ml60 font-13 mt20"
<div className=" clearfix edu-back-white poll_list mt10" style={{marginLeft:" 40px"}}>
<Checkbox disabled={!flagPageEdit} className=" font-13 mt10"
onChange={this.onChangeeffectiveness}
checked={this.state.completionefficiencyscore} style={{"color":"#666666"}}>效率分<span
className={"font-14 color-grey-9 font-14 ml15"} style={{"text-align":"left"}}>(选中则学生最终成绩包含效率分)</span></Checkbox>
className={"font-14 color-grey-c font-14 ml15"} style={{"text-align":"left"}}>(选中则学生最终成绩包含效率分)</span>
</Checkbox>
<div>
</div>
</div>
<div className="ml85 mt30">
<div className=" mt20" style={{marginLeft:"75px"}}>
<span className="c_grey mr10" style={{"color":"#999999"}}>分值</span>
<InputNumber min={0} disabled={!flagPageEdit} max={100} className="ml10 h40 mr10 color-grey-9"
style={{width: "100px","color":"#999999"}}
@ -2086,29 +2029,76 @@ class Trainingjobsetting extends Component {
<span className="ml10" style={{"color":"#999999"}}></span>
<span className={"font-14 color-grey-9 "} style={{"color":"#999999"}}></span>
</div>
<RadioGroup className="ml60 mt10" onChange={this.onChangeslevelproportion}
value={this.state.proportion}>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt20"
value={"均分比例"} style={{"color":"#666666"}}>均分比例<span
className="color-grey-9 font-10 ml15" style={{"color":"#999999"}}>(根据任务数平均分配) 例如实训任务5关每一关分值为 1 / 5 * 100 = 20</span></Radio>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt20"
value={"经验值比例"} style={{"color":"#666666"}}>经验值比例 <span
className="color-grey-9 font-10 ml15" style={{"color":"#999999"}}>(根据任务经验值在实训总经验值的比例进行分配) 例如实训总经验值1500某一关经验值为600则这一关的分值为600 / 1500 * 100 = 40
</span></Radio>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt20"
value={"自定义分值"} style={{"color":"#666666"}}>自定义分值 <span
className="color-grey-9 font-10 ml15" style={{"color":"#999999"}}>(手动设置关卡分值)</span></Radio>
</div>
<div>
<div className="yslflexhomes invite-tipysl" style={{marginTop: "45px"}} >
<span className="to-back-left"></span>
<div className="padding20 invitecontent clearfix" style={{backgroundColor:" #FAFAFA"}}>
<p className="font-12 edu-txt-left">
学生工作效率= log(实训总得分/实训总耗时)<br/>
学生效率分 = 学生工作效率 / 课堂学生最高工作效率 * 分值<br/>
</p>
</div>
</div>
</div>
</div>
<div className="yslflexhome">
<div >
<div className="ml20 mt40 mt20" >
<span className="c_grey font-13" style={{"color":"#333333"}}> 关卡任务分值设置规则 </span> <span> <RadioGroup className="ml50" onChange={this.onChangeslevelproportion} value={this.state.proportion}>
<Radio style={{ display: 'block',
height: '30px',
lineHeight: '30px',
color:"#666666",
}} disabled={!flagPageEdit} className="c_grey mt20 "
value={"均分比例"} style={{"color":"#666666"}}>均分比例</Radio>
<Radio style={{ display: 'block',
height: '30px',
lineHeight: '30px',
color:"#666666",
}} disabled={!flagPageEdit} className="c_grey ml30"
value={"经验值比例"} style={{"color":"#666666"}}>难易度</Radio>
<Radio style={{ display: 'block',
height: '30px',
lineHeight: '30px',
color:"#666666",
}} disabled={!flagPageEdit} className="c_grey mt20 ml30"
value={"自定义分值"} style={{"color":"#666666"}}>自定义分值
{testscripttiptype===true?
<div className="invite-tipysls clearfix " id="test_script_tip" style={{left: '148px',width: '322px',zIndex: '10'}}>
<span className="right-black-trangles"></span>
<div className="padding20 invitecontent clearfix">
<p className="font-12 edu-txt-left">
若完成效率分值 = 10, <br/>
均分比例: 根据任务数平均分配<br/>
: 实训任务3关, 每关分值: 1/3*(100-10)=30<br/>
<br/>
难易度: 根据关卡经验值的高低确定关卡分值<br/>
: 实训总经验值1200, 某关经验值200,<br/>
则其分值:200/1200*(100-10)=15<br/>
<br/>
自定义分值: 手动设置关卡分值<br/>
</p>
</div>
<p className="inviteTipbtn with100 fl">
<a onClick={()=>this.testscripttip(1)}>知道了</a>
</p>
</div>
:""}
</Radio>
</RadioGroup>
<p className="ml95 mt15 c_grey font-13 " style={{"color":"#666666"}}> 关卡名称<span
className="color-grey-9 font-10 ml30s" style={{"color":"#999999"}}>(选中的关卡将计入评分计算范围暂时不支持跳关选择)</span><span
className="color-grey-9 ml90" style={{"color":"#666666"}}>分值</span></p>
<div className="ml95 mt15">
<a onClick={()=>this.testscripttip(0)}><img style={{marginBottom:"3px",marginLeft:"20px"}} src={getImageUrl("images/educoder/problem.png") }/></a>
</span>
</div>
<p className="ml20 mt15 c_grey font-13 " style={{"color":"#666666"}}> 关卡名称<span
className="color-grey-c font-10 ml10">(需要学生完成的任务请选中)</span></p>
<div className="ml40 mt15" >
{this.state.challenge_settings === undefined ? "" : this.state.challenge_settings.map((object, index) => {
return (
<li>
<Checkbox className="ml110 mt20 "
disabled={!flagPageEditsbox}
style={{"width": "400px","color":"#05101A"}}
style={{"width": "480px","color":"#05101A"}}
checked={object.checked}
onChange={(value) => this.onChangedatasheet(value, index)}
>{object.challenge_name}</Checkbox>
@ -2117,12 +2107,25 @@ class Trainingjobsetting extends Component {
onChange={(value) => this.hangeTopicNametwodatasheet(value, index)}
value={object.challenge_score}
/>
<span className="ml10" style={{"color":"#999999"}}></span>
</li>
)
})}
</div>
</div>
</div>
<p className="ml20 mt40 c_grey font-13 " style={{"color":"#333333"}}> 查看参考答案才通过评测的关卡扣分规则<span
className=" font-14 color-grey-c ml15" style={{textAlign:"left",marginLeft:"40px"}}>(学生通过评测后再查看参考答案不对成绩产生影响)</span></p>
<RadioGroup className="ml40 mt20" onChange={this.onChangeslevel} value={this.state.level}>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey" value={"扣分"}>按查看答案级别扣分<span
className="color-grey-c font-14 ml15" style={{"text-align":"left"}}>根据学员选择查看的实训答案级别(解题思路完整答案)扣减相应的分值</span></Radio>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt15"
value={"满分"}>不扣分 </Radio>
</RadioGroup>
</div>
{/*公开设置*/}
<div className="stud-class-set bor-top-greyE edu-back-white mt35 pb5 ">
<div className=" clearfix edu-back-white poll_list mt20">
@ -2131,7 +2134,7 @@ class Trainingjobsetting extends Component {
<div className={"mb20 mt15"}>
<Checkbox disabled={!flagPageEdit} className="ml40" onChange={this.onChangepublicwork}
checked={this.state.publicwork} style={{"color":"#666666"}}>公开成绩</Checkbox>
<span className={"font-14 color-grey-9 font-14 "} style={{"text-align":"left"}}>(选中则在作业截止/补交结束时间之后已提交作品的学生可以查看其它学生的成绩否则只能查看自己的成绩)</span>
<span className="font-14 color-grey-c font-14 " style={{"text-align":"left"}}>(选中则在作业截止/补交结束时间之后已提交作品的学生可以查看其它学生的成绩否则只能查看自己的成绩)</span>
</div>
</div>
@ -2162,3 +2165,73 @@ class Trainingjobsetting extends Component {
}
export default Trainingjobsetting;
// <div className="stud-class-set bor-bottom-greyE ">
// <div className=" clearfix edu-back-white poll_list">
// <a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
// <a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
// {this.props.isAdmin()?this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"": <a onClick={(e)=>this.ChangeTab(2)}>代码查重</a> : ""}
// <style>{
// `
// .poll_list a.active:after {
// content: '';
// width: 57px;
// left: 10px;
// bottom: 0px;
// height: 2px;
// background-color: #4CACFF;
// position: absolute;
// }
// `
// }</style>
// <a className="active"
// onClick={(e)=>this.ChangeTab(3)}
// >设置</a>
// <style>{`
// .drop_down_menu li a {
// padding: 0px;
// font-size: 14px;
// }
// .drop_down_menu {
// width: 93px;
// }
// .drop_down_menu li {
// overflow: visible;
// width: 93px;
// }
// .drop_down_menu, .drop_down_normal {
// padding-top: 10px;
// padding-bottom: 8px;
// }
// a:hover {
// color:#1A0B00 !important;
// }
// `}</style>
// {this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
// 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
// <ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
// <li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
// </li>
// <li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
// </li>
// </ul>
// </li>: ""}
// {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
// <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
// : "": ""}
// {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true?
// <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>: "" : ""}
// {this.props.isAdmin()?
// jobsettingsdata&&jobsettingsdata.data.code_review===true?
// <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>: "":""}
// {
// jobsettingsdata&& jobsettingsdata&&jobsettingsdata.data === undefined ? ""
// : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :
// <a className="fr color-blue font-16"
// href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>
// }
// { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask
// {...this.props}
// data={ jobsettingsdata&& jobsettingsdata.data}
// />}
{/* </div>*/}
{/*</div>*/}

@ -35,6 +35,7 @@ import Homeworddescription from "../shixunHomework/Homeworddescription";
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import DownloadMessage from '../../modals/DownloadMessage';
import Startshixuntask from "../coursesPublic/Startshixuntask";
const TextArea = Input.TextArea
//作业问答页面
@ -81,6 +82,8 @@ class Workquestionandanswer extends Component {
}
componentDidMount() {
console.log("Workquestionandanswer");
console.log("componentDidMount");
var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid)
this.Gettitleinformation(homeworkid)
@ -108,6 +111,7 @@ class Workquestionandanswer extends Component {
jobsettingsdata: result,
...result.data
})
this.props.Getdataback(result,result.data);
}
}).catch((error) => {
console.log(error)
@ -314,30 +318,31 @@ class Workquestionandanswer extends Component {
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
this.refs.DownloadMessage.confirmysl(url);
// axios.get(url).then((response) => {
// if(response.data.status&&response.data.status===-1){
// }else if(response.data.status&&response.data.status===-2){
// if(response.data.messages === "100"){
// // 已超出文件导出的上限数量100 ),建议:
// this.setState({
// DownloadType:true,
// DownloadMessageval:100
// })
// }else {
// //因附件资料超过500M
// this.setState({
// DownloadType:true,
// DownloadMessageval:500
// })
// }
// }else {
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank');
// }
// }).catch((error) => {
// console.log(error)
// });
}
Downloadcal=()=>{
this.setState({
@ -345,6 +350,9 @@ class Workquestionandanswer extends Component {
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
render() {
const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let {
@ -364,7 +372,7 @@ class Workquestionandanswer extends Component {
return (
<div className="newMain clearfix ">
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{this.state.showmodel === true ? <ShixunWorkModal
{...this.props}
visible={this.state.showmodel}
@ -375,9 +383,7 @@ class Workquestionandanswer extends Component {
/> : ""}
<DownloadMessage
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
ref="DownloadMessage"
/>
{/*立即发布*/}
<HomeworkModal
@ -399,105 +405,12 @@ class Workquestionandanswer extends Component {
starttimes={this.state.starttimes}
typs={this.state.typs}
/>
<div className={"educontent mb20"}>
<div className="educontent mb20">
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue "
to={"/courses/" + this.props.match.params.coursesId + "/students"}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn
className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn>
</p>
</div>
<div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth:"33px"}}>
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
</p>
<CoursesListType
typelist={jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status}
/>
<a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回</a>
<a className="color-grey-9 fr font-16 mr20"
href={`/shixuns/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a>
<div className={"educontent "}>
<div className="edu-back-white" >
</div>
<div className="edu-back-white">
<div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list">
{this.props.isAdmin() === true ? <Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/list`}>作品列表</Link> :
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/openlist`}>作品列表</Link>
// :<Link
// to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/noopenlist`}>作品列表(学生完成)</Link>
}
<Link
className="active"
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 || 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.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>
代码查重</Link> : ""}
<Link
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
>设置</Link>
{/*<a className="fr color-blue font-16" href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`}>导出成绩</a>*/}
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
}
.drop_down_menu {
width: 93px;
}
.drop_down_menu li {
overflow: visible;
width: 93px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
a:hover {
color:#1A0B00 !important;
}
`}</style>
{this.props.isAdmin() ?
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
</li>
<li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
</li>
</ul>
</li> : ""}
{this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.end_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "" : ""}
{this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.publish_immediately === true ?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "" : ""}
{this.props.isAdmin() ?
this.state.code_review === true ?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "" : ""}
</div>
</div>
{jobsettingsdata === undefined || jobsettingsdata.data.description === null ? "无" :
<div className=" clearfix edu-back-white poll_list mt20 mr20 ">
{jobsettingsdata === undefined || jobsettingsdata.data.description === null ? <div className="ml20" style={{paddingTop: "20px"}}></div> :
<div className=" clearfix edu-back-white poll_list mr20 " style={{paddingTop: "20px"}}>
<span>
<style>
{
@ -508,7 +421,7 @@ class Workquestionandanswer extends Component {
`
}
</style>
<div className={"font-16 color-dark fl pl20 "}>
<div className={"font-16 color-dark fl pl20 "} >
<div className={"markdown-body"}
dangerouslySetInnerHTML={{__html: markdownToHTML(jobsettingsdata.data.description).replace(/▁/g, "▁▁▁")}}></div>
{/* /!*{}}></div>
@ -606,3 +519,75 @@ class Workquestionandanswer extends Component {
}
export default Workquestionandanswer;
{/*<div className="stud-class-set bor-bottom-greyE ">*/}
{/* <div className=" clearfix edu-back-white poll_list">*/}
{/* <a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>*/}
{/* <a className="active" onClick={(e)=>this.ChangeTab(1)}>作业问答</a>*/}
{/* {this.props.isAdmin() ?*/}
{/* this.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" :*/}
{/* <a*/}
{/* // to={`/courses/${this.state.props.match.params.coursesId}/${this.state.props.match.params.homeworkid}/student_work`}*/}
{/* onClick={(e)=>this.ChangeTab(2)}>*/}
{/* 代码查重</a> : ""}*/}
{/* <a*/}
{/* onClick={(e)=>this.ChangeTab(3)}*/}
{/* >设置</a>*/}
{/* <style>{`*/}
{/* .drop_down_menu li a {*/}
{/* padding: 0px;*/}
{/* font-size: 14px;*/}
{/* }*/}
{/* .drop_down_menu {*/}
{/* width: 93px;*/}
{/* }*/}
{/* .drop_down_menu li {*/}
{/* overflow: visible;*/}
{/* width: 93px;*/}
{/* }*/}
{/* .drop_down_menu, .drop_down_normal {*/}
{/* padding-top: 10px;*/}
{/* padding-bottom: 8px;*/}
{/* }*/}
{/* a:hover {*/}
{/* color:#1A0B00 !important;*/}
{/* }*/}
{/* `}</style>*/}
{/* {this.props.isAdmin() ?*/}
{/* <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>*/}
{/* 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>*/}
{/* <ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>*/}
{/* <li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>*/}
{/* </li>*/}
{/* <li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>*/}
{/* </li>*/}
{/* </ul>*/}
{/* </li> : ""}*/}
{/* {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.end_immediately === true ?*/}
{/* <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>*/}
{/* :""*/}
{/* : ""}*/}
{/* {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.publish_immediately === true ?*/}
{/* <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>*/}
{/* : ""*/}
{/* : ""}*/}
{/* {this.props.isAdmin() ?*/}
{/* jobsettingsdata && jobsettingsdata.data.code_review === true ?*/}
{/* <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>*/}
{/* : "" : ""}*/}
{/* {*/}
{/* jobsettingsdata&& jobsettingsdata.data === undefined ? ""*/}
{/* : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :*/}
{/* <a className="fr color-blue font-16"*/}
{/* href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>*/}
{/* }*/}
{/* { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask*/}
{/* {...this.props}*/}
{/* data={ jobsettingsdata&& jobsettingsdata.data}*/}
{/* />}*/}
{/* </div>*/}
{/*</div>*/}

@ -0,0 +1,86 @@
import React, {Component} from "react";
import '../courses/css/members.css';
import "../courses/common/formCommon.css"
import '../courses/css/Courses.css';
import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
import educodernet from '../../../src/images/login/educodernet.png';
import InterestpageComponent from '../user/Interestpage'
//educoder登入页面
var newContainer={
background: `url(${beijintulogontwo})`,
backgroundPosition: "center" ,
backgroundRepeat: "no-repeat",
backgroundAttachment: "fixed",
backgroundSize: "100% 100%",
height:" 100%",
width:" 100%",
position: "absolute",
top: "0px",
bottom: "0px",
minHeight: "100%",
overflow:"hidden",
paddingTop: "40px",
}
class EducoderInteresse extends Component {
constructor(props) {
super(props);
}
componentDidMount() {
}
render() {
return (
<div style={newContainer} className=" clearfix" >
<div >
<div style={{
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%"
}}>
<div >
<img src={educodernet}/>
</div>
</div>
<div style={{
display: "flex",
justifyContent: "center",
width: "100%",
height: "630px",
marginTop: "44px",
}}>
<InterestpageComponent {...this.props} {...this.state}>
</InterestpageComponent>
</div>
<div style={{
display: "flex",
justifyContent: "center",
width: "100%",
bottom:"0",
position: "fixed"
}}>
<div className="font-14 color-grey-9 " style={{ bottom:"0",position: "absolute",marginBottom: "20px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>
</div>
</div>
)
}
}
export default EducoderInteresse;

@ -43,17 +43,27 @@ var imgback = {
backgroundImage: `url(${beijintulogontwo})`,
}
var imgmian ={
"width": "100%",
"background": `url(${beijintulogontwo})`,
"height": "100%",
"position": "relative",
width: "100%",
background: `url(${beijintulogontwo})`,
position: "relative",
}
var newContainer={
"min-height": "100%",
"background": `url(${beijintulogontwo})`,
"height": "auto !important",
"position": "relative",
background: `url(${beijintulogontwo})`,
backgroundPosition: "center" ,
backgroundRepeat: "no-repeat",
backgroundAttachment: "fixed",
backgroundSize: "100% 100%",
height:" 100%",
width:" 100%",
position: "absolute",
top: "0px",
bottom: "0px",
minHeight: "100%",
overflow:"hidden",
paddingTop: "40px",
}
class EducoderLogin extends Component {
constructor(props) {
@ -76,6 +86,7 @@ class EducoderLogin extends Component {
}
}else if(props.match.url === "/register"){
// showbool: 1,
this.state = {
showbool: 1,
loginstatus:false,
@ -114,13 +125,7 @@ class EducoderLogin extends Component {
this.setState({
showbool: 1
})
} else if(e===2) {
this.setState({
namezh:name,
passmm:pass,
showbool: 2,
})
}else if(e===3){
} else if(e===3){
this.setState({
showbool: 3
})
@ -131,24 +136,16 @@ class EducoderLogin extends Component {
render() {
let {showbool,loginstatus,logini} = this.state;
return (
<div style={newContainer} >
<style>
{
`
html, body, {
height: 100%;
}
`
}
</style>
<div style={imgmian}>
<div style={newContainer} className=" clearfix" >
<div >
<div style={{
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%"
}}>
<div style={{"margin-top": "20px"}}>
<div >
<img src={educodernet}/>
</div>
@ -157,12 +154,13 @@ class EducoderLogin extends Component {
{
showbool === 1 ?
<div style={{
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%",
display: "flex",
justifyContent: "center",
width: "100%",
height: "550px",
marginTop: "44px",
}}>
<div style={{"margin-top": "40px","height":"580px"}}>
<div>
<LoginRegisterComponent {...this.props} {...this.state}
Setshowbool={(e,name,pass)=>this.Setshowbool(e,name,pass)} ></LoginRegisterComponent>
@ -170,39 +168,31 @@ class EducoderLogin extends Component {
</div>
</div>
:showbool === 2 ?
<div style={{
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%",
}}>
<InterestpageComponent {...this.props} {...this.state}>
</InterestpageComponent>
</div>
:
<div style={{
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%",
display: "flex",
justifyContent: "center",
width: "100%",
height: "550px",
marginTop: "44px",
}}>
<div style={{"margin-top": "40px","height":"580px"}}>
<div >
<FindPasswordComponent {...this.props} {...this.state}
Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent>
</div>
</div>
}
<div style={{"height":"125px",
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%",
<div style={{
display: "flex",
justifyContent: "center",
width: "100%",
bottom:"0",
position: "fixed"
}}>
<div className="font-14 color-grey-9 " style={{marginTop:"15px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
<div className="font-14 color-grey-9 " style={{ bottom:"0",position: "absolute",marginBottom: "20px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>
<div style={{"height":"100px"}}></div>
</div>
</div>
)
@ -211,3 +201,15 @@ class EducoderLogin extends Component {
}
export default EducoderLogin;
// showbool === 2 ?
// <div style={{
// display: "flex",
// justifyContent: "center",
// width: "100%",
// height: "630px",
// marginTop: "44px",
// }}>
// <InterestpageComponent {...this.props} {...this.state}>
// </InterestpageComponent>
// </div>
// :

@ -1,18 +1,61 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import { Modal} from 'antd';
import axios from 'axios';
class DownloadMessage extends Component {
constructor(props) {
super(props);
this.state = {
funmodalsType:false,
istype:false
istype:false,
DownloadMessageval:undefined,
DownloadType:false
}
}
setDownload=()=>{
this.props.modalCancel();
this.modalCancel();
window.open(`/users/${this.props.user.login}/private_messages`)
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
/// 确认是否下载
confirmysl(url,params){
axios.get(url,{
params
}).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
render() {
@ -39,7 +82,7 @@ render() {
</p>
:""}
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30" onClick={this.props.modalCancel}>取消</a>
<a className="task-btn mr30" onClick={this.modalCancel}>取消</a>
<a className="task-btn task-btn-orange" onClick={this.setDownload}>立即联系</a>
</div>
</div>

@ -96,13 +96,13 @@ class Header extends Component {
*/}
</div>
<div className="-header-right clearfix">
{(grade || grade == 0) && <div className="-header-right clearfix">
{/*<img src="/images/task/coin.png" className="fl" width="30" height="30" alt=""/>*/}
<span style={{width:'20px', height:'20px', background:'#FFD633', borderRadius: '10px', marginTop: '3px' }} className="fl"></span>
<span className="ml5 color-white fl" id="user_grade">
<a href={`${user.user_url}/user_grade`} target="_blank">{ grade === 0 ? grade : (grade || '')}</a>
</span>
</div>
</div>}

@ -75,7 +75,7 @@ class MainContent extends Component {
{/* 左侧任务说明等功能的区域 */}
<LeftViewContainer {...newProps}></LeftViewContainer>
</div>
<div id="can-drag" className="can-drag" style={{display: 'none'}}></div>
{showIframeContent && vnc_url && <div id="can-drag" className="can-drag" style={{display: 'none'}}></div>}
<div className="b-label -layout" style={{left: '687px'}}>
<div className="resize-helper ">
<Button variant="fab" aria-label="Swap" mini onClick={this.onResizeButtonClick}>

@ -13,6 +13,7 @@ class VNCDisplay extends Component {
// When this function is called we have
// successfully connected to a server
function connectedToServer(e) {
$('#top_bar').hide()
status("Connected to " + desktopName);
}
// This function is called when we are disconnected
@ -120,6 +121,9 @@ class VNCDisplay extends Component {
canvas
*/
rfb.scaleViewport = readQueryVariable('scale', false);
rfb.resizeSession = true
window.__rfb == rfb;
}
render() {
@ -127,7 +131,7 @@ class VNCDisplay extends Component {
return (
<div className="">
<div className="" style={{height: '100%'}}>
<style>{`
#top_bar {
background-color: #6e84a3;
@ -148,6 +152,7 @@ class VNCDisplay extends Component {
cursor: pointer;
}
#screen {
height: 100%;
flex: 1; /* fill remaining space */
overflow: hidden;
}

@ -91,9 +91,9 @@
.inline.exp {
margin-left: 18px;
}
.inline img{
margin-right: 8px;
}
/*.inline img{*/
/*margin-right: 8px;*/
/*}*/
.goldring{
margin-right: 8px;
width: 17px;
@ -132,3 +132,7 @@
.passed.stared:hover {
opacity: 1;
}
.vertical4{
vertical-align: -4px;
}

@ -476,7 +476,7 @@ class DetailCardsEditAndEdit extends Component{
footer={null}
width="840px"
destroyOnClose={true}
>Z
>
<Spin spinning={hometypepvisible} size="large" style={{marginTop:'15%'}}>
<div className="newupload_conbox">
<div className="clearfix mb20 shixun_work_div newshixun_tab_div cdefault" style={{"marginRight":"4px"}} id="shixun_tab_div">

@ -37,7 +37,16 @@ class NewFooter extends Component {
</ul>
</div>
<div>
<p className="footer_con-p inline lineh-30 font-14"><span className="font-18 fl">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</p>
<p className="footer_con-p inline lineh-30 font-14">
<span className="font-18 fl">©</span>&nbsp;2019&nbsp;EduCoder
<a style={{"color":"#888"}} target="_blank" href="http://beian.miit.gov.cn/" className="ml15 mr15">湘ICP备17009477号</a>
<a style={{"color":"#888"}} target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=43019002000962" className="mr15">
<img className="vertical4" src={require('./beian.png')}/>湘公网安备43019002000962号
</a>
<a href="https://team.trustie.net" style={{"color":"#888"}}
target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside. <span
className="mr15">版权所有 湖南智擎科技有限公司</span>
</p>
</div>
<div className="cl"></div>
</div>

@ -754,7 +754,7 @@ submittojoinclass=(value)=>{
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>我的实践课程</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的项目</Link></li>
<li><a href={`/account/basic`}>账号管理</a></li>
<li><a href={`/account/profile`}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
{/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
{/*<li><Link to={`/interest`}>兴趣页</Link></li>*/}

@ -1316,13 +1316,19 @@ export default class TPMsettings extends Component {
// onMouseEnter={operateauthority?this.bigopen:""}
onSelect={operateauthority?this.bigopens:""}
// open={opers}
showSearch
optionFilterProp="children"
filterOption={(input, option) =>
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
>
{
settingsData === undefined ? "" : settingsData.shixun.main_type.map((item, key) => {
return(
<Option value={item.id} key={key} title={item.description}>{item.type_name}</Option>
<Option value={item.id} key={key} title={item.description} >{item.type_name}</Option>
)
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -174,6 +174,9 @@ export default class TPManswer extends Component {
if (response.data.message) {
this.props.showSnackbar(response.data.message);
}
if (response.data.status == 1) {
$("html").animate({ scrollTop: 0 })
}
}
}).catch((error) => {

@ -58,7 +58,7 @@ export default class TPMchallengesnew extends Component {
marktype:false,
editPracticesendtype:false,
CreatePracticesendtype:false,
exec_time:undefined
exec_time:20
}
}
@ -230,6 +230,8 @@ export default class TPMchallengesnew extends Component {
}).then((response) => {
this.props.showSnackbar(response.data.messages);
if (response.data.status === 1) {
$("html").animate({ scrollTop: 0 })
this.setState({
setopen: true,
tab2url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=2",

@ -930,7 +930,7 @@ export default class TPMevaluation extends Component {
<span className="top-black-trangleft"></span>
<div className="padding20 invitecontent clearfix">
<p className="font-12 edu-txt-left">
图片处理或输出图片类型的任务请选此项<br/>
图片处理或输出图片类型的任务请选此项<br/>
可以通过设置图片路径和学员答案文件路径展示代码对应的图片效果<br/><br/>
apk/exe写可执行文件的任务请选填此项<br/>
可以通过设置学员答案文件路径展示二维码以供扫码下载<br/><br/>

@ -55,7 +55,7 @@ class AccountPage extends Component {
axios.get(url).then((result)=>{
if(result.data){
if(result.data && result.data.base_info_completed == false){
this.props.history.push(`/account/basic/edit`);
this.props.history.push(`/account/profile/edit`);
}
this.setState({
basicInfo: Object.assign({}, {...result.data}, { avatar_url: `${result.data.avatar_url}?t=${new Date().getTime()}`})
@ -79,12 +79,12 @@ class AccountPage extends Component {
<AccountNav {...this.props} {...common}></AccountNav>
<div className="basicFormWrap">
<Switch {...this.props}>
<Route exact path="/account/basic"
<Route exact path="/account/profile"
render={
(props) => (<AccountBasic {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
<Route exact path="/account/basic/edit"
<Route exact path="/account/profile/edit"
render={
(props) => (<AccountBasicEdit {...this.props} {...props} {...this.state} {...common} />)
}

@ -116,23 +116,6 @@ class LoginRegisterComponent extends Component {
console.log('Notification Clicked!');
},
});
// if(type === 1){
// notification['success']({
// message: "提示",
// description: messge,
// });
// }else if(type === 2){
// notification['warning']({
// message: "提示",
// description: messge,
// });
//
// }else{
// notification['error']({
// message: "提示",
// description: messge,
// });
// }
}
@ -344,8 +327,8 @@ class LoginRegisterComponent extends Component {
passwords: "",
Agreetotheterms: "",
})
// this.props.history.push(result.data.redirect_uri);
this.props.Setshowbool(2,this.state.logins,this.state.passwords);
this.props.history.push("/interesse");
// this.props.Setshowbool(2,this.state.logins,this.state.passwords);
} catch (e) {
}
@ -464,6 +447,8 @@ class LoginRegisterComponent extends Component {
this.SMSverification();
}
}
//滑动验证手机号
//获取登入
loginInputonChange = (e) => {
// console.log(e.target.value);
@ -593,8 +578,8 @@ class LoginRegisterComponent extends Component {
<div>
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}>
<Menu.Item key="0" className="font-18" style={{color:"#05101A"}}> 登录</Menu.Item>
<Menu.Item key="1" className="font-18" style={{color:"#05101A"}}>注册</Menu.Item>
<Menu.Item key="0" className={tab===0?"active font-18":"font-18"} > 登录</Menu.Item>
<Menu.Item key="1" className={tab===1?"active font-18":"font-18"} >注册</Menu.Item>
</Menu>
{

@ -54,7 +54,7 @@ class AccountBasicEdit extends Component {
<div className="titleWrap">
<div className="title">基本信息</div>
<Button type="primary" style={{ marginRight: '16px'}}
ghost onClick={() => this.props.history.push('/account/basic/edit')}>修改</Button>
ghost onClick={() => this.props.history.push('/account/profile/edit')}>修改</Button>
</div>
<Form onSubmit={this.handleSubmit}>

@ -366,7 +366,7 @@ class AccountBasic extends Component {
message: '请输入您的姓名',
}],
})(
<Input placeholder="请输入您的姓名" disabled={!showRealName} suffix={
<Input placeholder="请输入您的姓名" suffix={
<i className={showRealName?"iconfont icon-xianshi font-18 color-blue":"iconfont icon-yincang font-18 color-blue"} onClick={()=>this.showOrHide(showRealName,basicInfo.name)}></i>
}></Input>
)}

@ -4,7 +4,7 @@ import { SnackbarHOC, getImageUrl } from 'educoder';
import AccountImg from './AccountImg'
class AccountNav extends Component {
toBasic = () => {
this.props.history.push(`/account/basic`)
this.props.history.push(`/account/profile`)
}
toCertification = () => {
this.props.history.push(`/account/certification`)

@ -2,7 +2,7 @@ import React, { Component } from "react";
import { Modal } from "antd";
import axios from 'axios'
import ModalWrapper from "../../courses/common/ModalWrapper"
import { Cropper } from 'educoder'
import { Cropper, getUrl } from 'educoder'
const imageId = 'changeHeaderPic'
const previewId = 'changeHeader_imagePreview'
@ -39,11 +39,27 @@ class ChangeHeaderPicModal extends Component{
URL.revokeObjectURL(uploadedImageURL);
}
const image = document.getElementById( imageId );
image.src = uploadedImageURL = URL.createObjectURL(file);
// base64
var reader = new FileReader();
reader.readAsBinaryString(file);
reader.onload = () => {
let base64_content = btoa(reader.result);
console.log();
image.src = `data:${file.type};base64,${base64_content}` // uploadedImageURL = URL.createObjectURL(file);
that.fileUploaded = true;
that.refs['cropper'].renew(image)
// cropper.destroy();
// cropper = new Cropper(image, options);
inputImage.value = null;
};
reader.onerror = function() {
console.log('there are some problems');
};
} else {
this.props.showNotification && this.props.showNotification("请选择一个图片格式的文件")
// window.alert('Please choose an image file.');
@ -57,6 +73,8 @@ class ChangeHeaderPicModal extends Component{
this.refs['modalWrapper'].setVisible(visible)
if (visible) {
this.fileUploaded = false;
setTimeout(() => {
this.init()
}, 500)
@ -69,7 +87,12 @@ class ChangeHeaderPicModal extends Component{
}
onOk = () => {
if (this.fileUploaded != true) {
this.props.showNotification("请先上传图片")
return;
}
var img_lg = document.getElementById(previewId);
// https://github.com/niklasvh/html2canvas/issues/1908
// 截图小的显示框内的内容
window.html2canvas(img_lg).then((canvas) => {
var dataUrl = canvas.toDataURL("image/jpeg");
@ -97,7 +120,8 @@ class ChangeHeaderPicModal extends Component{
render(){
const { course_lists } = this.state
const { moduleName } = this.props
const { moduleName, current_user } = this.props
const userHeaderImgUrl = `${getUrl()}/images/${current_user.image_url}`
return(
<ModalWrapper
ref="modalWrapper"
@ -147,6 +171,7 @@ class ChangeHeaderPicModal extends Component{
<div className="cropperWrap">
<Cropper
imageSrc={''}
initPreviewUrl={userHeaderImgUrl}
ref="cropper"
imageId={imageId}
previewId="changeHeader_imagePreview"
@ -158,7 +183,9 @@ class ChangeHeaderPicModal extends Component{
className="df previewWrap" style ={{flexDirection: 'column'}}
>
<div>
<div id="changeHeader_imagePreview"></div>
<div id="changeHeader_imagePreview">
{userHeaderImgUrl && <img src={userHeaderImgUrl}></img>}
</div>
<div className="tip">头像预览</div>
</div>
<label id="uploadBtn" for="inputImage">

@ -101,7 +101,6 @@
}
.ysllogin_register_contents{
display: flex;
margin-top: 30px;
justify-content: center;
box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15);
border-radius:6px;

@ -26,6 +26,7 @@ a:hover,a:active{color:#026434;}
.ml10{ margin-left:10px;}
.ml15{ margin-left:15px;}
.ml30{margin-left: 30px;}
.ml38{margin-left: 38px;}
.ml50{margin-left: 50px;}
.mr5{ margin-right:5px;}
.mr10{ margin-right:15px;}

@ -455,6 +455,7 @@ li.li-width7{width: 7%;text-align: left}
.top-black-trangle{display: block;border-width: 8px;position: absolute;top: -16px;right: 4px;border-style: dashed solid dashed dashed;border-color: transparent transparent rgba(5,16,26,0.6) transparent;font-size: 0;line-height: 0;}
.right-black-trangle{display: block;border-width: 8px;position: absolute;top: 10px;right: -16px;border-style: dashed solid dashed dashed;border-color: transparent transparent transparent rgba(5,16,26,0.6);font-size: 0;line-height: 0;}
.activity-nav.active{color: #4CACFF!important;}
.yslinvitetip{right: 140px;color: #fff; box-sizing: border-box;width: 170px;text-align: center;border-radius: 2px;background-color: rgba(5,16,26,0.6)}
.courseNewNum{display: block;background: #FF6800;border-radius:30px;padding:0px 2px;color: #fff!important;font-size: 11px;

Loading…
Cancel
Save