杨树林 5 years ago
commit d79f79424d

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

@ -3,7 +3,7 @@ export function getImageUrl(path) {
// https://www.educoder.net
// https://testbdweb.trustie.net
// const local = 'http://localhost:3000'
const local = 'https://testeduplus2.educoder.net'
const local = 'http://47.96.87.25:48080'
if (isDev) {
return `${local}/${path}`
}

@ -171,7 +171,7 @@ class TPIContextProvider extends Component {
}
let testPath = ''
if (window.location.port == 3007) {
testPath = 'https://testeduplus2.educoder.net'
testPath = 'http://47.96.87.25:48080'
}
// var url = `${testPath}/api/v1/games/${ game.identifier }/cost_time`
var url = `${testPath}/api/tasks/${ game.identifier }/cost_time`

@ -169,7 +169,8 @@ class Fileslistitem extends Component{
margin-top: 0px;
}
`}</style>
{checkBox}
<style>{`
.boardsList .panel-list-img {
width: 50px;
@ -197,7 +198,9 @@ class Fileslistitem extends Component{
`}</style>
<div className="clearfix ds pr contentSection">
<h6>
<span className="fl mr12 mt3">
{checkBox}
</span>
{
this.props.isAdmin ? <a
// href={"/courses/" + coursesId + "/graduation/graduation_tasks/" + categoryid + "/" + taskid + "/list"}
@ -263,7 +266,7 @@ class Fileslistitem extends Component{
}
</style>
{discussMessage.course_groups.length===0?"":
<p className="color-grey panel-lightgrey mt8 fl lightgreybox" style={{width:'100%'}}>
<p className="color-grey panel-lightgrey mt8 fl lightgreybox ml30" style={{width:'100%'}}>
{discussMessage.course_groups.map((item,key)=>{
return(
<div className="mr50">
@ -275,7 +278,7 @@ class Fileslistitem extends Component{
</p>}
<p className="color-grey panel-lightgrey mt8 fl" style={{width:'100%'}}>
<p className="color-grey panel-lightgrey mt8 fl ml30" style={{width:'100%'}}>
<span className="mr50">
<span className="mr15 color-dark">{discussMessage.author.login}</span>
<span className="mr15 color-grey9">大小 {discussMessage.filesize}</span>
@ -290,7 +293,7 @@ class Fileslistitem extends Component{
</span>
</span>
{this.props.isAdmin ||this.props.current_user.login===discussMessage.author.login?
<span className={"fr mrf2"}>
<span className={"fr mrf2 mr10"}>
<WordsBtn style="blue" className="colorblue font-16 mr20 fr">
<a className="btn colorblue"
@ -307,14 +310,15 @@ class Fileslistitem extends Component{
<p className="color-grey panel-lightgrey mt8 fl" style={{width:'100%'}}>
<span className="mr50">
{/*<span className="mr15 color-dark"></span>*/}
<span className="mr15 color-dark">
<pre>资源描述 :{discussMessage.description===null?"暂无描述":discussMessage.description}</pre>
</span>
{/*{this.props.isAdmin ?<span><i className="iconfont icon-bianjidaibeijing font-22 color-green" onClick={()=>this.settingList()}></i></span>:""}*/}
</span>
<p className="color-grey panel-lightgrey mt8 fl ml30" style={{width:'100%'}}>
<pre className="color-dark">资源描述 :{discussMessage.description===null?"暂无描述":discussMessage.description}</pre>
{/*<span className="mr50">*/}
{/*/!*<span className="mr15 color-dark"></span>*!/*/}
{/*<span className="mr15 color-dark">*/}
{/*</span>*/}
{/*/!*{this.props.isAdmin ?<span><i className="iconfont icon-bianjidaibeijing font-22 color-green" onClick={()=>this.settingList()}></i></span>:""}*!/*/}
{/*</span>*/}
</p>

@ -97,13 +97,6 @@ class CommonWorkItem extends Component{
setupdate = () => {
}
toCreateProject = () => {
if (window.location.port == 3007) {
window.location.href = '/testbdweb.educoder.net/projects/new'
} else {
window.location.href = '/projects/new'
}
}
render(){
let { mainList,workType }=this.props;
const { aModalVisible, fileList, revise_reason } = this.state

@ -85,13 +85,6 @@ class ConnectProject extends Component{
console.log(error);
})
}
toCreateProject = () => {
if (window.location.port == 3007) {
window.location.href = '/testbdweb.educoder.net/projects/new'
} else {
window.location.href = '/projects/new'
}
}
//关联项目
openConnectionProject=(work)=>{
this.work = work;
@ -175,7 +168,7 @@ class ConnectProject extends Component{
{
(!haveProjects) &&
<div className="edu-txt-center">
您当前尚未管理任何项目请先<WordsBtn style="blue" className="" onClick={this.toCreateProject}>创建项目</WordsBtn>
您当前尚未管理任何项目请先<WordsBtn style="blue" className="" onClick={this.props.toCreateProject}>创建项目</WordsBtn>
</div>
}

@ -477,7 +477,7 @@ class NewWork extends Component{
<span className="ml15 mr15">~</span>
{/* min={has_commit ? init_max_num : (min_num == undefined ? 2 : min_num + 1) } */}
<ConditionToolTip condition={has_commit} title={'已有提交作品,人数范围只能扩大'}>
<InputNumber className="winput-240-40" placeholder="请填写每组最大人数" value={max_num}
<InputNumber className="winput-240-40" placeholder="请填写每组最大人数" value={max_num} max={10}
onChange={this.max_num_change} style={{width:'180px'}} />
</ConditionToolTip>
<label className="color-grey-9 ml20 font-14">项目管理员角色的成员都可以提交作品提交作品时需要关联同组成员组内成员作品共享</label>

@ -187,7 +187,13 @@ class UseBank extends Component{
display: -webkit-flex;
}
.setImgW .edu-nodata-img{
width:218px!important;
width:218px !important;
}
.bankwidth{
width:29% !important;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap
}
`}</style>
@ -269,7 +275,10 @@ class UseBank extends Component{
<span className="fl with65">
<label className="task-hide fl" title={item.name && item.name.length > 30 ? item.name:""} style={{"maxWidth":"100%"}}>{item.name}</label>
</span>
<span title={item.course_list_name && item.course_list_name.length > 14 && item.course_list_name} className={nav_my==='myself'?"fl with30 color-grey-6 task-hide pl5":"fl with30 color-grey-6 task-hide pl5"}>{item.course_list_name}</span>
<span title={item.course_list_name && item.course_list_name.length > 14 && item.course_list_name}
className={nav_my==='myself'?"fl with30 color-grey-6 task-hide pl5 bankwidth":"fl with30 color-grey-6 task-hide pl5 bankwidth"}
>{item.course_list_name}</span>
{
nav_my==='public' &&
<span className="fl with16 color-grey-6 task-hide pl10">{item.username}</span>

@ -17,6 +17,13 @@ export function RouteHOC(options = {}) {
}
}
toCreateProject = () => {
if (window.location.port == 3007) {
window.location.href = '/testbdweb.educoder.net/projects/new'
} else {
window.location.href = '/projects/new'
}
}
// common_homework group_homework
// 是否是分组作业
isGroup = () => {
@ -156,7 +163,7 @@ export function RouteHOC(options = {}) {
toWorkQuestionPage={this.toWorkQuestionPage}
toWorkSettingPage={this.toWorkSettingPage}
toCreateProject={this.toCreateProject}
isGroup={this.isGroup}
getModuleName={this.getModuleName}

@ -454,10 +454,19 @@ class CoursesBanner extends Component {
</div>
<style>
{
`
.teachersbox{
margin-right:28px !important;
}
`
}
</style>
<div className="clearfix clearfixborder">
<ul className="fl color-grey-eb pathInfo pathInfobox mt10">
<li className={"mt7"}>
<li className={"mt7 teachersbox"} >
<Link to={"/courses/"+this.props.match.params.coursesId+"/teachers"}>
<span className="color-grey-c fl font-16">教师</span>
<span

@ -269,12 +269,14 @@ class Coursesleftnav extends Component{
}
selectnavid=(e,key,id,type,urls,index)=>{
debugger
let {url}=this.state;
if(urls!=url){
debugger
this.props.history.replace(urls);
this.props.updataleftNavfun();
}else{
debugger
if (key === this.props.indexs) {
this.props.unlocationNavfun(undefined)
} else {
@ -678,6 +680,7 @@ class Coursesleftnav extends Component{
}
showsandians=(e,key,urls,num)=> {
debugger
let {url}=this.state;
if (key === this.props.indexs) {
this.props.unlocationNavfun(undefined)

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import { Modal,Checkbox,Input} from "antd";
import { Modal,Checkbox,Input, Spin, Icon } from "antd";
import axios from 'axios';
import Modals from '../../modals/Modals';
const CheckboxGroup = Checkbox.Group;
@ -23,6 +23,7 @@ class Addcourses extends Component{
modalsType:false,
modalsTopval:undefined,
modalSave:undefined,
isSpin:false
}
}
@ -144,17 +145,22 @@ class Addcourses extends Component{
}
submittojoinclass=()=>{
this.setState({
isSpin:true
})
let {invite_code,professor,assistant_professor,student}=this.state;
if(invite_code===undefined||invite_code===""){
this.setState({
invite_codetype:true,
invite_codevalue:"邀请码不能为空"
invite_codevalue:"邀请码不能为空",
spinning:false
})
return
}else{
this.setState({
invite_codetype:false,
invite_codevalue:" "
invite_codevalue:" ",
spinning:false
})
}
@ -178,7 +184,12 @@ class Addcourses extends Component{
// // modalSave:this.submitasyn,
// course_id:response.data.course_id
// })
this.submitasyn(response.data.course_id)
if(response.data.course_id!=undefined){
this.submitasyn(response.data.course_id)
}
this.props.hideAddcoursestype();
this.props.showNotification(response.data.message);
}else{
this.setState({
Addcoursestype:false
@ -193,8 +204,15 @@ class Addcourses extends Component{
// course_id:undefined
// })
}
this.setState({
spinning:false
})
}).catch((error) => {
console.log(error)
this.setState({
spinning:false
})
})
// if(value===0){
@ -258,7 +276,7 @@ class Addcourses extends Component{
modalsTopval,
modalSave
}=this.state;
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
return(
<div>
<Modals
@ -277,6 +295,7 @@ class Addcourses extends Component{
footer={null}
destroyOnClose={true}
>
<Spin indicator={antIcon} spinning={this.state.isSpin}>
<div className="task_popup_con ml30">
<div className="mr15">
<ul>
@ -331,6 +350,7 @@ class Addcourses extends Component{
</ul>
</div>
</div>
</Spin>
</Modal>
</div>
)

@ -235,10 +235,10 @@ class Associationmodel extends Component{
paddingLeft:'0px'
}}>
<div style={{
<div className={"font-16"} style={{
margin:'0px 20%'
}}>
你当前尚未管理任何项目请先 <span><a style={{color:'#1890ff'}} href={"/projects/new"}>创建项目</a> </span>
你当前尚未管理任何项目请先 <span><a className={"font-16"} style={{color:'#1890ff'}} href={"/projects/new"} target="_blank">创建项目</a> </span>
</div>
</div>}

@ -475,7 +475,7 @@ class Selectsetting extends Component{
`}</style>
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE">
<li className="fl" style={{width: '241px'}}>
<span className={"isabox"}> {datalist&&datalist.title} </span>
<span className={"isabox"} title={datalist&&datalist.title}> {datalist&&datalist.title} </span>
{datalist&&datalist.attachment_histories.length===0?"":<span className={"newcolor-orange fl"}>当前版本</span>}
</li>
<li className="fl edu-txt-left task-hide paddingl5 "
@ -490,7 +490,7 @@ class Selectsetting extends Component{
return(
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl" style={{width: '241px'}}>
<span className={"isabox"}> {item.title} </span>
<span className={"isabox"} title={item.title}> {item.title} </span>
{/*<span className={"newcolor-orange fl"}>当前版本</span>*/}
</li>
<li className="fl edu-txt-left task-hide paddingl5 "

@ -69,20 +69,23 @@ class ExerciseDisplay extends Component{
return(
<div className="edu-back-white">
<div className={"bor-bottom-greyE padding20-30"}>
<div className={" padding20-30"}>
<style>
{
`
.center{
text-align: center;
text-align: center;
}
.edu-back-white>.bor-bottom-greyE:last-child {
border-bottom: none !important;
}
`
}
</style>
<div className={"font-18 center"}>{exercise&&exercise.exercise_name}</div>
<div className={"font-14 center color-grey-9"}>{exercise&&exercise.exercise_description}</div>
<div className={"font-14 color-grey-9"}>{exercise&&exercise.exercise_description}</div>
</div>
<div className={"bor-bottom-greyE padding20-30 newContainer"}>
<div className={" padding20-30 newContainer"}>
<p className=" clearfix">
{
exercise_types && exercise_types.q_singles > 0 &&

@ -167,7 +167,7 @@ class ExerciseListItem extends Component{
{ IsAdmin &&<div className="homepagePostSetting" style={{"right":"-17px","top":"51px","display":"block","width":"100px"}}>
<a className="btn colorblue font-16" href={`/courses/${coursesId}/exercises/${item.id}/edit`} target={"_blank"}>编辑</a>
<a className="btn colorblue font-16" href={`/courses/${coursesId}/exercises/${item.id}/edit`}>编辑</a>
<a className="btn colorblue ml20 font-16" href={`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=3`}>设置</a>
</div> }

@ -342,6 +342,11 @@ class ExerciceNew extends Component{
this.editingId = null;
this.fetchExercise()
}
goToPreview = () => {
const exercise_id = this.props.match.params.Id
const courseId = this.props.match.params.coursesId
this.props.history.push(`/courses/${courseId}/exercises/${exercise_id}/student_exercise_list?tab=2`)
}
render() {
let { exercise_name, exercise_description, course_id, exercise_types,
exercise_questions, left_banner_id } = this.state;
@ -366,6 +371,8 @@ class ExerciceNew extends Component{
const isAdmin = this.props.isAdmin()
const courseId=this.props.match.params.coursesId;
const exercise_id = this.props.match.params.Id
const isEdit = this.isEdit
const commonHandler = {
onQestionDelete: this.onQestionDelete,
@ -395,7 +402,7 @@ class ExerciceNew extends Component{
background: #fff;
}
.exerciseNew .markdown-body {
max-width: 1088px;
max-width: 1128px;
}
`}</style>
<div className="edu-class-container edu-position courseForm">
@ -546,6 +553,11 @@ class ExerciceNew extends Component{
<ActionBtn style="green" className="mr20" onClick={() => this.addShixun(null)}>
<i className="iconfont icon-tianjiafangda color-white font-14 mr5" style={{ marginTop: '-1px', display: 'inline-block'}}></i>
</ActionBtn>
{exercise_id && <ActionBtn style="blue" className="fr" onClick={() => this.goToPreview()}>
{/* <i className="iconfont icon-tianjiafangda color-white font-14 mr5" style={{ marginTop: '-1px', display: 'inline-block'}}></i> */}
试卷预览
</ActionBtn>}
</div>}
</div>

@ -39,14 +39,14 @@ class NullChildEditor extends Component{
let { question_title, question_score, question_type, question_choices, standard_answers } = this.state;
let { question_id, index, onAnswerChange, addChildAnswer, toMDMode, exerciseIsPublish,
answers } = this.props;
// marginTop: '18px'
return(
<div className="df" style={{ marginTop: '18px'}}>
<div className="df" style={{ }}>
<div className="color-grey-6 mb5 mt6" style={{ flex: '0 0 90px'}}>答案(填空{index + 1}):</div>
<div className="df flex1" style={{flexDirection: 'column'}}>
{
answers.map((item, itemIndex) => {
return <div className="df mb20 flex1" >
return <div className="df flex1" >
<div className="flex1" style={{ flex: '0 0 1000px'}}>
<DMDEditor
className={'nullChildEditor'}

@ -80,12 +80,14 @@ class NullDisplay extends Component{
.answers .answer {
background: #EDEDED;
color: #C5C5C5;
width: 100%;
display: inline-block;
line-height: 16px;
padding:12px 10px;
margin-bottom:10px;
border-radius:2px;
max-width: 1024px;
word-break: break-all;
}
.answerRow {
padding: 1px 0;

@ -282,7 +282,7 @@ class NullEditor extends Component{
display: inline-block;
}
.content_editorMd_show {
display: flex;
maxWidth: 1000px;
}
`}</style>

@ -71,7 +71,7 @@ class SingleDisplay extends Component{
let length = 5;
const qName = qNameArray[question_type]
return(
<div className="bor-bottom-greyE padding20-30" id={qNumber} _id={question_id}>
<div className="bor-bottom-greyE padding20-30 singleDisplay" id={qNumber} _id={question_id}>
<style>{`
.optionMdEditor {
flex: 0 0 800px

@ -219,9 +219,10 @@ class SingleEditor extends Component{
}
.optionRow {
margin:0px!important;
margin-bottom: 20px!important;
/* margin-bottom: 20px!important; */
}
.signleEditor .content_editorMd_show{
display: flex;
margin-top:0px!important;
border-radius:2px;
max-width: 1056px;

@ -29,4 +29,8 @@
.nullChildEditor {
width: 100%;
display: inline-block;
}
.singleDisplay .options .markdown-body {
max-width: 1116px;
}

@ -197,6 +197,13 @@ class GraduateTaskItem extends Component{
{/*
style={{borderTop:data===undefined?"":data.course_identity<4?'1px solid #EBEBEB':'1px solid transparent'}}
*/}
{
this.props.isAdmin?"":<style>{`
.boardsList .contentSection {
margin-left: 0px !important;
}
`}</style>}
<div className="clearfix ds pr pt5 contentSection" >
<style>{`
@ -297,7 +304,7 @@ class GraduateTaskItem extends Component{
{item==="提交作品"?
<WordsBtn style="blue" className="colorblue font-16 mr20 fr mt12">
<WordsBtn style="blue" className="colorblue font-16 ml20 fr mt12">
<a className="btn colorblue" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/"+this.props.taskid+"/works/new"}>提交作品</a>
</WordsBtn>
@ -305,7 +312,7 @@ class GraduateTaskItem extends Component{
{item==="补交作品"?
<WordsBtn style="blue" className="colorblue font-16 mr20 fr mt12">
<WordsBtn style="blue" className="colorblue font-16 ml20 fr mt12">
<a className="btn colorblue" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/"+this.props.taskid+"/works/new"}>补交作品</a>
</WordsBtn>
@ -313,7 +320,7 @@ class GraduateTaskItem extends Component{
{item==="修改作品"?
<WordsBtn style="blue" className="font-16 colorblue mr20 fr mt12">
<WordsBtn style="blue" className="font-16 colorblue ml20 fr mt12">
<a className="btn colorblue" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.categoryid+"/"+this.props.workid+"/works/edit"}>修改作品</a>
</WordsBtn>
@ -321,7 +328,7 @@ class GraduateTaskItem extends Component{
{item==="查看作品"?
<WordsBtn style="blue" className="font-16 colorblue mr20 fr mt12">
<WordsBtn style="blue" className="font-16 colorblue ml20 fr mt12">
<a className="btn colorblue" href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+this.props.workid+"/appraise"}>查看作品</a>
</WordsBtn>
@ -329,7 +336,7 @@ class GraduateTaskItem extends Component{
{item==="创建项目"?
<WordsBtn className="colorblue font-16 mr20 fr mt12">
<WordsBtn className="colorblue font-16 ml20 fr mt12">
<a className="btn colorblue" href={'https://testbdweb.educoder.net/projects/new'}>创建项目</a>
</WordsBtn>
@ -337,20 +344,20 @@ class GraduateTaskItem extends Component{
{item==="关联项目"?
<WordsBtn onClick={this.AssociationItems} className="colorblue font-16 mr20 fr mt12">关联项目</WordsBtn>
<WordsBtn onClick={this.AssociationItems} className="colorblue font-16 ml20 fr mt12">关联项目</WordsBtn>
:""}
{item==="取消关联"?
<WordsBtn onClick={this.cannelAssociation} className="colorblue font-16 mr20 fr mt12">取消关联</WordsBtn>
<WordsBtn onClick={this.cannelAssociation} className="colorblue font-16 ml20 fr mt12">取消关联</WordsBtn>
:""}
{item==="补交附件"?
<WordsBtn className="colorblue font-16 mr20 fr mt12" onClick={this.addAccessory}>
<WordsBtn className="colorblue font-16 ml20 fr mt12" onClick={this.addAccessory}>
补交附件
{/*<a className="btn colorblue " href={"/courses/"+this.props.coursesId+"/graduation_tasks/"+discussMessage.work_id+"/appraise"}></a>*/}
</WordsBtn>

@ -116,7 +116,7 @@ class GraduationTaskssettinglist extends Component{
id: worklists[i].id,
status:worklists[i].status
}, {name:"评阅", id: worklists[i].id, status:worklists[i].status}]:[{name:"", id: worklists[i].id,
status:worklists[i].status}],
status:worklists[i].status,view_work:worklists[i].view_work}],
})
}
}
@ -741,7 +741,7 @@ class GraduationTaskssettinglist extends Component{
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅": <pre>
<Tooltip placement="bottom" title={record.finalscore.work_score==="--"?"未评阅": <pre>
{record.finalscore.final_score.username}({record.finalscore.final_score.login})<br/>
{record.finalscore.ultimate_score===true?"":"教师评分:"+record.finalscore.teacher_comment_score+"分"}<br/>
{record.finalscore.cross_comment_score===undefined?"":"交叉评分:"+record.finalscore.cross_comment_score+"分"+<br/>}
@ -785,7 +785,7 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>}
{tag.view_work===false?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>}
</div>
)}
):""

@ -663,7 +663,7 @@ class GraduationTasks extends Component{
<div style={{"display":"inline-block", "marginTop": "22px"}}>
<span>{all_count}个毕设任务</span>
<span style={{"marginLeft":"16px"}}>已发布{this.state.published_count}</span>
{this.props.isAdmin()?<span style={{"marginLeft":"16px"}}>未发布{this.state.unpublished_count}</span>:""}
<span style={{"marginLeft":"16px"}}>未发布{this.state.unpublished_count}</span>
</div>
}

@ -1753,7 +1753,7 @@ class Listofworks extends Component {
{/*<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 === true ?
this.state.code_review === false ?
""
: <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a> : ""}
</div>

@ -1,6 +1,6 @@
import React, {Component} from "react";
import {WordsBtn} from 'educoder';
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip} from "antd";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Spin} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom';
import axios from 'axios';
import ConclusionEvaluation from './shixunreport/ConclusionEvaluation';
@ -24,20 +24,27 @@ class ShixunWorkReport extends Component {
constructor(props) {
super(props);
this.state = {
data:undefined
data:undefined,
spinning:true
}
}
componentDidMount() {
this.setState({
spinning:true
})
let homeworkid=this.props.match.params.homeworkid;
let url = `/student_works/${homeworkid}/shixun_work_report.json`
axios.get(url).then((result) => {
this.setState({
data:result.data
data:result.data,
spinning:false
})
}).catch((error) => {
console.log(error)
this.setState({
spinning:false
})
})
let query = this.props.location.pathname;
const type = query.split('/');
@ -60,8 +67,10 @@ class ShixunWorkReport extends Component {
let category_id=data===undefined?"":data.category.category_id;
let homework_common_id=data===undefined?"":data.homework_common_id;
let homeworkid=this.props.match.params.homeworkid;
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
return (
data===undefined?"":<div className="newMain clearfix ">
data===undefined?"":<Spin indicator={antIcon} spinning={this.state.spinning}><div className="newMain clearfix ">
<div className={"educontent mb20" }>
<div className="educontent">
<p className="clearfix mt20">
@ -195,8 +204,8 @@ class ShixunWorkReport extends Component {
/>
</div>
{item.st===0?<div className="font-16 color-dark-21 ml20 mr20">
<div className="bor-grey-e mt15" >
{item.st===0?item.passed_code===null?"":<div className="font-16 color-dark-21 ml20 mr20">
<div className="bor-grey-e mt15">
<p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox">
<span className="fl">最近通过的代码</span>
<span className="fr codeboxright">{item.path}</span>
@ -233,6 +242,7 @@ class ShixunWorkReport extends Component {
</div>
</div>
</Spin>
)
}

@ -346,8 +346,19 @@ class ShixunhomeWorkItem extends Component{
</p>
{this.props.isAdmin?<div className="homepagePostSetting" style={{"right":"4px","top":"44px","display":"block","width":"192px"}}>
<style>
{
`
.homepagePostSettingname{
width:192px !important;
}
.homepagePostSettingbox{
width:121px !important;
}
`
}
</style>
{this.props.isAdmin?<div className={this.props.isClassManagement?"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.isClassManagement?<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>

@ -1708,7 +1708,7 @@ class Trainingjobsetting extends Component {
<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>
this.state.code_review===false?<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "":""}
</div>
</div>

@ -421,7 +421,7 @@ class Workquestionandanswer extends Component {
{this.props.isAdmin()?
this.state.code_review===true?
this.state.code_review===false?
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
:"":""}

@ -753,7 +753,7 @@ class ShixunHomework extends Component{
})
this.props.showNotification(response.data.message)
this.homeworkupdatalist(Coursename,page,order);
this.props.updataleftNavfun()
}
})
.catch(function (error) {
@ -782,7 +782,7 @@ class ShixunHomework extends Component{
this.setState({
Modalstype:true,
Modalstopval:"已提交作品将全部被删除,不可恢复",
Modalstopval:"已提交作品将全部被删除,不可恢复",
ModalsBottomval:"是否确认删除?",
ModalCancel:this.cancelmodel,
ModalSave:this.savedelete,
@ -1074,7 +1074,7 @@ class ShixunHomework extends Component{
{/*<WordsBtn style="blue" onClick={()=>this.editname(datas&&datas.main_category_name)} className={"mr30"}>目录重命名</WordsBtn>*/}
</span>:
<WordsBtn style="blue" onClick={()=>this.editDir(datas&&datas.category_name)} className={"mr30 font-16"}>目录重命名</WordsBtn>:""}
{this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?<WordsBtn style="blue" className="mr20 font-16" onClick={this.createCommonpath}>选用实训课程</WordsBtn>:"":""}
{this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?<WordsBtn style="blue" className="mr30 font-16" onClick={this.createCommonpath}>选用实训课程</WordsBtn>:"":""}
{this.props.isAdmin()===true?<a className={"btn colorblue font-16"} onClick={()=>this.createCommonWork()}>选用实训</a>:""}
</li>
</p>
@ -1085,7 +1085,7 @@ class ShixunHomework extends Component{
<div style={{"display":"inline-block", "marginTop": "22px"}}>
<span> {datas&&datas.all_count}个实训作业</span>
<span style={{"marginLeft":"16px"}}>已发布{datas&&datas.published_count}</span>
{this.props.isAdmin()?<span style={{"marginLeft":"16px"}}>未发布 {datas&&datas.unpublished_count}</span>:""}
<span style={{"marginLeft":"16px"}}>未发布 {datas&&datas.unpublished_count}</span>
</div>
</p>
<div className="fl mt6 task_menu_ul">

@ -1,103 +1,109 @@
import React, {Component} from "react";
import {WordsBtn} from 'educoder';
import {Table} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom';
class ConclusionEvaluation extends Component {
constructor(props) {
super(props);
this.state = {
}
}
componentDidMount() {
}
render() {
let {data}=this.props;
let columns=[{
title: '总评',
dataIndex: 'type',
key: 'type',
render: (text, record) => (
<span style={{color:'#FF6800'}}>{record.type}</span>
),
}, {
title: '获得经验值',
dataIndex: 'empirical',
key: 'empirical',
render: (text, record) => (
<span>
<span style={{color:'#FF6800'}}>{record.empirical.minute}</span><span className={"color-grey-9"}>/{record.empirical.total}</span>
</span>
),
}, {
title: '作业成绩',
dataIndex: 'grade',
key: 'grade',
render: (text, record) => (
<span>
<span style={{color:'#FF6800'}}>{record.grade.minute}</span><span className={"color-grey-9"}>/{record.grade.minute}</span>
</span>
),
}, {
title: '耗时',
key: 'elapsed',
dataIndex: 'elapsed',
render: (text, record) => (
<span className={"color-grey-9"}>
{record.elapsed}
</span>
),
}, {
title: '评测次数',
key: 'time',
dataIndex: 'time',
render: (text, record) => (
<span>
{record.time}
</span>
),
}];
let datas=[];
datas.push({
type: data&&data.overall_appraisal,
empirical: {minute:data&&data.myself_experience,total:data&&data.total_experience},
grade: {minute:data&&data.work_score,total:data&&data.all_work_score},
elapsed: data&&data.time_consuming,
time:data&&data.evaluate_count
})
return (
<div>
{/*{data===undefined?"":""}*/}
<style>{`
.ant-table-thead > tr > th{
text-align: center;
font-weight: 300;
}
.ant-table-tbody > tr > td{
text-align: center;
padding: 0px;
}
.ant-table-tbody > tr{
height:64px;
}
`}</style>
<Table
dataSource={datas}
columns={columns}
pagination={false}
// onChange={this.TablePagination}
/>
</div>
)
}
}
import React, {Component} from "react";
import {WordsBtn} from 'educoder';
import {Table,Tooltip,} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom';
class ConclusionEvaluation extends Component {
constructor(props) {
super(props);
this.state = {
}
}
componentDidMount() {
}
render() {
let {data}=this.props;
let columns=[{
title: '总评',
dataIndex: 'type',
key: 'type',
render: (text, record) => (
<span style={{color:'#FF6800'}}>{record.type}</span>
),
}, {
title: '获得经验值',
dataIndex: 'empirical',
key: 'empirical',
render: (text, record) => (
<span>
<span style={{color:'#FF6800'}}>{record.empirical.minute}</span><span className={"color-grey-9"}>/{record.empirical.total}</span>
</span>
),
}, {
title: '作业成绩',
dataIndex: 'grade',
key: 'grade',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={
<pre>
分数{record.grade.minute}/总分{record.grade.total}
</pre>
}>
<span style={{color:'#FF6800'}}>{record.grade.minute}</span><span className={"color-grey-9"}>/{record.grade.total}</span>
</Tooltip>
</span>
),
}, {
title: '耗时',
key: 'elapsed',
dataIndex: 'elapsed',
render: (text, record) => (
<span className={"color-grey-9"}>
{record.elapsed}
</span>
),
}, {
title: '评测次数',
key: 'time',
dataIndex: 'time',
render: (text, record) => (
<span>
{record.time}
</span>
),
}];
let datas=[];
datas.push({
type: data&&data.overall_appraisal,
empirical: {minute:data&&data.myself_experience,total:data&&data.total_experience},
grade: {minute:data&&data.work_score,total:data&&data.all_work_score},
elapsed: data&&data.time_consuming,
time:data&&data.evaluate_count
})
return (
<div>
{/*{data===undefined?"":""}*/}
<style>{`
.ant-table-thead > tr > th{
text-align: center;
font-weight: 300;
}
.ant-table-tbody > tr > td{
text-align: center;
padding: 0px;
}
.ant-table-tbody > tr{
height:64px;
}
`}</style>
<Table
dataSource={datas}
columns={columns}
pagination={false}
// onChange={this.TablePagination}
/>
</div>
)
}
}
export default ConclusionEvaluation;

@ -1,73 +1,74 @@
import React, {Component} from "react";
import {WordsBtn} from 'educoder';
import {Table} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom';
class Coursesshixundetails extends Component {
constructor(props) {
super(props);
this.state = {
loadingstate:true
}
}
componentDidMount() {
}
render() {
let {data}=this.props;
let columns=[{
title: '评测次数',
dataIndex: 'number',
width:"127px",
key: 'number',
render: (text, record) => (
<span>
{record.number}
</span>
),
}, {
title: '详细信息',
dataIndex: 'name',
key: 'name',
render: (text, record) => (
<span>
{record.name}
</span>
),
}];
let datas=[];
data&&data.forEach((item,key)=>{
datas.push({
number: item.position,
name: item.output_detail
})
})
return (
<div>
<style>{`
.ant-table-thead > tr > th{
text-align: center;
}
`}</style>
{data&&data?<Table
bordered
dataSource={datas}
columns={columns}
pagination={false}
// loading={loadingstate}
// onChange={this.TablePagination}
/>:""}
</div>
)
}
}
import React, {Component} from "react";
import {WordsBtn} from 'educoder';
import {Table} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom';
class Coursesshixundetails extends Component {
constructor(props) {
super(props);
this.state = {
loadingstate:true
}
}
componentDidMount() {
}
render() {
let {data}=this.props;
// console.log(data)
let columns=[{
title: '评测次数',
dataIndex: 'number',
width:"127px",
key: 'number',
render: (text, record) => (
<span>
{record.number}
</span>
),
}, {
title: '详细信息',
dataIndex: 'name',
key: 'name',
render: (text, record) => (
<span>
{record.name}
</span>
),
}];
let datas=[];
data&&data.forEach((item,key)=>{
datas.push({
number: item.position,
name: item.output_detail
})
})
return (
<div>
<style>{`
.ant-table-thead > tr > th{
text-align: center;
}
`}</style>
{data&&data? data.length===0?"":<Table
bordered
dataSource={datas}
columns={columns}
pagination={false}
// loading={loadingstate}
// onChange={this.TablePagination}
/>:""}
</div>
)
}
}
export default Coursesshixundetails;

@ -61,7 +61,7 @@ function startechart(data){
yAxis: [
{
type : "value",
name : " 实训总得分/实训总耗时",
name : " 实训总得分/实训总耗时",
nameGap: 20,
nameTextStyle: {
color: '#000',

@ -787,7 +787,7 @@ submittojoinclass=(value)=>{
<li><Link to={"/courses/new"}>新建课堂</Link></li>
<li><a href="/shixuns/new">新建实训</a></li>
<li><a href={this.props.Headertop===undefined?"":"/paths/new"}>新建实训课程</a></li>
<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.new_project_url}>新建项目</a></li>
<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.new_project_url} target="_blank">新建项目</a></li>
</ul>
<ul className="fl with50 edu-txt-center">
@ -811,7 +811,7 @@ submittojoinclass=(value)=>{
closable={false}
footer={null}
>
<div className="task_popup_con ml30">
<div className="task_popup_con">
<div className="mr15">
<ul>
<li className="clearfix mb10">

@ -123,13 +123,13 @@ export function TPMIndexHOC(WrappedComponent) {
componentDidMount() {
if(this.props.match.path==="/"){
document.title="创新源于实践";
document.title="创新源于实践";
}else if(this.props.match.path==="/403"){
document.title="你没有权限访问";
document.title="你没有权限访问";
}else if(this.props.match.path==="/nopage"){
document.title="没有找到该页面";
}else if(this.props.match.path==="/shixuns"){
document.title="开发社区";
document.title="开发社区";
}else if(this.props.match.path==="/paths"){
document.title="实训课程";
}else if(this.props.match.path==="/courses"){

@ -80,8 +80,15 @@ function md_elocalStorage(editor,mdu,id){
md_add_data("content",mdu,editor.getValue());
var id1 = "#e_tip_"+id;
var id2 = "#e_tips_"+id;
$(id2).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 ");
var textStart = " 数据已于 "
var text = textStart + h + ':' + m + ':' + s +" 保存 ";
// 占位符
if ($(id2).html() && $(id2).html() != ' ' && $(id2).html().startWith(textStart) == false) {
$(id2).html( $(id2).html().split(' (')[0] + ` (${text})`);
} else {
$(id2).html(text);
}
// $(id2).html("");
}
},10000);

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save