杨树林 5 years ago
commit 294723c903

@ -39,18 +39,29 @@ class DMDEditor extends Component{
onChange = (val) => {
// this.setState({ value: val })
this.props.onChange(val)
if (this.state.showError == true) {
this.setState({showError: false})
}
}
showError = () => {
this.mdRef.current.showError()
this.setState({showError: true})
}
render(){
const { mdMode } = this.state;
const { mdMode, showError } = this.state;
const { initValue } = this.props;
let _style = {}
if (showError) {
_style.border = '1px solid red'
}
_style = Object.assign(_style, {display: mdMode == true ? 'none' : '', color: initValue? '': '#999', alignItems: 'center', wordBreak: 'break-all'})
return(
<React.Fragment>
<style>{`
`}</style>
<div id="content_editorMd_show" className="new_li content_editorMd_show"
style={{display: mdMode == true ? 'none' : '', color: initValue? '': '#999', alignItems: 'center', wordBreak: 'break-all'}}
style={_style}
dangerouslySetInnerHTML={{__html: initValue ? markdownToHTML(initValue):this.props.placeholder}}
onClick={this.toMDMode}
>

@ -238,6 +238,7 @@
width: 100%;
word-wrap: break-word;
margin-bottom: 4px;
margin-top: 4px;
}
.childComment .break_word_comments{
line-height: 22px;

@ -96,7 +96,7 @@ class CommentItemMDEditor extends Component {
}
render() {
const { match, history, item, user } = this.props
const { match, history, item, user, buttonText } = this.props
if (!item) {
return <div></div>
}
@ -111,7 +111,7 @@ class CommentItemMDEditor extends Component {
</a>
</div>
<div id={`reply_message_${item.id}`} className="reply_to_message commentItemMDEditor"
style={{ paddingTop: '0px', paddingBottom: '20px', marginTop: '36px' }}
style={{ paddingTop: '0px', paddingBottom: '0px', marginTop: '36px' }}
>
<div id={`reply_message_editorMd_${item.id}`} className="editorMD" style={{ marginBottom: '0px'}}>
<textarea style={{'display': 'none'}}>
@ -119,11 +119,14 @@ class CommentItemMDEditor extends Component {
</div>
<div className="editor__resize" href="javascript:void(0);" style={{display: ''}}>调整高度</div>
<a id={`commitBtn_${item.id}`} href="javascript:void(0)"
onClick={this.onCommit} style={{ marginRight: '44px' }}
className="commentsbtn task-btn task-btn-blue fr " style={{display: ''}}>
发送
</a>
<div class="clearfix">
<a id={`commitBtn_${item.id}`} href="javascript:void(0)"
onClick={this.onCommit} style={{ marginRight: '44px' }}
className="commentsbtn task-btn task-btn-blue fr " style={{display: ''}}>
{ buttonText || '发送'}
</a>
</div>
</div>
</div>
);

@ -408,6 +408,7 @@ class Comments extends Component {
currentReplyComment={currentReplyComment}
item={item}
user={user}
buttonText={this.props.buttonText}
>
</CommentItemMDEditor>
}

@ -1,6 +1,7 @@
import React from 'react'
import ReactDOM from 'react-dom'
import axios from 'axios'
import { notification } from 'antd'
import update from 'immutability-helper'
import ImageLayer from '../page/layers/ImageLayer'
@ -569,6 +570,17 @@ export function commentHOC(WrappedComponent) {
imageSrc: '',
})
}
showNotification = (description, message = "提示", icon) => {
const data = {
message,
description
}
if (icon) {
data.icon = icon;
}
notification.open(data);
}
render() {
return (
<React.Fragment>
@ -584,7 +596,7 @@ export function commentHOC(WrappedComponent) {
hiddenComment={this.hiddenComment}
rewardCode={this.rewardCode}
onPaginationChange={this.onPaginationChange}
showNotification= { this.showNotification }
newMessage={this.newMessage}
showNewReply={this.showNewReply}
></WrappedComponent>

@ -668,7 +668,7 @@ class Fileslists extends Component{
<div style={{"display":"inline-block", "marginTop": "22px"}}>
<span> {total_count} 个资源</span>
<span style={{"marginLeft":"16px"}}>已发布{public_count}</span>
{this.props.isAdmin()||this.props.isStudent()?<span style={{"marginLeft":"16px"}}>未发布{private_count}</span>:""}
<span style={{"marginLeft":"16px"}}>未发布{private_count}</span>
</div>
}
onPressEnter={this.onPressEnter}

@ -416,7 +416,7 @@ class TopicDetail extends Component {
const user = this._getUser();
this.setState({
comments: addNewComment(comments, _id, content, user)
comments: addNewComment(comments, _id, content, user, this)
})
const newMemo2 = Object.assign({}, this.state.memo);
newMemo2.total_replies_count = newMemo2.total_replies_count + 1;
@ -526,8 +526,15 @@ class TopicDetail extends Component {
const courseId=this.props.match.params.coursesId;
const boardId = this.props.match.params.boardId
return (
<div className="edu-back-white edu-class-container edu-position course-message" id="forum_index_list"> {/* fl with100 */}
<div className="edu-back-white edu-class-container edu-position course-message topicDetail" id="forum_index_list"> {/* fl with100 */}
<style>{`
.topicDetail #forum_list .return_btn.no_mr {
margin-right: 1px;
}
/* 有内容时,编辑器下方的边框*/
.topicDetail .borderBottom.commentInputs {
border-bottom: 1px solid rgb(238, 238, 238);
}
.independent {
background: rgb(250, 250, 250);
padding-bottom: 20px;
@ -658,7 +665,7 @@ class TopicDetail extends Component {
</div>
<MemoDetailMDEditor ref="editor" memo={memo} usingMockInput={true} placeholder="说点什么"
height={160} showError={true} buttonText={'发表'}></MemoDetailMDEditor>
height={160} showError={true} buttonText={'发表'} className={comments && comments.length && 'borderBottom'}></MemoDetailMDEditor>
{/* onClick={ this.createNewComment }
enableReplyTo={true}

@ -31,7 +31,7 @@ function renderScore(score, content) {
} else if (score >= 60) {
color = '#FF6800'
}
return <a href="javascript:;" style={{ color, minWidth: '30px', display: 'inline-block', textAlign: 'center' }}>
return <a href="javascript:;" style={{ color, cursor: 'default', minWidth: '30px', display: 'inline-block', textAlign: 'center' }}>
{score == null || score == undefined || score == '--' ? '--': (content || score)}
</a>
}
@ -93,7 +93,7 @@ function buildColumns(that, student_works) {
</div>
),
}]
if (!niPingAndIsStudent) {
if (!niPingAndIsStudent && isAdminOrStudent) {
columns.push({
width: 88,
title: '学号',
@ -105,7 +105,7 @@ function buildColumns(that, student_works) {
<a href="javascript:;"
title={record.student_id}
style={{color:'#9A9A9A', 'text-overflow': 'ellipsis', 'white-space': 'nowrap', 'width': '100px', display: 'block', overflow: 'hidden'
, margin: '0 auto'}}
, margin: '0 auto', cursor: 'default'}}
>{record.student_id}</a>
</span>
),
@ -121,7 +121,7 @@ function buildColumns(that, student_works) {
render: (text, record) => (
<span>
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.group_name}</a>
<a href="javascript:;" style={{color:'#9A9A9A', cursor: 'default'}}>{record.group_name}</a>
</span>
),
} )
@ -177,7 +177,7 @@ function buildColumns(that, student_works) {
}
return (
<span>
<a href="javascript:;" style={{color: color}}>
<a href="javascript:;" style={{color: color, cursor: 'default'}}>
{status === 0 ? "未提交" : status === 1 ? "按时提交" : status === 2 ? "延时提交" : ""}
</a>
</span>
@ -190,7 +190,7 @@ function buildColumns(that, student_works) {
render: (update_time, record) => (
<span>
<a href="javascript:;" style={{color:'#989898'}}>{update_time ? moment(update_time).format('YYYY-MM-DD HH:mm') : '--'}</a>
<a href="javascript:;" style={{color:'#989898', cursor: 'default'}}>{update_time ? moment(update_time).format('YYYY-MM-DD HH:mm') : '--'}</a>
</span>
),
}])
@ -450,17 +450,17 @@ class CommonWorkList extends Component{
}
teacherCommentOptionChange = (values, isAllChecked) => {
this.setState({arg_teacher_comment: isAllChecked ? [] : values}, () => {
this.setState({arg_teacher_comment: isAllChecked ? [] : values, page: 1}, () => {
this.fetchList()
})
}
statusOptionChange = (values, isAllChecked) => {
this.setState({arg_work_status: isAllChecked ? [] : values}, () => {
this.setState({arg_work_status: isAllChecked ? [] : values, page: 1}, () => {
this.fetchList()
})
}
courseGroupOptionChange = (values, isAllChecked) => {
this.setState({arg_course_group: isAllChecked ? [] : values}, () => {
this.setState({arg_course_group: isAllChecked ? [] : values, page: 1}, () => {
this.fetchList()
})
}
@ -648,7 +648,7 @@ class CommonWorkList extends Component{
<CheckAllGroup options={options_teacher_comment} label={'你的评阅:'} onChange={this.teacherCommentOptionChange}></CheckAllGroup>
<CheckAllGroup options={options_status} label={'作品状态:'} onChange={this.statusOptionChange}></CheckAllGroup>
{options_course_group.length > 1 && <CheckAllGroup options={options_course_group} label={'分班情况:'} onChange={this.courseGroupOptionChange} checkboxGroupStyle={{width: '86%'}}></CheckAllGroup>}
{options_course_group.length > 1 && <CheckAllGroup options={options_course_group} label={'分班情况:'} onChange={this.courseGroupOptionChange} checkboxGroupStyle={{width: '980px'}}></CheckAllGroup>}
{/* value={search} */}

@ -64,13 +64,13 @@ export function handleContentBeforeCreateNew(argContent) {
return content
}
export function addNewComment(comments, _id, content, user, isSuperAdmin) {
export function addNewComment(comments, _id, content, user, isSuperAdmin, parentComponent) {
if (!comments) {
comments = [];
}
comments.unshift( {
"can_delete": true,
"admin": user.admin,
"admin": parentComponent ? parentComponent.props.isAdmin() : user.admin ,
isSuperAdmin: isSuperAdmin,
"content": content,

@ -175,7 +175,7 @@ class CCommentItem extends Component{
// src={getImageUrl(`images/${item.image_url}`)}
return (
<div className="comment_item_cont df clearfix" key={item.id}>
<div className="comment_item_cont appraise df clearfix" key={item.id}>
<div className="J_Comment_Face fl">
{item.is_appeal_info == true ?
<a href={`javascript:void(0)`} target="_blank">

@ -76,7 +76,7 @@ class CommonReply extends Component{
const isSuperAdmin = this.props.isSuperAdmin()
this.setState({
comments: addNewComment(this.state.comments, _id, content, user, isSuperAdmin),
comments: addNewComment(this.state.comments, _id, content, user, isSuperAdmin, this),
total_count: this.state.total_count + 1
})
this.refs.editor.showEditor();

@ -38,8 +38,10 @@
margin-top: 8px;
}
.course-message .comment_item_cont:last-child {
/* 作品评阅需要 */
border-bottom: none;
}
.course-message .appraise.comment_item_cont:last-child {
/* 作品评阅需要 */
padding-bottom: 0px;
}

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import { Modal,Checkbox,Input, Spin, Icon } from "antd";
import { Modal,Checkbox,Input, Spin, Icon,notification } from "antd";
import axios from 'axios';
import Modals from '../../modals/Modals';
const CheckboxGroup = Checkbox.Group;
@ -187,15 +187,26 @@ class Addcourses extends Component{
if(response.data.course_id!=undefined){
this.submitasyn(response.data.course_id)
}
notification.open({
message:"提示",
description:response.data.message
});
this.props.hideAddcoursestype();
this.props.showNotification(response.data.message);
// this.props.showNotification(response.data.message);
}else{
this.setState({
Addcoursestype:false
})
notification.open({
message:"提示",
description:response.data.message
});
this.setState({
Addcoursestype:false
})
this.props.hideAddcoursestype();
this.props.showNotification(response.data.message);
// this.setState({
// loadtype:true,
// modalsType:true,

@ -561,7 +561,7 @@ class ExerciseReviewAndAnswer extends Component{
</p>
{
exercise && exercise.exercise_description &&
<p className="color-grey-3 edu-back-white padding15 edu-txt-center mt30">{exercise.exercise_description}</p>
<p className="color-grey-3 edu-back-white padding15 mt30">{exercise.exercise_description}</p>
}
<p className="padding20-30 clearfix">
{

@ -222,6 +222,8 @@ class Testpapersettinghomepage extends Component{
:
<Menu mode="horizontal" selectedKeys={tab} onClick={this.changeTab}>
<Menu.Item key="0">答题列表</Menu.Item>
{Commonheadofthetestpaper&&Commonheadofthetestpaper.show_statistic===true?
<Menu.Item key="1">统计结果</Menu.Item>:""}
<Menu.Item key="3">设置</Menu.Item>
</Menu>
}

@ -55,21 +55,25 @@ class SingleEditor extends Component{
// TODO check
const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1);
if(!question_title) {
this.props.showNotification('请先输入题目题干'); return;
this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
}
const intScore = parseFloat(question_score)
if(!question_score || intScore == NaN) {
this.props.showNotification('分值不能为空'); return;
this.props.showNotification('分值不能为空'); return;
} else {
if (intScore == 0) {
this.props.showNotification('分值必须大于0'); return;
this.props.showNotification('分值必须大于0'); return;
}
}
if(!answerArray || answerArray.length == 0) {
this.props.showNotification('请先点击本题的正确选项'); return;
this.props.showNotification('必须设置标准答案'); return;
}
if(!question_title) {
this.props.showNotification('请先输入题目题干'); return;
this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
}
/**
@ -185,6 +189,7 @@ class SingleEditor extends Component{
<TPMMDEditor mdID={`question_${question_id}`} placeholder="请您输入题目" height={155} watch={false}
initValue={question_title} onChange={(val) => this.setState({ question_title: val})}
ref="titleEditor"
></TPMMDEditor>
<div>

@ -45,14 +45,17 @@ class MainEditor extends Component{
// TODO check
const answerArray = standard_answers
if(!question_title) {
this.props.showNotification('请先输入题目题干'); return;
this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
}
const intScore = parseFloat(question_score)
if(!question_score || intScore == NaN) {
this.props.showNotification('分值不能为空'); return;
this.props.showNotification('分值不能为空'); return;
} else {
if (intScore == 0) {
this.props.showNotification('分值必须大于0'); return;
this.props.showNotification('分值必须大于0'); return;
}
}
// if(!answerArray || answerArray.length == 0 || !answerArray[0]) {
@ -151,7 +154,7 @@ class MainEditor extends Component{
<TPMMDEditor mdID={`question_${question_id}`} placeholder="请您输入题目" height={155} watch={false}
initValue={question_title} onChange={(val) => this.setState({ question_title: val})}
noStorage={true}
noStorage={true} ref="titleEditor"
></TPMMDEditor>
<div>

@ -35,6 +35,10 @@ class NullChildEditor extends Component{
// this.mdReactObject = that;
// }
showError = (itemIndex) => {
this.refs[`nullChildDMDEditor${itemIndex}`].showError()
}
render() {
let { question_title, question_score, question_type, question_choices, standard_answers } = this.state;
let { question_id, index, onAnswerChange, addChildAnswer, toMDMode, exerciseIsPublish,
@ -49,6 +53,7 @@ class NullChildEditor extends Component{
return <div className="df flex1" >
<div className="flex1" style={{ flex: '0 0 1000px'}}>
<DMDEditor
ref={`nullChildDMDEditor${itemIndex}`}
className={'nullChildEditor'}
placeholder={`请输入参考答案${itemIndex == 0 ?'':'(可选)'}`}
toMDMode={toMDMode} noStorage={true}

@ -69,14 +69,16 @@ class NullEditor extends Component{
// const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1);
let answerArray = []
if(!question_title) {
this.props.showNotification('请先输入题目题干'); return;
this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
}
const intScore = parseFloat(question_score)
if(!question_score || intScore == NaN) {
this.props.showNotification('分值不能为空'); return;
this.props.showNotification('分值不能为空'); return;
} else {
if (intScore == 0) {
this.props.showNotification('分值必须大于0'); return;
this.props.showNotification('分值必须大于0'); return;
}
}
let isEmpty = false;
@ -88,7 +90,9 @@ class NullEditor extends Component{
answers.forEach((item, itemIndex) => {
answerArray[index].answer_text.push(item)
if(!item) {
this.props.showNotification(`请先输入第${index+1}个填空的第${itemIndex+1}参考答案。`);
this.refs[`nullChildEditor${index}`].showError(itemIndex)
// this.props.showNotification(`请先输入第${index+1}个填空的第${itemIndex+1}参考答案。`);
this.props.showNotification(`答案:不能为空`);
isEmpty = true;
}
})
@ -97,7 +101,9 @@ class NullEditor extends Component{
return;
}
if(!question_title) {
this.props.showNotification('请先输入题目题干'); return;
this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
}
/**
@ -294,13 +300,16 @@ class NullEditor extends Component{
<NullMDEditor {...this.props} mdID={`question_${question_id}`} placeholder="请您输入题目" height={155} watch={false}
initValue={question_title} onChange={(val) => this.setState({ question_title: val})}
onPlaceholderChange={this.onPlaceholderChange} showNullButton={exerciseIsPublish ? false : true}
ref="titleEditor"
></NullMDEditor>
<div className="clearfix">
{
standard_answers.map((answers, index) => {
return <NullChildEditor {...this.props}
return <NullChildEditor
ref={`nullChildEditor${index}`}
{...this.props}
toMDMode={this.toMDMode}
answers={answers}
index={index}

@ -84,7 +84,9 @@ export default class NullMDEditor extends Component {
}
showError = () => {
this.refs['nullMDEditor'].showError()
}
render() {
let {
@ -94,6 +96,7 @@ export default class NullMDEditor extends Component {
return (
<TPMMDEditor {...this.props}
onCMBeforeChange={this.onCMBeforeChange}
ref='nullMDEditor'
>
</TPMMDEditor>
)

@ -98,7 +98,7 @@ class ShixunEditor extends Component{
// }
for(let _i = 0; _i < question_scores.length; _i++) {
if (!question_scores[_i] || question_scores[_i] == '0') {
this.props.showNotification(`${_i+1}题的分值必须大于0`); return;
this.props.showNotification(`${_i+1}题的分值必须大于0`); return;
}
}

@ -87,7 +87,10 @@ class SingleEditor extends Component{
// TODO check
const answerArray = standard_answers.map((item, index) => { return item == true ? index+1 : -1 }).filter(item => item != -1);
if(!question_title) {
this.props.showNotification('请先输入题目题干'); return;
this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
}
const intScore = parseFloat(question_score)
if(!question_score || intScore == NaN) {
@ -101,11 +104,15 @@ class SingleEditor extends Component{
this.props.showNotification('请先点击选择本选择题的正确选项'); return;
}
if(!question_title) {
this.props.showNotification('请先输入题目题干'); return;
this.refs['titleEditor'].showError()
this.props.showNotification('题目:不能为空'); return;
}
for(let i = 0; i < question_choices.length; i++) {
if (!question_choices[i]) {
this.refs[`optionEditor${i}`].showError()
this.props.showNotification(`请先输入 ${tagArray[i]} 选项的内容`); return;
}
}
@ -237,6 +244,8 @@ class SingleEditor extends Component{
<TPMMDEditor mdID={qNumber} placeholder="请您输入题目" height={155} watch={false} className="mb20"
initValue={question_title} onChange={(val) => this.setState({ question_title: val})}
ref="titleEditor"
></TPMMDEditor>
{question_choices.map( (item, index) => {
@ -254,6 +263,7 @@ class SingleEditor extends Component{
{/* </Tooltip> */}
<div style={{ flex: '0 0 1038px'}}>
<DMDEditor
ref={`optionEditor${index}`}
toMDMode={this.toMDMode} toShowMode={this.toShowMode}
height={166} className={'optionMdEditor'} watch={false} noStorage={true}
mdID={qNumber + index} placeholder="" onChange={(value) => this.onOptionContentChange(value, index)}

@ -200,7 +200,7 @@ class shixunAnswer extends Component{
className:"edu-txt-center",
render:(testCount,item,index)=>{
return(
<span>{ item.testCount ? item.testCount : "--" }</span>
<span>{ item.testCount ? item.testCount : <span className="color-grey-9">--</span> }</span>
)
}
}, {
@ -210,7 +210,7 @@ class shixunAnswer extends Component{
className:"edu-txt-center",
render:(endTime,item,index)=>{
return(
<span>{ item.endTime ? item.endTime : "--" }</span>
<span>{ item.endTime ? item.endTime : <span className="color-grey-9">--</span> }</span>
)
}
}, {
@ -220,7 +220,7 @@ class shixunAnswer extends Component{
className:"edu-txt-center",
render:(needTime,item,index)=>{
return(
<span>{ item.needTime ? item.needTime : "--" }</span>
<span>{ item.needTime ? item.needTime : <span className="color-grey-9">--</span> }</span>
)
}
}, {
@ -259,7 +259,7 @@ class shixunAnswer extends Component{
step={0.1}
precision={1}
value={item.input_score}
style={{width:"60px",marginRight:"5px"}}
style={{width:"60px",marginLeft:"5px"}}
placeholder="请输入分数"
onChange={(value)=>{this.changeThis(value,index)}}
onBlur={(value)=>this.changeThisScore(value,item.id,index)}
@ -269,9 +269,9 @@ class shixunAnswer extends Component{
}
{
item.operation ?
<a className={isAdmin ? "color-blue ml20":"color-blue"} target="_blank" href='javascript:void(0)' onClick={()=>this.scrollToAnchor(`${questionType.question_id}${index+1}`)}>查看</a>
<a className={isAdmin ? "color-blue mt5 fr":"color-blue"} target="_blank" href='javascript:void(0)' onClick={()=>this.scrollToAnchor(`${questionType.question_id}${index+1}`)}>查看</a>
:
<a className={isAdmin ? "color-grey-9 ml20":"color-grey-9"} target="_blank" href='javascript:void(0)'>--</a>
<span className={isAdmin ? "color-grey-9 mt5 fr":"color-grey-9"} >--</span>
}
</span>
)
@ -279,28 +279,38 @@ class shixunAnswer extends Component{
}];
return(
<div>
<style>
{`
.resetTableStyle .ant-table-tbody > tr > td{
padding:10px 5px!important;
}
.resetCodeMirrorStyle .CodeMirror{
height:auto!important;
}
`}
</style>
{ exercise && ((exercise.student_commit_status && exercise.student_commit_status != 0) || (exercise.user_exercise_status && exercise.user_exercise_status !=0) ) ?
<div>
<p className="padding20-30 font-16 color-grey-6 pl30">阶段成绩</p>
<div className="stageTable">
<div className={challenge && challenge.length > 0 ? "pl30 pr30 resetTableStyle":"pl30 pr30 resetTableStyle stageTable"}>
{ data && data.length>0 ? <Table columns={columns} dataSource={data} pagination={false}></Table> : "" }
</div>
{
challenge && challenge.length > 0 &&
<div>
<p className="padding20-30 font-16 color-grey-6 pl30">实训详情</p>
<p className="mt20 pr30 font-16 color-grey-6 pl30">实训详情</p>
{
challenge.map((item,key)=>{
return(
<div className="pl30 pr30" id={`challenge_${questionType.question_id}${key+1}`}>
<div className="pl30 pr30 mt20" id={`challenge_${questionType.question_id}${key+1}`}>
<p className="clearfix mb20">
<span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF">
<i className="fa fa-code font-16 color_white"></i>
</span>
<span className="fl mt3 font-14">
<span className="fl mt3 font-16">
<span className="font-bd mr15">{item[0].position}</span>
<Link to={"/shixuns/"+item[0].game_identifier+"/challenges"}>
<span className={"font-14"}>{item[0].name}</span>
<span className={"font-16"}>{item[0].name}</span>
</Link>
</span>
</p>
@ -308,7 +318,7 @@ class shixunAnswer extends Component{
{...this.props} {...this.state} challenge={item[0].outputs}
></ShixunAnswerDetail>
{ item[0].st===0 ? <div className="font-16 color-dark-21 mb10">
{ item[0].st===0 ? <div className="font-16 color-dark-21">
<div className="bor-grey-e mt15">
<p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox">
<span className="fl">最近通过的代码</span>
@ -316,7 +326,7 @@ class shixunAnswer extends Component{
</p>
<div className="test-code bor-top-greyE">
<li className="clearfix">
<li className="clearfix resetCodeMirrorStyle">
<CodeMirror
value={item[0].passed_code}
options={{

@ -35,6 +35,7 @@ class GraduationTasksSubmitedit extends Component{
attachments:undefined,
spinnings:false,
shixunsreplace:false,
limit:20
}
}
@ -59,7 +60,7 @@ class GraduationTasksSubmitedit extends Component{
if(result.data.task_type===1){
}else{
this.searchList("",1,10,result.data.task_id)
this.searchList("",1,20,result.data.task_id)
}
this.props.form.setFieldsValue({
@ -222,15 +223,15 @@ class GraduationTasksSubmitedit extends Component{
let {search,workslist} = this.state;
this.searchList(search,1,10,workslist.task_id)
this.searchList(search,1,20,workslist.task_id)
}
searchList=(search,page,limit,id)=>{
searchList=(search,page,limit,id,types)=>{
let {memberslist}=this.state;
let newmemberslist=memberslist
this.setState({
search:search,
page:page,
limit:10
})
let newid=id
if(newid===undefined){
@ -245,9 +246,28 @@ class GraduationTasksSubmitedit extends Component{
}).then((result)=>{
if(result.status===200){
this.setState({
memberslist:result.data
})
if(types===1){
if(result.data.members.length>0) {
result.data.members.map((item, key) => {
newmemberslist.push(item)
})
}
this.setState({
memberslist:newmemberslist,
search:search,
page:page,
limit:limit
})
}else{
this.setState({
memberslist:result.data.members,
search:search,
page:page,
limit:limit
})
}
}
}).catch((error)=>{
@ -265,7 +285,7 @@ class GraduationTasksSubmitedit extends Component{
let newpage=page+2
this.searchList(search,newpage,limit,workslist.task_id)
this.searchList(search,newpage,limit,workslist.task_id,1)
}
@ -274,7 +294,7 @@ class GraduationTasksSubmitedit extends Component{
funtaskstatus=(checkedValues)=>{
let{memberslist,selectobjct}=this.state;
let newlist =memberslist.members;
let newlist =memberslist;
let newcheckedValues=checkedValues;
let selects=[];
@ -666,8 +686,8 @@ class GraduationTasksSubmitedit extends Component{
text-overflow:ellipsis;
white-space:nowrap
}
.width87{
width: 87px;
.width100{
width: 100px;
height: 24px;
}
img.edu-nodata-img {
@ -675,22 +695,25 @@ class GraduationTasksSubmitedit extends Component{
margin: 50px 90px 20px;
display: block;
}
.autos{
overflow: auto;
}
`}</style>
</Form.Item>
<div className={"ml20 mt10"} style={{width:"100%"}}>
<div className={"members fl"}
<div className={"members fl autos"}
style={{paddingLeft: '9px'}}
onScroll={this.contentViewScroll}>
<CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}>
{memberslist===undefined?"":memberslist.members.length===0? <div className="square-list clearfix">
{memberslist===undefined?"":memberslist.length===0? <div className="square-list clearfix">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">未找到包含{search}的学生</p>
</div>
</div>:memberslist&&memberslist.members.map((item,key)=>{
</div>:memberslist&&memberslist.map((item,key)=>{
return(
<div key={key} style={{
width: '375px',
@ -703,9 +726,9 @@ class GraduationTasksSubmitedit extends Component{
})
}
disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<div className={"fl ml5 fonthidden width87"} style={{width: '70px'}} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width87 color-grey-9"} style={{width: '70px'}}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"} style={{width: '70px'}}>{item.student_id}</div>
<div className={"fl ml5 fonthidden width100"} style={{width: '70px'}} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width100 color-grey-9"} style={{width: '70px'}}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width100"} style={{width: '70px'}}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===false?<span className={"color-orange"}>已提交</span> :""}</div>
</div>
)
@ -719,22 +742,30 @@ class GraduationTasksSubmitedit extends Component{
<i className={"iconfont icon-youjiang fl ml20 mr20"}></i>
</div>
<div className={"members fl"}>
<div className={"members fl autos"}>
{selectmemberslist&&selectmemberslist.map((item,key)=>{
return(
<div key={key} style={{
width: '375px',
height: '30px',
display:item.user_name===undefined?"none":""
}}>
<div className={"fl ml5 fonthidden width87"} style={{width: '50px'}} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"}>{item.student_id}</div>
{key>0?<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9"} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
</div>
)
if(item.group_name!=undefined) {
return (
<div key={key} style={{
width: '375px',
height: '30px',
display: item.user_name === undefined ? "none" : ""
}}>
<div className={"fl ml5 fonthidden width100"} style={{width: '50px'}}
title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width100 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width100"}>{item.student_id}</div>
{key > 0 ?
<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9"}
style={{marginTop: '-4px'}}
onClick={() => this.delecttask_status(item.user_id)}></i>
</div> : ""}
</div>
)
}
})}
</div>

@ -32,7 +32,8 @@ class GraduationTasksSubmitnew extends Component{
selectobjct:undefined,
Loadtype:false,
spinnings:false,
shixunsreplace:false
shixunsreplace:false,
limit:20
}
}
@ -58,7 +59,7 @@ class GraduationTasksSubmitnew extends Component{
if(result.data.task_type===1){
}else{
this.searchList("",1,10)
this.searchList("",1,20)
}
this.setState({
workslist:result.data,
@ -219,25 +220,42 @@ class GraduationTasksSubmitnew extends Component{
}
searchList=(search,page,limit)=>{
this.setState({
search:search,
page:page,
limit:10
})
searchList=(search,page,limit,types)=>{
let id=this.props.match.params.task_Id;
let {memberslist}=this.state;
let newmemberslist=memberslist
let url="/graduation_tasks/"+id+"/graduation_works/search_member_list.json";
axios.post(url,{
search:search,
page:page,
limit:limit
limit:15
}).then((result)=>{
if(result.status===200){
if(result.data.status!=403){
this.setState({
memberslist:result.data
})
if(types===1){
if(result.data.members.length>0){
result.data.members.map((item,key)=>{
newmemberslist.push(item)
})
}
this.setState({
memberslist:newmemberslist,
search:search,
page:page,
limit:limit
})
}else{
this.setState({
memberslist:result.data.members,
search:search,
page:page,
limit:limit
})
}
}
}
@ -256,7 +274,7 @@ class GraduationTasksSubmitnew extends Component{
let newpage=page+2
this.searchList(search,newpage,limit)
this.searchList(search,newpage,limit,1)
}
@ -265,7 +283,7 @@ class GraduationTasksSubmitnew extends Component{
funtaskstatus=(checkedValues)=>{
let{memberslist,selectobjct}=this.state;
let newlist =memberslist.members;
let newlist =memberslist;
let newcheckedValues=checkedValues;
let selects=[];
selects.push(selectobjct)
@ -318,7 +336,7 @@ class GraduationTasksSubmitnew extends Component{
let {search} = this.state;
this.searchList(search,1,10)
this.searchList(search,1,20)
}
}
onSearchKeywordKeyUps= (e)=>{
@ -648,8 +666,8 @@ render(){
text-overflow:ellipsis;
white-space:nowrap
}
.width87{
width: 87px;
.width100{
width: 100px;
height: 24px;
}
img.edu-nodata-img {
@ -657,21 +675,25 @@ render(){
margin: 50px 90px 20px;
display: block;
}
.autos{
overflow: auto;
}
`}</style>
<div className={"ml20"} style={{width:"100%"}}>
<div className={"members fl"}
<div className={"members fl autos"}
style={{paddingLeft: '9px'}}
onScroll={this.contentViewScroll}>
<CheckboxGroup value={task_status} onChange={this.funtaskstatus} style={{ paddingTop: '4px'}}>
{memberslist===undefined?"":memberslist.members.length===0?
{memberslist===undefined?"":memberslist.length===0?
<div className="square-list clearfix">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">未找到包含{search}的学生</p>
{/*<p className="edu-nodata-p mb20">未找到包含{search}的学生</p>*/}
<p className="edu-nodata-p mb20">未找到该学生</p>
</div>
</div>:memberslist&&memberslist.members.map((item,key)=>{
</div>:memberslist&&memberslist.map((item,key)=>{
return(
<div key={key} style={{
@ -684,9 +706,9 @@ render(){
})
}
disabled={item.commit_status===true?true:false} className="fl "></Checkbox>
<div className={"fl ml5 fonthidden width87"} title={item.user_name} >{item.user_name}</div>
<div className={"fl ml5 fonthidden width87 color-grey-9"} title={item.group_name}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"} title={item.student_id}>{item.student_id}</div>
<div className={"fl ml5 fonthidden width100"} title={item.user_name} >{item.user_name}</div>
<div className={"fl ml5 fonthidden width100 color-grey-9"} title={item.group_name}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width100"} title={item.student_id}>{item.student_id}</div>
<div className={"fl ml20"}>{item.commit_status===true?<span className={"color-orange"}>已提交</span> :""}</div>
</div>
)
@ -704,22 +726,25 @@ render(){
white-space:nowrap
}
`}</style>
<div className={"members fl"}>
<div className={"members fl autos"}>
{selectmemberslist&&selectmemberslist.map((item,key)=>{
return(
<div key={key} style={{
width: '375px',
height: '30px',
display:item.user_name===undefined?"none":""
}}>
<div className={"fl ml5 fonthidden width87"} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width87 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width87"}>{item.student_id}</div>
{key>0?<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9 "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
</div>
)
if(item.group_name!=undefined){
return(
<div key={key} style={{
width: '375px',
height: '30px',
display:item.user_name===undefined?"none":""
}}>
<div className={"fl ml5 fonthidden width100"} title={item.user_name}>{item.user_name}</div>
<div className={"fl ml5 fonthidden width100 color-grey-9"}>{item.group_name}</div>
<div className={"fl ml5 color-grey-9 fonthidden width100"}>{item.student_id}</div>
{key>0?<div className={"fr ml20"}><i className={"iconfont icon-shanchudiao fl color-grey-9 "} style={{marginTop:'-4px'}} onClick={()=>this.delecttask_status(item.user_id)}></i></div>:""}
</div>
)
}
})}
</div>

@ -33,7 +33,7 @@ class GraduationTasksedit extends Component{
componentDidMount(){
let {title_num}=this.state;
let tasksid=this.props.match.params.category_id;
let url ="/graduation_tasks/"+tasksid+"/edit.json"
@ -52,15 +52,18 @@ class GraduationTasksedit extends Component{
}
}
let namelength=result.data.task_name.length;
let sixlength=title_num-namelength
this.setState({
fileList:newfilelist,
description:result.data.description,
tasktype:result.data.task_type,
name:result.data.task_name,
data:result.data,
title_num:sixlength
})
this.props.form.setFieldsValue({
tasktype:result.data.task_type,
name:result.data.task_name,

@ -1168,7 +1168,8 @@ class GraduationTaskssettingapp extends Component{
value={end_time===null||end_time===""?"":moment(end_time, dateFormat)}
onChange={this.onChangeTimeend}
disabledTime={disabledDateTime}
disabled={this.props.isSuperAdmin()===true?flagPageEdit===true?false:true:this.props.isAdmin()===true?endtimetype===true?true:flagPageEdit===true?false:true:true}
// disabled={this.props.isSuperAdmin()===true?flagPageEdit===true?false:true:this.props.isAdmin()===true?endtimetype===true?true:flagPageEdit===true?false:true:true}
disabled={this.props.isAdmin()===true?endtimetype===true?true:flagPageEdit===true?false:true:true}
className={this.state.endTimetypes===true||end_timetype===true?"noticeTip":""}
/>
</span>
@ -1251,7 +1252,8 @@ class GraduationTaskssettingapp extends Component{
<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl36">
<div className={" font-16 color-dark h20 mb20"}>评分设置 </div>
<div className={"font-16 h20 mb20"}>最终成绩组成 <span className={"font-14 color-grey-c"}>取各教师最终评分的平均分</span></div>
<Checkbox className="ml40 font-16" checked={crosscomment} onChange={this.funcrosscomment} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>给老师分配其他指导老师的学生作品</span>
<Checkbox className="ml40 font-16" checked={crosscomment} onChange={this.funcrosscomment}
disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>给老师分配其他指导老师的学生作品</span>
</Checkbox>
{crosscomment===true?<div>
<div className={"h20 mb30 ml30 mt20 ml87"}>

@ -73,7 +73,7 @@ class GraduationTaskssettingReply extends Component{
const user = this._getUser();
this.setState({
comments: addNewComment(this.state.comments, _id, content, user),
comments: addNewComment(this.state.comments, _id, content, user, this.props.isSuperAdmin(), this),
total_count: this.state.total_count + 1
})
this.refs.editor.showEditor();

@ -800,55 +800,62 @@ class GraduationTaskssettinglist extends Component{
let category_id=this.props.match.params.category_id;
let task_Id = this.props.match.params.task_Id;
if(this.props.isStudent()===true){
columns.some((item,key)=> {
if (item.title === "学号") {
columns.splice(key, 1)
return true
}
}
)
}
if(taskslistdata&&taskslistdata.course_group_count<=0){
//分班有显示
columns.map((item,key)=>{
if(item.title==="分班"){
columns.splice(key,1)
columns.some((item,key)=> {
if (item.title === "分班") {
columns.splice(key, 1)
return true
}
}
})
)
}
if(taskslistdata&&taskslistdata.cross_comment===false){
columns.map((item,key)=>{
if(item.title==="交叉评分"){
columns.splice(key,1)
columns.some((item,key)=> {
if (item.title === "交叉评分") {
columns.splice(key, 1)
return true
}
}
)
}
if(taskslistdata&&taskslistdata.have_grouping===false){
columns.some((item,key)=> {
if (item.title === "关联项目") {
columns.splice(key, 1)
return true
}
})
}
)
if(taskslistdata&&taskslistdata.have_grouping===false){
columns.map((item,key)=>{
if(item.title==="关联项目"){
columns.splice(key,1)
}
})
columns.map((item,key)=>{
if(item.title==="分组"){
columns.splice(key,1)
}
})
}
}else{
if(taskslistdata&&taskslistdata.have_grouping===false){
columns.map((item,key)=>{
if(item.title==="关联项目"){
columns.splice(key,1)
}
})
columns.some((item,key)=> {
if (item.title === "分组") {
columns.splice(key, 1)
return true
}
}
)
columns.map((item,key)=>{
if(item.title==="分组"){
columns.splice(key,1)
}
})
}
}
}
return(
<React.Fragment>
@ -1018,8 +1025,8 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} className="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className="color-dark">导出作品附件</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} className="color-dark">学生成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className="color-dark">作品附件</a></li>
</ul>
</li>:""}

@ -17,7 +17,7 @@ class Graduationtaskitem extends Component{
let { item }=this.props;
const _content = item.content && this.parseCommentContent(item.content)
return(
<div className="comment_item_cont df clearfix" key={item.id}>
<div className="comment_item_cont appraise df clearfix" key={item.id}>
<div className="J_Comment_Face fl">
<a href={`${_origin}/users/${item.user_login}`} target="_blank">
<img alt="用户头像" height="50" src={getImageUrl(`images/${item.image_url}`)} width="50"/>

@ -103,7 +103,7 @@ class GraduateTopicDetail extends Component{
return(
<div className="newMain">
<div className="educontent mt10 mb50">
<p className="clearfix mb10">
<p className="clearfix mb15 lineh-20">
<WordsBtn style="grey" className="fl" to={`/courses/${tableData.course_id}`}>{tableData && tableData.course_name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${tableData.course_id}/graduation_topics/${tableData.graduation_id}`}>{tableData.graduation_name}</WordsBtn>
@ -111,9 +111,9 @@ class GraduateTopicDetail extends Component{
<span>选题详情</span>
</p>
<p className="clearfix mb20 lineh-25">
<span className="color-grey-3 font-24 fl task-hide" style={{lineHeight:"30px",maxWidth:"900px"}}>{tableData && tableData.graduation_topic_name}</span>
<span className="fl mt4" style={{height:"25px"}}><CoursesListType typelist={[`${tableData && tableData.status_name}`]} typesylename={""} /></span>
<WordsBtn className="fr font-16 mt2" style="grey" onClick={()=>this.props.history.goBack()}>返回</WordsBtn>
<span className="color-grey-3 font-24 fl task-hide" style={{lineHeight:"25px",maxWidth:"900px"}}>{tableData && tableData.graduation_topic_name}</span>
<span className="fl mt1" style={{height:"25px"}}><CoursesListType typelist={[`${tableData && tableData.status_name}`]} typesylename={""} /></span>
<WordsBtn className="fr font-16 mt1" style="grey" onClick={()=>this.props.history.goBack()}>返回</WordsBtn>
</p>
<div>
<div className="clearfix edu-back-white bor-bottom-greyE" >

@ -169,6 +169,7 @@ class GraduateTopicDetailTable extends Component{
} = this.state
const isAdmin =this.props.isAdmin();
const isStudent =this.props.isStudent();
const isNotMember=this.props.isNotMember();
console.log(un_addClass_notice)
return(
<div className="minH-560 edu-back-white">
@ -176,7 +177,7 @@ class GraduateTopicDetailTable extends Component{
<div className="topHead edu-txt-center">
<span style={{"width":"5%"}}>序号</span>
<span style={{"width":"12%"}}>姓名</span>
<span style={{"width":"13%"}}>学号</span>
{isNotMember ?"" :<span style={{"width":"13%"}}>学号</span>}
<span style={{"width":"15%"}}>分班</span>
<span style={{"width":"15%"}}>选题时间</span>
<span style={{"width":"12%"}} className="fr">操作</span>
@ -260,7 +261,7 @@ class GraduateTopicDetailTable extends Component{
<li className="color-grey-9 clearfix" key={key}>
<span style={{"width":"5%"}} className="color-grey-6">{parseInt(key+1)+(parseInt(page-1)*15)}</span>
<span style={{"width":"12%"}} className="color-grey-3">{item.student_name}</span>
<span style={{"width":"13%"}}>{item.student_id}</span>
{isNotMember ?"" :<span style={{"width":"13%"}}>{item.student_id}</span>}
<span style={{"width":"15%"}}>{item.class_group_name || "--"}</span>
<span style={{"width":"15%"}}>{item.selected_time}</span>
{
@ -288,6 +289,9 @@ class GraduateTopicDetailTable extends Component{
isAdmin &&
<span style={{"width":"12%"}} className={item.result === "已拒绝"?"fr color-orange-tip":"fr"}>{item.result=== "待确认"?"--":item.result}</span>
}
{
isNotMember && <span style={{"width":"12%"}} className="fr color-grey-9">--</span>
}
</li>
)

@ -70,9 +70,9 @@ class GraduateTopicItem extends Component{
`}</style>
<h6>
{
isNotMember?discussMessage.private_icon===true?
<a className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:<a onClick={() => this.toDetailPage(`${discussMessage.id}`)}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:""
isNotMember && discussMessage.private_icon===true ?
<a className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:
<a onClick={() => this.toDetailPage(`${discussMessage.id}`)} className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>
}
{

@ -67,7 +67,7 @@ class GraduateTopicReply extends Component{
const user = this._getUser();
this.setState({
comments: addNewComment(this.state.comments, _id, content, user),
comments: addNewComment(this.state.comments, _id, content, user, this.props.isSuperAdmin(), this),
total_count: this.state.total_count + 1
})
this.refs.editor.showEditor();

@ -221,7 +221,8 @@ class AddStudentModal extends Component{
<Checkbox className="fl" style={{ visibility: 'hidden' }} ></Checkbox>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'姓名'}</label></span>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'学号'}</label></span>
<span className="fl with45"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'单位'}</label></span>
<span className="fl with35"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'单位'}</label></span>
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px;"}}>{''}</label></span>
</p>
<Spin size="large" spinning={isSpin}>
@ -252,7 +253,8 @@ class AddStudentModal extends Component{
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.student_id || ' '}</label>
</ConditionToolTip>
</span>
<span className="fl with45"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.school_name}</label></span>
<span className="fl with35"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.school_name}</label></span>
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px"}}>{candidate.added ? '已加入' : ''}</label></span>
</p>
)

@ -292,7 +292,8 @@ class AddTeacherModal extends Component{
<Checkbox className="fl" style={{ visibility: 'hidden' }} ></Checkbox>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'姓名'}</label></span>
<span className="fl with25"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'昵称'}</label></span>
<span className="fl with45"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'单位'}</label></span>
<span className="fl with35"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{'单位'}</label></span>
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px"}}>{''}</label></span>
</p>
{ candidates && candidates.length ? <div>
@ -322,7 +323,8 @@ class AddTeacherModal extends Component{
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.nickname || ' '}</label>
</ConditionToolTip>
</span>
<span className="fl with45"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.school_name}</label></span>
<span className="fl with35"><label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.school_name}</label></span>
<span className="fl with10"><label className="task-hide fl" style={{"maxWidth":"48px;"}}>{candidate.added ? '已加入' : ''}</label></span>
</p>
)

@ -80,6 +80,15 @@ const buildColumns = (that) => {
width:"50%",
className:"color-grey-6"
}];
const isAdminOrStudent = that.props.isAdminOrStudent()
if (!isAdminOrStudent) {
columns.some((item,key)=> {
if (item.title === "学号") {
columns.splice(key, 1)
return true
}
})
}
const isAdmin = that.props.isAdmin()
if (isAdmin) {
columns.unshift({

@ -89,10 +89,20 @@ function buildColumns(that) {
</p>):
''
}
{course_groups && course_groups.length > 1 && <li key={'_all' + index} >
{/* 防止被外面group包裹 */}
<Checkbox.Group>
<Checkbox
checked={that.state.checkAllArray[index]}
style={{ marginRight: '6px' }} onClick={(e) => that.onCheckAllChange(e, item, index)} onChange={() => {}}
>全选</Checkbox>
</Checkbox.Group>
</li>}
<Checkbox.Group onChange={(checkedValues) => that.joinCourseGroup(checkedValues, item, index)}
value={arg_course_groups.map(item => item.id)}
disabled={!isAdminOrCreator}
>
{
course_groups && course_groups.filter((item) => {
return (!that.state.groupSearchValue || item.name.indexOf(that.state.groupSearchValue) != -1)
@ -107,6 +117,11 @@ function buildColumns(that) {
)
})
}
<p className="drop_down_btn">
<a href="javascript:void(0)" className="color-grey-6"
onClick={() => trigger('groupAdd', that.props.coursesids)}
>添加分班...</a>
</p>
</Checkbox.Group>
</ul>}
</React.Fragment> }
@ -165,7 +180,7 @@ function buildColumns(that) {
dataIndex: 'course_member_id',
key: 'course_member_id',
render: (content, item, index) => {
return <Checkbox value={content}></Checkbox>
return content ? <Checkbox value={content}></Checkbox> : ''
}
})
}
@ -190,7 +205,20 @@ class studentsList extends Component{
teachers: [],
checkBoxValues: [],
isSpin:false,
application_list: []
application_list: [],
checkAllArray: []
}
}
onCheckAllChange = (e, item, index) => {
const that = this;
debugger;
const checkAllArray = that.state.checkAllArray.slice(0)
checkAllArray[index] = !checkAllArray[index]
that.setState({checkAllArray})
if (checkAllArray[index]) {
that.joinCourseGroup(that.state.course_groups.map((item) => item.id), item, index)
} else {
that.joinCourseGroup([], item, index)
}
}
inputSearch=(e)=>{

@ -523,9 +523,7 @@ class Poll extends Component{
<p className="fl font-16" style={{"marginTop":"27px"}}>
<span className="mr20">{polls_counts && polls_counts.polls_total_counts}个问卷</span>
<span className="mr20">已发布{polls_counts && polls_counts.polls_published_counts}</span>
{
isAdmin && <span>未发布{polls_counts && polls_counts.polls_unpublish_counts}</span>
}
<span>未发布{polls_counts && polls_counts.polls_unpublish_counts}</span>
</p>
<div className="fr mt16 mb16 searchView">
<Search

@ -192,7 +192,12 @@ class PollDetailTabFirst extends Component{
key: 'classes',
dataIndex: 'classes',
width:160,
className:poll_types && poll_types.groups_count > 0 ? "edu-txt-center":"edu-txt-center none"
className:poll_types && poll_types.groups_count > 0 ? "edu-txt-center":"edu-txt-center none",
render:(classes,item,index)=>{
return(
item.classes ? <span>{item.classes}</span> : <span className="color-grey-9">--</span>
)
}
}, {
title: '提交状态',
dataIndex: 'status',
@ -212,22 +217,42 @@ class PollDetailTabFirst extends Component{
width:160,
render:(time,item,index)=>{
return(
item.time == null ? "--" : moment(item.time).format('YYYY-MM-DD HH:mm')
item.time == null ? <span className="color-grey-9">--</span> : moment(item.time).format('YYYY-MM-DD HH:mm')
)
}
},{
title: '操作',
dataIndex: 'operation',
key: 'operation',
className:poll_types && poll_types.un_anonymous ? "edu-txt-center":"edu-txt-center none",
className:"edu-txt-center",
width:120,
render:(operation,item,index)=>{
return(
item.status == 1 ? <WordsBtn style="blue" to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${item.login}`}>查看</WordsBtn>:<span>--</span>
item.status == 1 ? <WordsBtn style="blue" to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${item.login}`}>查看</WordsBtn>:<span className="color-grey-9">--</span>
)
}
}];
// 非课堂成员不显示学号列
let isNotMember =this.props.isNotMember();
if(isNotMember){
columns.some((item,key)=> {
if (item.title === "学号") {
columns.splice(key, 1)
return true
}
}
)
}
// un_anonymous true为实名问卷显示操作列否则隐藏
if(poll_types && (isNotMember || poll_types.un_anonymous == false)){
columns.some((item,key)=> {
if (item.title === "操作") {
columns.splice(key, 1)
return true
}
}
)
}
return(
<div>
{

@ -3,6 +3,7 @@ import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn,ActionBtn} from 'educoder';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import NoneData from '../coursesPublic/NoneData'
import {
Form,
Select,
@ -93,23 +94,27 @@ class ShixunStudentWork extends Component {
let url = "/homework_commons/" + homeworkid + "/code_review_results.json";
axios.get(url).then((response) => {
debugger
if (response.data.status === undefined || response.data.status === 0) {
if(response.data!=undefined){
let datas=[];
let list=response.data.users_reviews;
for(var i=0; i<list.length; i++){
datas.push({
number:i+1,
name:list[i].username,
stduynumber:list[i].student_id,
classroom:parseInt(list[i].code_rate),
operating:list[i].user_id
if(response.data.status!=-2){
let datas=[];
let list=response.data.users_reviews;
for(var i=0; i<list.length; i++){
datas.push({
number:i+1,
name:list[i].username,
stduynumber:list[i].student_id,
classroom:parseInt(list[i].code_rate),
operating:list[i].user_id
})
}
this.setState({
data: response.data,
datalist:datas
})
}
this.setState({
data: response.data,
datalist:datas
})
}
}
@ -154,21 +159,24 @@ class ShixunStudentWork extends Component {
}}).then((response) => {
if (response.data.status === undefined || response.data.status === 0) {
if(response.data!=undefined){
let datas=[];
let list=response.data.users_reviews;
for(var i=0; i<list.length; i++){
datas.push({
number:i+1,
name:list[i].username,
stduynumber:list[i].student_id,
classroom:parseInt(list[i].code_rate),
operating:list[i].user_id
if(response.data.status!=-2) {
let datas = [];
let list = response.data.users_reviews;
for (var i = 0; i < list.length; i++) {
datas.push({
number: i + 1,
name: list[i].username,
stduynumber: list[i].student_id,
classroom: parseInt(list[i].code_rate),
operating: list[i].user_id
})
}
this.setState({
data: response.data,
datalist: datas
})
}
this.setState({
data: response.data,
datalist:datas
})
}
}
@ -505,6 +513,18 @@ class ShixunStudentWork extends Component {
},
];
if(this.props.isNotMember()===true){
columns.some((item,key)=> {
if (item.title === "学号") {
columns.splice(key, 1)
return true
}
}
)
}
return (
<div className="newMain clearfix ">
{this.state.showmodel===true?<ShixunWorkModal
@ -535,7 +555,6 @@ class ShixunStudentWork extends Component {
starttimes={this.state.starttimes}
typs={this.state.typs}
/>
{data&&data?
<div className={"educontent mb20"}>
<div className="educontent mb25">
<p className="clearfix mb25 mt5">
@ -554,10 +573,10 @@ class ShixunStudentWork extends Component {
</div>
<div className="educontent mb30">
<p className=" fl color-black summaryname">
{data.homework_name}
{data&&data.homework_name}
</p>
<CoursesListType
typelist={data.homework_status}
typelist={data&&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>
@ -593,10 +612,10 @@ class ShixunStudentWork extends Component {
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""}
{this.props.isAdmin()?
data.end_immediately===true?
data&&data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "" : ""}
{this.props.isAdmin()?
data.publish_immediately===true?
data&&data.publish_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a> : "" : ""}
{/*{this.props.isAdmin()?*/}
@ -623,10 +642,11 @@ class ShixunStudentWork extends Component {
`}
</style>
<li className="clearfix startbox" style={{display:duplicatechecking===true?"":"none"}}>
<li className="clearfix startbox mb20" style={{display:duplicatechecking===true?"":"none"}}>
<span className={"startfont"}>
正在执行查重请稍后刷新页面查看结果 温馨提示执行时间因查重作品数以及作品的代码量而异
</span>
<NoneData></NoneData>
</li>
<style>
{`
@ -638,6 +658,8 @@ class ShixunStudentWork extends Component {
`}
</style>
{data&&data?
<div>
<ul className="clearfix" style={{padding: '20px 40px 10px 40px'}}>
<li className="clearfix ">
@ -742,9 +764,9 @@ class ShixunStudentWork extends Component {
/>}
</div>
</div>
</div>:""}
</div>:""}
</div></div>

@ -52,16 +52,17 @@ class ShixunWorkModal extends Component{
let types=false
let{group_list}=this.state;
group_list.map((item,key)=>{
checkedValues.map((list,li)=>{
if(item.id===list){
if(item.works_count<2){
this.props.showNotification(`有效作品数少于2个无法查重`)
types=true
return
if(item!=undefined){
checkedValues.map((list,li)=>{
if(item.id===list){
if(item.works_count<2){
this.props.showNotification(`有效作品数少于2个无法查重`)
types=true
return
}
}
}
})
})
}
})
if(types===false){

@ -117,7 +117,7 @@ class MemoDetailMDEditor extends Component {
this.initMDEditor()
}
render() {
const { match, history, memo, placeholder } = this.props
const { match, history, memo, placeholder, className } = this.props
const { isInited, errorMsg } = this.state
if (!memo) {
return <div></div>
@ -154,7 +154,7 @@ class MemoDetailMDEditor extends Component {
}
`}</style>
<div style={{ display: isInited ? 'none' : '', borderBottom: `${this.props.commentsLength == 0 ? 'none' : '1px solid #EEEEEE'}`}}
className="mockInputWrapper commentInput" >
className={`mockInputWrapper commentInput ${className}`} >
<input onClick={this.onMockInputClick} placeholder={placeholder || '我要回复'}></input>
<a href="javascript:void(0)"
onClick={this.onMockInputClick} className="commentsbtn task-btn task-btn-blue">
@ -172,7 +172,7 @@ class MemoDetailMDEditor extends Component {
`
} */}
</style>
<div nhname={`new_message_${memo.id}`} className="commentInput commentInputs"
<div nhname={`new_message_${memo.id}`} className={`commentInput commentInputs ${className}`}
style={{ padding: '30px',boxSizing:"border-box", display: isInited ? '' : 'none', paddingBottom: '40px' }} >
<div id="memo_comment_editorMd" className="editorMD" style={{ marginBottom: '0px'
, border: errorMsg ? '1px solid red' : '1px solid #ddd'}}>

@ -95,7 +95,7 @@ class SiderBar extends Component {
</div>
<div className="feedback" tooltips="意见反馈">
<a target="_blank" className="color_white" href="https://www.educoder.net/help?index=6">
<a target="_blank" className="color_white" href="/help?index=6">
<i className="iconfont icon-yijianfankui color-white font-22"></i>
</a>
</div>

@ -216,7 +216,7 @@ export function TPMIndexHOC(WrappedComponent) {
// 非课堂成员
isNotMember = () => {
// return this.state.coursedata&&this.state.coursedata.course_identity >= 0 &&
return this.state.coursedata&&this.state.coursedata.course_identity === 6
return this.state.coursedata&&this.state.coursedata.course_identity >= 6
}
// setTrialapplication = ()=>{

@ -239,7 +239,9 @@ export default class TPMMDEditor extends Component {
}
__editorName.cm.on("change", (_cm, changeObj) => {
that.contentChanged = true;
if (that.state.showError) {
that.setState({showError: false})
}
that.onEditorChange()
})
that.props.onCMBlur && __editorName.cm.on('blur', () => {
@ -256,6 +258,9 @@ export default class TPMMDEditor extends Component {
}, this);
}
showError = () => {
this.setState({showError: true})
}
onEditorChange = () => {
if (!this.answers_editormd) return;
const val = this.answers_editormd.getValue();
@ -297,14 +302,18 @@ export default class TPMMDEditor extends Component {
render() {
let {
choice_url,
showError
} = this.state;
let { mdID, className, noStorage } = this.props;
let _style = {}
if (showError) {
_style.border = '1px solid red'
}
return (
<React.Fragment>
<div className={`df ${className}`}>
<div className={`df ${className}`} >
{/* padding10-20 */}
<div className="edu-back-greyf5 radius4" id={`mdEditor_${mdID}`}>
<div className="edu-back-greyf5 radius4" id={`mdEditor_${mdID}`} style={{..._style}}>
<textarea style={{display: 'none'}} id="evaluate_script_show" name="content"></textarea>
<div className="CodeMirror cm-s-defualt">
</div>

@ -97,3 +97,51 @@ return;
// var uglified = uglify.minify(['file1.js', 'file2.js', 'file3.js']);
/**
优化
underscore被单独加载了去掉'D:\\Code\\trustieplus\\public\\react\\public\\js\\editormd\\underscore.min.js',
marked
raphaeljs sequence diagrams 1.0.4
统计 js_min_all加载的js
https://github.com/paulmillr/es6-shim
jQuery v1.8.3 jquery.com
Underscore.js 1.8.2
marked v0.3.3
Raphaël 2.1.3 - JavaScript Vector Library
flowchart, v1.3.4
editormd.js
CodeMirror
cm active-line.js
cm mode javascript
cm merge.js
CodeMirror addon hint
cm showHint
cm anyword-hint
CodeMirror python
CodeMirror c-like(java)
CodeMirror matchbrackets
>
// Copyright (C) 2006 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
*/
Loading…
Cancel
Save