Merge branch 'yslissue25014' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

issues25489
杨树林 5 years ago
commit 58d5591d1f

@ -243,4 +243,4 @@ function initOnlineOfflineListener() {
'网络异常,请检测网络后重试。', '网络异常,请检测网络后重试。',
}) })
}); });
} }

@ -363,8 +363,8 @@ function buildColumns(that, student_works, studentData) {
{/*<React.Fragment>*/} {/*<React.Fragment>*/}
{/*</React.Fragment>*/} {/*</React.Fragment>*/}
{ isAdmin && <Tooltip placement="bottom" title={<pre>调整学生最终成绩<br/>其它历史评分将全部失效</pre>}> { isAdmin && <Tooltip placement="bottom" title={<pre>调整学生最终成绩<br/>其它历史评分将全部失效</pre>}>
<a style={{color:"#000"}} <a style={{color: "#4CACFF"}}
onClick={() => that.showModulationModal(record)} onClick={() => that.showModulationModal(record)}
>调分</a> >调分</a>
</Tooltip> } </Tooltip> }
{/* toWorkDetailPage */} {/* toWorkDetailPage */}
@ -748,11 +748,17 @@ class CommonWorkList extends Component{
isPublish={true} doWhenSuccess={this.doWhenSuccess}></PublishRightnow> isPublish={true} doWhenSuccess={this.doWhenSuccess}></PublishRightnow>
<PublishRightnow ref={this.endModal} showActionButton={false} {...this.props} checkBoxValues={[workId]} <PublishRightnow ref={this.endModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
isPublish={false} doWhenSuccess={this.doWhenSuccess}></PublishRightnow> isPublish={false} doWhenSuccess={this.doWhenSuccess}></PublishRightnow>
<ModulationModal
visible={modulationModalVisible} {
Cancel={this.cancelModulationModel} modulationModalVisible === true ?
Saves={(value,num)=>this.saveModulationModal(value,num)} <ModulationModal
/> visible={modulationModalVisible}
Cancel={this.cancelModulationModel}
Saves={(value, num) => this.saveModulationModal(value, num)}
/>
: ""
}
{/* 内容区 */} {/* 内容区 */}

@ -1,7 +1,9 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Modal,Checkbox,Upload,Button,Icon,message,Input} from "antd"; import {Modal, Checkbox, Upload, Button, Icon, message, Input, Form} from "antd";
import { WordNumberTextarea } from 'educoder'; import { WordNumberTextarea } from 'educoder';
import './Newshixunmodel.css'
//调分
class ModulationModal extends Component{ class ModulationModal extends Component{
constructor(props){ constructor(props){
super(props); super(props);
@ -16,22 +18,32 @@ class ModulationModal extends Component{
Saves=()=>{ Saves=()=>{
let {textareaval,Inputsval}=this.state; let {textareaval,Inputsval}=this.state;
if(textareaval===""||textareaval===undefined){ // if(textareaval===""||textareaval===undefined){
this.setState({ // this.setState({
textareavaltype:true // textareavaltype:true
}) // })
return // return
} // }
this.setState({ this.setState({
textareavaltype: false textareavaltype: false
}) })
if(Inputsval===undefined||Inputsval===""){ if(Inputsval===undefined||Inputsval===""){
this.setState({ this.setState({
Inputsvaltype:true Inputsval: "",
}) Inputsvaltype: true,
Inputsvaltest: "请输入分数",
})
return return
} }
if (this.state.Inputsvaltype === true) {
return;
}
this.setState({
Inputsvaltype: false,
Inputsvaltest: "",
})
this.props.Saves(textareaval,Inputsval) this.props.Saves(textareaval,Inputsval)
} }
@ -43,21 +55,34 @@ class ModulationModal extends Component{
} }
setInputs=(e)=>{ setInputs=(e)=>{
debugger
var value=parseInt(e.target.value) var value=parseInt(e.target.value)
if(isNaN(value)){ if(isNaN(value)){
value=0 value = 0;
this.setState({
Inputsval: value,
Inputsvaltype: true,
Inputsvaltest: "请输入分数",
})
}else{ }else{
if(value<0||value>100){ if(value<0||value>100){
value=0 value = 0;
this.setState({
Inputsval: value,
Inputsvaltype: true,
Inputsvaltest: "请输入0-100的分数",
})
} }
} }
this.setState({ this.setState({
Inputsval:value Inputsval: value,
Inputsvaltype: false,
}) })
} }
render(){ render(){
let {textareaval,Inputsval,textareavaltype,Inputsvaltype}=this.state; let {textareaval, Inputsval, textareavaltype, Inputsvaltype, Inputsvaltest} = this.state;
return( return(
<div> <div>
<Modal <Modal
@ -69,60 +94,144 @@ class ModulationModal extends Component{
footer={null} footer={null}
destroyOnClose={true} destroyOnClose={true}
> >
<div className="task-popup-content"> <div className="clearfix" style={{
<p className="task-popup-text-center font-16 mb20"> display: "-webkit-flex",
flexDirection: "column",
<span className={"color-dark-21"}>该学生的最终成绩将不会按照评分规则进行计算</span> alignItems: "center",
}}>
</p> <div style={{
marginTop: " 27px",
display: "flex",
<div className="clearfix"> flexDirection: "initial",
{/*<textarea*/} }}>
{/*className="winput-100-150"*/}
{/*placeholder="请填写您对作品调分的原因"*/}
{/*value={textareaval}*/}
{/*onInput={this.settextarea}*/} <span style={{
{/*></textarea>*/} width: "70px",
textAlign: "center",
lineHeight: " 40px",
}}><span style={{
textAlign: "center",
lineHeight: " 40px",
color: " #f5222d",
}}>*</span></span>
<Input
className={Inputsvaltype === true ? "borerinput" : ""}
style={{
width: "335px",
height: "40px",
}}
placeholder="请填写分数"
value={Inputsval}
onInput={this.setInputs}
suffix={
<span
style={{
textAlign: "center",
lineHeight: " 40px",
}}
></span>
}
/>
</div>
{
Inputsvaltype === true ?
<p style={{color: "#DD1717", width: "268px"}}>{Inputsvaltest}</p>
: ""
}
<div style={{
display: "flex",
flexDirection: "initial",
}}>
<span style={{width: "70px"}}></span>
<p className=" mt3 font-14 " style={{color: "#666666"}}>调分后该学生的最终成绩将不会按照评分规则进行计算</p>
</div>
<div style={{
display: "flex",
flexDirection: "initial",
marginTop: "10px;",
}}>
<span style={{width: "70px", marginTop: "24px"}}>调分原因</span>
<WordNumberTextarea <WordNumberTextarea
placeholder={"请填写您对作品调分的原因"} style={{width: "335px"}}
onInput={(e)=>this.settextarea(e)} placeholder={"请输入调分原因(选填)"}
onInput={(e) => this.settextarea(e)}
value={textareaval} value={textareaval}
maxlength={100} maxlength={100}
/> />
</div>
<li style={{height:"20px",lineHeight:"20px"}}><span className={textareavaltype===true?"color-red":"none"}>原因不能为空</span></li>
<div style={{
marginTop: "27px",
width: " 336px",
marginLeft: "70px",
marginBottom: "29px",
}}>
<a className="task-btn color-white mr30" style={{width: "72px",}}
onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a>
<a className="task-btn task-btn-orange" style={{width: "72px",}}
onClick={this.Saves}>{this.props.Savesname || '保存'}</a>
</div> </div>
<style>
{
`
.pdl10{
padding-left:10px;
}
`
}
</style>
<li className={"pdl10"}>
<Input style={{
width: '20%',
}}
placeholder="请填写分数"
value={Inputsval}
onInput={this.setInputs}/> <span className="ml10"></span>
</li>
<li style={{height:"20px",lineHeight:"20px"}}><span className={Inputsvaltype===true?"color-red":"none"}>分数不能为空</span></li>
<div className="clearfix edu-txt-center">
<a className="task-btn color-white mr30" onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a>
<a className="task-btn task-btn-orange" onClick={this.Saves}>{this.props.Savesname || '保存'}</a>
</div>
</div> </div>
</Modal>
</Modal>
</div> </div>
) )
} }
} }
export default ModulationModal; export default ModulationModal;
// <div className="task-popup-content">
// <p className="task-popup-text-center font-16 mb20">
//
// <span className={"color-dark-21"}>该学生的最终成绩将不会按照评分规则进行计算</span>
//
// </p>
//
//
// <div className="clearfix">
// {/*<textarea*/}
// {/*className="winput-100-150"*/}
// {/*placeholder="请填写您对作品调分的原因"*/}
// {/*value={textareaval}*/}
// {/*onInput={this.settextarea}*/}
// {/*></textarea>*/}
//
// <WordNumberTextarea
// placeholder={"请填写您对作品调分的原因"}
// onInput={(e)=>this.settextarea(e)}
// value={textareaval}
// maxlength={100}
// />
//
// {/*<li style={{height:"20px",lineHeight:"20px"}}><span className={textareavaltype===true?"color-red":"none"}>原因不能为空</span></li>*/}
// <div style={{height:"20px",lineHeight:"20px"}}></div>
// </div>
//
// <style>
// {
//
// `
// .pdl10{
// padding-left:10px;
// }
// `
// }
// </style>
//
// <li className={"pdl10"}>
//
// </li>
// <li style={{height:"20px",lineHeight:"20px"}}><span className={Inputsvaltype===true?"color-red":"none"}>分数不能为空</span></li>
// <div className="clearfix edu-txt-center">
// <a className="task-btn color-white mr30" onClick={this.props.Cancel}>{this.props.Cancelname || '取消'}</a>
// <a className="task-btn task-btn-orange" onClick={this.Saves}>{this.props.Savesname || '保存'}</a>
{/* </div>*/
}
{/*</div>*/
}

@ -266,4 +266,62 @@
.padding13-30 { .padding13-30 {
padding: 13px 30px; padding: 13px 30px;
box-sizing: border-box; box-sizing: border-box;
} }
.displaymodulat {
display: flex;
display: -webkit-flex;
flex-direction: column;
align-items: center;
}
.WordNumberTextarea {
outline: none; /* 去掉输入字符时的默认样式 */
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
background-color: white;
text-shadow: none;
-webkit-writing-mode: horizontal-tb !important;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
resize: none; /*禁止拉伸*/
border: none; /*去掉默认边框*/
width: 100%;
height: 130px;
border: none;
display: block;
}
.WordNumbernote {
padding: 0;
margin: 0;
list-style: none;
text-decoration: none;
box-sizing: border-box;
overflow: hidden;
height: auto;
border: 1px solid rgba(234, 234, 234, 1);
border-radius: 0.125rem;
margin: 10px 10px 0px 10px;
padding: 10px 10px 5px 10px;
backgroud: rgba(234, 234, 234, 1);
width: 335px;
}
.WordNumberTextarea-count {
display: inline-block;
float: right;
font-size: 16px;
color: #adadad;
padding-right: 0.25rem;
}
.borerinput {
border: 1px solid #DD1717 !important;
}
.borerinputs {
border: 1px solid #eee !important;
}

@ -23,6 +23,7 @@ import './yslexercisetable.css';
import {getImageUrl, toPath, sortDirections} from 'educoder'; import {getImageUrl, toPath, sortDirections} from 'educoder';
import CheckBoxGroup from "../../page/component/CheckBoxGroup"; import CheckBoxGroup from "../../page/component/CheckBoxGroup";
import NoneData from '../../../modules/courses/coursesPublic/NoneData' import NoneData from '../../../modules/courses/coursesPublic/NoneData'
import ModulationModal from "../coursesPublic/ModulationModal";
const Search = Input.Search; const Search = Input.Search;
const RadioGroup = Radio.Group; const RadioGroup = Radio.Group;
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
@ -38,6 +39,7 @@ class Studentshavecompletedthelist extends Component {
datas: [], datas: [],
page: 1, page: 1,
limit: 20, limit: 20,
testpapergradingboll: false,
styletable: { styletable: {
"display": "block" "display": "block"
}, },
@ -1028,11 +1030,9 @@ class Studentshavecompletedthelist extends Component {
render: (text, record) => ( render: (text, record) => (
<span> <span>
{record.finalscore==="--"? {record.finalscore==="--"?
<span style={{textAlign: "center",color: '#999999'}} <span className="color-blue" style={{textAlign: "center", cursor: "pointer"}}
>--</span> onClick={() => this.Adjustment(record)}
:record.submitstate === "未提交"? >调分</span>
<span style={{textAlign: "center",color: '#999999'}}
>--</span>
: :
<a style={{textAlign: "center"}} className="color-blue" <a style={{textAlign: "center"}} className="color-blue"
target="_blank" target="_blank"
@ -1227,11 +1227,9 @@ class Studentshavecompletedthelist extends Component {
render: (text, record) => ( render: (text, record) => (
<span> <span>
{record.finalscore==="--"? {record.finalscore==="--"?
<span style={{textAlign: "center",color: '#999999'}} <span className="color-blue" style={{textAlign: "center", cursor: "pointer"}}
>--</span> onClick={() => this.Adjustment(record)}
:record.submitstate === "未提交"? >调分</span>
<span style={{textAlign: "center",color: '#999999'}}
>--</span>
: :
<a style={{textAlign: "center"}} className="color-blue" <a style={{textAlign: "center"}} className="color-blue"
target="_blank" target="_blank"
@ -1244,9 +1242,10 @@ class Studentshavecompletedthelist extends Component {
],//columnsystwo 也会被columnsys当作参数接收 ],//columnsystwo 也会被columnsys当作参数接收
exercise_status:0, exercise_status:0,
order_type: "desc", order_type: "desc",
exeuserid: 0,
} }
// console.log("Studentshavecompletedthelist"); // //console.log("Studentshavecompletedthelist");
// console.log(props.current_status); // //console.log(props.current_status);
// columnsys 老师列表 // columnsys 老师列表
// columnss 学生只能看自己的 未截止页面 // columnss 学生只能看自己的 未截止页面
// columnstwo 截止显示自己的 // columnstwo 截止显示自己的
@ -1254,7 +1253,7 @@ class Studentshavecompletedthelist extends Component {
} }
paginationonChange = (pageNumber) => { paginationonChange = (pageNumber) => {
// console.log('Page: '); // //console.log('Page: ');
if (this.state.loadingstate === false) { if (this.state.loadingstate === false) {
this.setState({ this.setState({
page: pageNumber, page: pageNumber,
@ -1271,7 +1270,7 @@ class Studentshavecompletedthelist extends Component {
} }
paginationonChanges = (pageNumber) => { paginationonChanges = (pageNumber) => {
// console.log('Page: '); // //console.log('Page: ');
if (this.state.loadingstate === false) { if (this.state.loadingstate === false) {
this.setState({ this.setState({
page: pageNumber, page: pageNumber,
@ -1292,12 +1291,12 @@ class Studentshavecompletedthelist extends Component {
componentDidMount() { componentDidMount() {
// if(this.props.isAdmin() === true){ // if(this.props.isAdmin() === true){
// this.Teacherliststudentlistsy(); // this.Teacherliststudentlistsy();
// console.log("1111111111111111"); // //console.log("1111111111111111");
// console.log(this.props.isAdmin()); // //console.log(this.props.isAdmin());
// }else { // }else {
this.Teacherliststudentlist(); this.Teacherliststudentlist();
// console.log("2222222222222"); // //console.log("2222222222222");
// console.log(this.props.isAdmin()); // //console.log(this.props.isAdmin());
// } // }
try { try {
this.props.triggerRef(this); this.props.triggerRef(this);
@ -1313,10 +1312,10 @@ class Studentshavecompletedthelist extends Component {
//试卷列表 //试卷列表
Teacherliststudentlist = () => { Teacherliststudentlist = () => {
// console.log("Teacherliststudentlist"); // 764 // //console.log("Teacherliststudentlist"); // 764
var thiss = this; var thiss = this;
var exercise_id = this.props.match.params.Id; var exercise_id = this.props.match.params.Id;
// console.log(731); // 764 935 // //console.log(731); // 764 935
var url = `/exercises/${exercise_id}/exercise_lists.json`; var url = `/exercises/${exercise_id}/exercise_lists.json`;
axios.get((url), { axios.get((url), {
params: { params: {
@ -1342,7 +1341,7 @@ class Studentshavecompletedthelist extends Component {
}) })
if (response.data.current_answer_user === undefined || response.data.current_answer_user === null) { if (response.data.current_answer_user === undefined || response.data.current_answer_user === null) {
// 学生未截止 // 学生未截止
// console.log("试卷学生未截止"); // //console.log("试卷学生未截止");
this.Generatenewdatas(response.data.exercise_users); this.Generatenewdatas(response.data.exercise_users);
if (response.data.exercise_types.subjective === 0) { if (response.data.exercise_types.subjective === 0) {
if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) { if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) {
@ -1389,7 +1388,7 @@ class Studentshavecompletedthelist extends Component {
} }
} else { } else {
//学生已截止 //学生已截止
// console.log("试卷学生已截止"); // //console.log("试卷学生已截止");
if (response.data.exercise_types.subjective === 0) { if (response.data.exercise_types.subjective === 0) {
if (this.state.loadingstate === false) { if (this.state.loadingstate === false) {
var arr =[]; var arr =[];
@ -1469,22 +1468,22 @@ class Studentshavecompletedthelist extends Component {
} }
//老师 //老师
else if (response.data.exercise_types.user_permission === 0) { else if (response.data.exercise_types.user_permission === 0) {
// console.log(response.data.exercise_users) // //console.log(response.data.exercise_users)
// console.log(response) // //console.log(response)
// console.log("试卷老师加载中"); // //console.log("试卷老师加载中");
if (thiss.state.loadingstate === false) { if (thiss.state.loadingstate === false) {
thiss.setState({ thiss.setState({
loadingstate: true, loadingstate: true,
}) })
} }
console.log(response); //console.log(response);
console.log(1393); //console.log(1393);
thiss.Generatenewdatasy(response.data.exercise_users, response); thiss.Generatenewdatasy(response.data.exercise_users, response);
} }
}).catch((error) => { }).catch((error) => {
// console.log(error); // //console.log(error);
// console.log("其实数据加载失败了"); // //console.log("其实数据加载失败了");
// console.log("1111"); // //console.log("1111");
}); });
@ -1495,9 +1494,9 @@ class Studentshavecompletedthelist extends Component {
let datalist = []; let datalist = [];
let datalisttwo = []; let datalisttwo = [];
var teacherlist = undefined; var teacherlist = undefined;
// console.log("开始数据了"); // //console.log("开始数据了");
if (exercise_users !== undefined) { if (exercise_users !== undefined) {
// console.log("开始打印数据了"); // //console.log("开始打印数据了");
for (var i = 0; i < exercise_users.length; i++) { for (var i = 0; i < exercise_users.length; i++) {
if (exercise_users[i].commit_status === 1) { if (exercise_users[i].commit_status === 1) {
datalist.push({ datalist.push({
@ -1574,9 +1573,9 @@ class Studentshavecompletedthelist extends Component {
let datalist = []; let datalist = [];
var teacherlist = undefined; var teacherlist = undefined;
var noclassroom = undefined; var noclassroom = undefined;
// console.log("开始数据了"); // //console.log("开始数据了");
if (exercise_users !== undefined) { if (exercise_users !== undefined) {
// console.log("开始打印数据了"); // //console.log("开始打印数据了");
for (var i = 0; i < exercise_users.length; i++) { for (var i = 0; i < exercise_users.length; i++) {
datalist.push({ datalist.push({
myid: exercise_users[i].login, myid: exercise_users[i].login,
@ -1610,7 +1609,7 @@ class Studentshavecompletedthelist extends Component {
} }
TablePagination = (e) => { TablePagination = (e) => {
// console.log(e.current); // //console.log(e.current);
var teacherlist = { //分页 var teacherlist = { //分页
total: this.state.exercise_users.length, //数据总数量 total: this.state.exercise_users.length, //数据总数量
pageSize: 20, //一页显示几条 pageSize: 20, //一页显示几条
@ -1623,7 +1622,7 @@ class Studentshavecompletedthelist extends Component {
} }
TablePaginations = (e) => { TablePaginations = (e) => {
// console.log(e.current); // //console.log(e.current);
var teacherlists = { //分页 var teacherlists = { //分页
total: this.state.exercise_users, //数据总数量 total: this.state.exercise_users, //数据总数量
pageSize: 10, //一页显示几条 pageSize: 10, //一页显示几条
@ -1639,7 +1638,7 @@ class Studentshavecompletedthelist extends Component {
Searchdata = (order, commit_status, review, exercise_group_id, search, page, limit, order_type) => { Searchdata = (order, commit_status, review, exercise_group_id, search, page, limit, order_type) => {
var exercise_id = this.props.match.params.Id; var exercise_id = this.props.match.params.Id;
// console.log(731); // 764 935 // //console.log(731); // 764 935
var url = `/exercises/${exercise_id}/exercise_lists.json`; var url = `/exercises/${exercise_id}/exercise_lists.json`;
var params = { var params = {
order: order, order: order,
@ -1654,7 +1653,7 @@ class Studentshavecompletedthelist extends Component {
axios.get(url, { axios.get(url, {
params: params params: params
}).then((response) => { }).then((response) => {
// console.log(JSON.stringify(response)); // //console.log(JSON.stringify(response));
this.setState({ this.setState({
Teacherliststudentlist: response.data, Teacherliststudentlist: response.data,
review: response.data.review, review: response.data.review,
@ -1702,7 +1701,7 @@ class Studentshavecompletedthelist extends Component {
} }
this.Generatenewdata(response.data.exercise_users, response.data.current_answer_user); this.Generatenewdata(response.data.exercise_users, response.data.current_answer_user);
}).catch((error) => { }).catch((error) => {
console.log(error) //console.log(error)
this.setState({ this.setState({
loadingstate: false, loadingstate: false,
}) })
@ -1717,9 +1716,9 @@ class Studentshavecompletedthelist extends Component {
let datalist = []; let datalist = [];
var indexi = 0; var indexi = 0;
var teacherlist = undefined; var teacherlist = undefined;
// console.log("开始数据了"); // //console.log("开始数据了");
if (exercise_users !== undefined) { if (exercise_users !== undefined) {
// console.log("开始打印数据了"); // //console.log("开始打印数据了");
for (var i = 0; i < exercise_users.length; i++) { for (var i = 0; i < exercise_users.length; i++) {
if (exercise_users[i].commit_status === 1) { if (exercise_users[i].commit_status === 1) {
datalist.push({ datalist.push({
@ -1734,7 +1733,8 @@ class Studentshavecompletedthelist extends Component {
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score, efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
finalscore: "评阅" finalscore: "评阅",
user_id: exercise_users[i].user_id
}) })
} else { } else {
datalist.push({ datalist.push({
@ -1749,7 +1749,8 @@ class Studentshavecompletedthelist extends Component {
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score, efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
finalscore: "--" finalscore: "--",
user_id: exercise_users[i].user_id
}) })
indexi++; indexi++;
} }
@ -1767,7 +1768,7 @@ class Studentshavecompletedthelist extends Component {
if (indexi === exercise_users.length) { if (indexi === exercise_users.length) {
//都没评论 不显示评论 //都没评论 不显示评论
if (response.data.exercise_types.groups_count > 0) { if (response.data.exercise_types.groups_count > 0) {
// console.log("77771111111"); // //console.log("77771111111");
//分班大于0显示分班 //分班大于0显示分班
//7ge //7ge
// this.state.columnsys.map((item,key)=>{ // this.state.columnsys.map((item,key)=>{
@ -1854,8 +1855,8 @@ class Studentshavecompletedthelist extends Component {
arr.push(item); arr.push(item);
} }
} }
// console.log(thiss.state.columnsys); // //console.log(thiss.state.columnsys);
// console.log(arr); // //console.log(arr);
this.setState({ this.setState({
data: datalist, data: datalist,
@ -1908,7 +1909,7 @@ class Studentshavecompletedthelist extends Component {
} else { } else {
//包括主观题 //包括主观题
if (indexi === exercise_users.length) { if (indexi === exercise_users.length) {
console.log("2548包含主观题不包含分班"); //console.log("2548包含主观题不包含分班");
if (response.data.exercise_types.groups_count > 0) { if (response.data.exercise_types.groups_count > 0) {
var arr =[]; var arr =[];
@ -1959,7 +1960,7 @@ class Studentshavecompletedthelist extends Component {
}) })
} }
} else { } else {
// console.log("2699包含主观题包含分班"); // //console.log("2699包含主观题包含分班");
if (response.data.exercise_types.groups_count > 0) { if (response.data.exercise_types.groups_count > 0) {
this.setState({ this.setState({
data: datalist, data: datalist,
@ -2010,7 +2011,7 @@ class Studentshavecompletedthelist extends Component {
TablePaginationsy = (e) => { TablePaginationsy = (e) => {
// console.log(e.current); // //console.log(e.current);
var teacherlist = { //分页 var teacherlist = { //分页
total: this.state.exercise_users.length, //数据总数量 total: this.state.exercise_users.length, //数据总数量
pageSize: 20, //一页显示几条 pageSize: 20, //一页显示几条
@ -2037,19 +2038,19 @@ class Studentshavecompletedthelist extends Component {
order_type: order_type order_type: order_type
} }
}).then((response) => { }).then((response) => {
// console.log("528"); // //console.log("528");
// console.log(JSON.stringify(response)); // //console.log(JSON.stringify(response));
if(response===undefined){ if(response===undefined){
return return
} }
this.setState({ this.setState({
loadingstate: false, loadingstate: false,
}) })
// console.log(response); // //console.log(response);
// console.log(1997); // //console.log(1997);
this.Generatenewdatasy(response.data.exercise_users, response); this.Generatenewdatasy(response.data.exercise_users, response);
}).catch((error) => { }).catch((error) => {
// console.log(error) // //console.log(error)
this.setState({ this.setState({
loadingstate: false, loadingstate: false,
}) })
@ -2101,9 +2102,9 @@ class Studentshavecompletedthelist extends Component {
this.Searchdatasys(this.state.order, undefined, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type); this.Searchdatasys(this.state.order, undefined, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
} }
checkeboxstwo = (checkedValues, data) => { checkeboxstwo = (checkedValues, data) => {
// console.log(checkedValues) // //console.log(checkedValues)
if (JSON.stringify(checkedValues) === "[]") { if (JSON.stringify(checkedValues) === "[]") {
// console.log(checkedValues); // //console.log(checkedValues);
if (this.state.loadingstate === false) { if (this.state.loadingstate === false) {
this.setState({ this.setState({
loadingstate: true, loadingstate: true,
@ -2138,7 +2139,7 @@ class Studentshavecompletedthelist extends Component {
this.Searchdatasys(this.state.order, checkedValues, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type); this.Searchdatasys(this.state.order, checkedValues, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
} else { } else {
// console.log(checkedValues); // //console.log(checkedValues);
this.Searchdatasys(this.state.order, checkedValues, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type); this.Searchdatasys(this.state.order, checkedValues, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
if (this.state.loadingstate === false) { if (this.state.loadingstate === false) {
this.setState({ this.setState({
@ -2160,7 +2161,7 @@ class Studentshavecompletedthelist extends Component {
} }
notlimitedst = () => { notlimitedst = () => {
// console.log(); // //console.log();
// var datas=this.state.course_groups; // var datas=this.state.course_groups;
// for(var ik=0;ik<datas.length;ik++){ // for(var ik=0;ik<datas.length;ik++){
// datas[ik].exercise_group_id=undefined; // datas[ik].exercise_group_id=undefined;
@ -2182,7 +2183,7 @@ class Studentshavecompletedthelist extends Component {
if (JSON.stringify(checkedValues) === "[]") { if (JSON.stringify(checkedValues) === "[]") {
// console.log(checkedValues); // //console.log(checkedValues);
if (this.state.loadingstate === false) { if (this.state.loadingstate === false) {
this.setState({ this.setState({
unlimited: 0, unlimited: 0,
@ -2217,7 +2218,7 @@ class Studentshavecompletedthelist extends Component {
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type); this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
} else { } else {
// console.log(checkedValues); // //console.log(checkedValues);
if (this.state.loadingstate === false) { if (this.state.loadingstate === false) {
this.setState({ this.setState({
unlimited: 1, unlimited: 1,
@ -2260,9 +2261,9 @@ class Studentshavecompletedthelist extends Component {
} }
funtaskstatustwo = (checkedValues, data) => { funtaskstatustwo = (checkedValues, data) => {
// console.log(checkedValues); // //console.log(checkedValues);
if (JSON.stringify(checkedValues) === "[]") { if (JSON.stringify(checkedValues) === "[]") {
// console.log(checkedValues); // //console.log(checkedValues);
if (this.state.loadingstate === false) { if (this.state.loadingstate === false) {
this.setState({ this.setState({
course_groupysls: undefined, course_groupysls: undefined,
@ -2297,7 +2298,7 @@ class Studentshavecompletedthelist extends Component {
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, checkedValues, this.state.searchtext, 1, this.state.limit, this.state.order_type) this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, checkedValues, this.state.searchtext, 1, this.state.limit, this.state.order_type)
} else { } else {
// console.log(checkedValues); // //console.log(checkedValues);
if (this.state.loadingstate === false) { if (this.state.loadingstate === false) {
this.setState({ this.setState({
checkedValuesineinfo: checkedValues, checkedValuesineinfo: checkedValues,
@ -2325,7 +2326,7 @@ class Studentshavecompletedthelist extends Component {
onSearchKeywordKeyUp = (e) => { onSearchKeywordKeyUp = (e) => {
if (e.keyCode === 13) { if (e.keyCode === 13) {
// this.onSearch(); // this.onSearch();
// console.log("使用了回车键"); // //console.log("使用了回车键");
// if(this.state.searchtext === ""){ // if(this.state.searchtext === ""){
// message.error("请输入姓名或学号搜索"); // message.error("请输入姓名或学号搜索");
// return // return
@ -2356,7 +2357,7 @@ class Studentshavecompletedthelist extends Component {
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, value, 1, this.state.limit, this.state.order_type); this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, this.state.review, this.state.checkedValuesineinfo, value, 1, this.state.limit, this.state.order_type);
// this.Startsorting(this.state.order,this.state.checkedValuesine,this.state.checkedValuesineinfo,value); // this.Startsorting(this.state.order,this.state.checkedValuesine,this.state.checkedValuesineinfo,value);
// console.log(value) // //console.log(value)
}; };
@ -2375,7 +2376,7 @@ class Studentshavecompletedthelist extends Component {
//搜索学生 文字输入 //搜索学生 文字输入
inputSearchValues = (e) => { inputSearchValues = (e) => {
// console.log(e.target.value) // //console.log(e.target.value)
if (e.target.value === "") { if (e.target.value === "") {
this.setState({ this.setState({
searchtext: undefined, searchtext: undefined,
@ -2563,19 +2564,61 @@ class Studentshavecompletedthelist extends Component {
setExerciseReviewAndAnswer = () => { setExerciseReviewAndAnswer = () => {
} }
// 调分
Adjustment = (e) => {
this.setState({
testpapergradingboll: true,
exeuserid: e.user_id,
})
}
//调分窗
Adjustments = () => {
//弹出弹框
this.setState({
testpapergradingboll: false
})
}
//试卷调分
Testpapergrading = (v, n) => {
var exercise_id = this.props.match.params.Id;
let url = `/exercises/${exercise_id}/adjust_score.json`;
axios.post(url, {
score: n,
user_id: this.state.exeuserid,
comment: v,
})
.then((response) => {
if (response.data.status == '0') {
this.setState({testpapergradingboll: false});
this.props.showNotification('调分成功');
this.Teacherliststudentlist();
}
})
.catch(function (error) {
console.log(error);
this.setState({testpapergradingboll: false})
});
}
render() { render() {
const isAdmin = this.props.isAdmin(); const isAdmin = this.props.isAdmin();
let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable,exercise_status, course_groupyslstwodatas, limit, course_groupysls, course_groupyslstwodata, course_groupyslstwo, teacherlists, Teacherliststudentlist, order, columnss, course_groupsdatas, course_groups, Evaluationarray, unlimited, unlimiteds, unlimitedtwo, teacherlist, searchtext, loadingstate, review, nocomment, commented, unsubmitted, submitted, columnsys, exercise_users,mylistansum} = this.state; let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable, exercise_status, course_groupyslstwodatas, limit, course_groupysls, course_groupyslstwodata, course_groupyslstwo, teacherlists, Teacherliststudentlist, order, columnss, course_groupsdatas, course_groups, Evaluationarray, unlimited, unlimiteds, unlimitedtwo, teacherlist, searchtext, loadingstate, review, nocomment, commented, unsubmitted, submitted, columnsys, exercise_users, mylistansum, testpapergradingboll} = this.state;
// console.log("Studentshavecompletedthelist"); // //console.log("Studentshavecompletedthelist");
// console.log(this.props.current_status); // //console.log(this.props.current_status);
// console.log("获取到的数据"); // //console.log("获取到的数据");
// console.log(datas); // //console.log(datas);
// console.log(data); // //console.log(data);
// console.log("this.props.Commonheadofthetestpaper.exercise_status"); // //console.log("this.props.Commonheadofthetestpaper.exercise_status");
// console.log(this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status); // //console.log(this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status);
// console.log(exercise_status); // //console.log(exercise_status);
return ( return (
isAdmin === true ? isAdmin === true ?
( (
@ -2591,6 +2634,11 @@ class Studentshavecompletedthelist extends Component {
</div> </div>
: :
<div> <div>
{testpapergradingboll === true ? <ModulationModal
visible={testpapergradingboll}
Cancel={() => this.Adjustments()}
Saves={(value, num) => this.Testpapergrading(value, num)}
/> : ""}
<div className="edu-back-white" > <div className="edu-back-white" >
<ul className="clearfix" style={{padding: '10px 30px 10px 30px'}}> <ul className="clearfix" style={{padding: '10px 30px 10px 30px'}}>

@ -900,8 +900,8 @@ class GraduationTaskssettinglist extends Component{
{tag.name} {tag.name}
</a> </a>
: :
<span style={{color:tag.name==="调分"?"#000":'#4CACFF',padding:"0px 5px"}} <span style={{color: tag.name === "调分" ? "#4CACFF" : '#4CACFF', padding: "0px 5px"}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?taskslistdata&&taskslistdata.cross_comment===true?"":"":""}> onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?taskslistdata&&taskslistdata.cross_comment===true?"":"":""}>
{tag.name==="分配"?taskslistdata&&taskslistdata.cross_comment===true?"":"":tag.name} {tag.name==="分配"?taskslistdata&&taskslistdata.cross_comment===true?"":"":tag.name}
</span> </span>
} }

@ -1174,7 +1174,9 @@ class Listofworksstudentone extends Component {
align: 'center', align: 'center',
className: 'font-14', className: 'font-14',
render: (text, record) => ( render: (text, record) => (
record.submitstate === "未提交" ? <span style={{color: '#9A9A9A'}}>--</span> : record.submitstate === "未提交" ?
<span style={{textAlign: "center", cursor: "pointer"}} className="color-blue"
onClick={() => this.Adjustment(record)}>调分</span> :
<span> <span>
<a style={{textAlign: "center"}} className="color-blue" <a style={{textAlign: "center"}} className="color-blue"
onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)} onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)}
@ -1505,7 +1507,9 @@ class Listofworksstudentone extends Component {
align: 'center', align: 'center',
className: 'font-14', className: 'font-14',
render: (text, record) => ( render: (text, record) => (
record.submitstate === "未提交" ? <span style={{color: '#9A9A9A'}}>--</span> : record.submitstate === "未提交" ?
<span style={{textAlign: "center", cursor: "pointer"}} className="color-blue"
onClick={() => this.Adjustment(record)}>调分</span> :
<span> <span>
<a style={{textAlign: "center"}} className="color-blue" <a style={{textAlign: "center"}} className="color-blue"
onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)} onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)}
@ -2812,14 +2816,14 @@ class Listofworksstudentone extends Component {
this.setState({visible: false}) this.setState({visible: false})
} }
// 调分 // 调分
Viewstudenttraininginformations = (e) => { Adjustment = (e) => {
// console.log("Viewstudenttraininginformations2"); // console.log("Adjustment");
// console.log(e.myid); // console.log(e.myid);
this.setState({ this.setState({
visible: true, visible: true,
userid: e.myid, userid: e.myid,
// Tune
}) })
} }
//确定 //确定
saveModulationModal = (value, num) => { saveModulationModal = (value, num) => {
@ -3243,7 +3247,7 @@ class Listofworksstudentone extends Component {
<div className=" clearfix " style={{margin: "auto", minWidth: "1200px"}}> <div className=" clearfix " style={{margin: "auto", minWidth: "1200px"}}>
{visible === true ? <ModulationModal {visible === true ? <ModulationModal
visible={visible} visible={visible}
Cancel={this.cancelModulationModel} Cancel={() => this.cancelModulationModel()}
Saves={(value, num) => this.saveModulationModal(value, num)} Saves={(value, num) => this.saveModulationModal(value, num)}
/> : ""} /> : ""}

Loading…
Cancel
Save