hjm 5 years ago
commit 9d8ce094ca

@ -114,21 +114,21 @@ module.exports = {
// First, run the linter.
// It's important to do this before Babel processes the JS.
// 上线然后要注释回来
{
test: /\.(js|jsx|mjs)$/,
enforce: 'pre',
use: [
{
options: {
formatter: eslintFormatter,
eslintPath: require.resolve('eslint'),
},
loader: require.resolve('eslint-loader'),
},
],
include: paths.appSrc,
},
// {
// test: /\.(js|jsx|mjs)$/,
// enforce: 'pre',
// use: [
// {
// options: {
// formatter: eslintFormatter,
// eslintPath: require.resolve('eslint'),
//
// },
// loader: require.resolve('eslint-loader'),
// },
// ],
// include: paths.appSrc,
// },
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall

@ -226,8 +226,8 @@ class CommonWorkDetailIndex extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={exportResultUrl} calssName="color-dark">导出成绩</a></li>
<li><a href={exportUrl} calssName="color-dark">导出作品附件</a></li>
<li><a href={exportResultUrl} className="color-dark">导出成绩</a></li>
<li><a href={exportUrl} className="color-dark">导出作品附件</a></li>
</ul>
</li>:""}

@ -1,153 +1,153 @@
import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom';
import { WordsBtn, MarkdownToHtml } from 'educoder';
import axios from 'axios';
import PublishRightnow from '../PublishRightnow'
import AccessoryModal from "../../coursesPublic/AccessoryModal";
const { Option} = Select;
const CheckboxGroup = Checkbox.Group;
const confirm = Modal.confirm;
let GraduationTasksnewtype=true;
const $ = window.$;
const Search = Input.Search;
const RadioGroup = Radio.Group;
class TabRightComponents extends Component{
constructor(props){
super(props)
this.publishModal = React.createRef();
this.endModal = React.createRef();
this.state={
accessoryVisible: false
}
}
componentDidMount() {
}
onToPublishClick = () => {
}
// 补交附件
Cancelvisible=()=>{
this.setState({
accessoryVisible:false
})
}
addAccessory=()=>{
this.setState({
accessoryVisible:true
})
}
setupdate = () => {
}
render(){
const dateFormat = 'YYYY-MM-DD HH:mm';
const { accessoryVisible } = this.state
let { work_statuses, publish_immediately, work_id
, end_immediately
} =this.props;
let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id;
let workId=this.props.match.params.workId;
const isGroup = this.props.isGroup()
const moduleName = !isGroup? "普通作业":"分组作业";
const moduleEngName = this.props.getModuleName()
const childModuleName = this.props.moduleName
const isAdmin = this.props.isAdmin()
const isSuperAdmin = this.props.isSuperAdmin()
let exportUrl = `/api/homework_commons/${workId}/works_list.zip`
const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx`
return(
<React.Fragment>
{isAdmin ?
<React.Fragment>
<div style={{display: 'inline', float: 'right'}}>
<PublishRightnow ref={this.publishModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
isPublish={true} doWhenSuccess={this.props.doWhenSuccess} checkBeforePost={this.props.saveWorkSetting}
onToPublishClick={this.onToPublishClick}
></PublishRightnow>
<PublishRightnow ref={this.endModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
isPublish={false} doWhenSuccess={this.props.doWhenSuccess}></PublishRightnow>
</div>
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
color: #333;
}
.drop_down_menu {
width: 121px;
}
.drop_down_menu li {
overflow: visible;
width: 121px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
`}</style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={exportResultUrl} calssName="color-dark">导出成绩</a></li>
<li><a href={exportUrl} calssName="color-dark">导出作品附件</a></li>
</ul>
</li>:""}
{/* <a className={"fr color-blue font-16"} href={exportUrl}></a>
<a className={"fr color-blue font-16"} href={exportResultUrl}>导出成绩</a> */}
{/*<a className={"fr color-blue font-16"}>导出</a>*/}
{end_immediately && <a className={"fr color-blue font-16"} onClick={() => { this.endModal.current.open() } }>立即截止</a>}
{publish_immediately && <a className={"fr color-blue font-16"} onClick={() => { this.publishModal.current.open() } } >立即发布</a>}
{/*<a className={"fr color-blue font-16"}>项目在线质量检测</a>*/}
{isAdmin && <a className={"fr color-blue font-16"} onClick={() => this.props.toEditPage(this.props.match.params, workId)}>编辑作业</a>}
</React.Fragment> :
<React.Fragment>
{work_statuses && work_statuses.indexOf('提交作品') != -1 && <a className={"fr color-blue font-16"} href={"javascript:void(0)"}
onClick={() => { this.props.toWorkPostPage(this.props.match.params)}}
>提交作品</a>}
{work_statuses && work_statuses.indexOf('修改作品') != -1 && <a className={"fr color-blue font-16"} href={"javascript:void(0)"}
onClick={() => { this.props.toWorkPostPage(this.props.match.params, null, true, work_id)}}
>修改作品</a>}
{work_statuses && work_statuses.indexOf('补交附件') != -1 &&
<React.Fragment>
<AccessoryModal
{...this.props}
modalname={"补交附件"}
visible={accessoryVisible}
Cancelname={"取消"}
Savesname={"确认"}
Cancel={this.Cancelvisible}
setupdate={this.setupdate}
reviseAttachmentUrl={`/student_works/${work_id}/revise_attachment.json`}
/>
<a className={"fr color-blue font-16"} href={"javascript:void(0)"}
onClick={this.addAccessory}
>补交附件</a>
</React.Fragment>
}
</React.Fragment> }
</React.Fragment>
)
}
}
import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom';
import { WordsBtn, MarkdownToHtml } from 'educoder';
import axios from 'axios';
import PublishRightnow from '../PublishRightnow'
import AccessoryModal from "../../coursesPublic/AccessoryModal";
const { Option} = Select;
const CheckboxGroup = Checkbox.Group;
const confirm = Modal.confirm;
let GraduationTasksnewtype=true;
const $ = window.$;
const Search = Input.Search;
const RadioGroup = Radio.Group;
class TabRightComponents extends Component{
constructor(props){
super(props)
this.publishModal = React.createRef();
this.endModal = React.createRef();
this.state={
accessoryVisible: false
}
}
componentDidMount() {
}
onToPublishClick = () => {
}
// 补交附件
Cancelvisible=()=>{
this.setState({
accessoryVisible:false
})
}
addAccessory=()=>{
this.setState({
accessoryVisible:true
})
}
setupdate = () => {
}
render(){
const dateFormat = 'YYYY-MM-DD HH:mm';
const { accessoryVisible } = this.state
let { work_statuses, publish_immediately, work_id
, end_immediately
} =this.props;
let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id;
let workId=this.props.match.params.workId;
const isGroup = this.props.isGroup()
const moduleName = !isGroup? "普通作业":"分组作业";
const moduleEngName = this.props.getModuleName()
const childModuleName = this.props.moduleName
const isAdmin = this.props.isAdmin()
const isSuperAdmin = this.props.isSuperAdmin()
let exportUrl = `/api/homework_commons/${workId}/works_list.zip`
const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx`
return(
<React.Fragment>
{isAdmin ?
<React.Fragment>
<div style={{display: 'inline', float: 'right'}}>
<PublishRightnow ref={this.publishModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
isPublish={true} doWhenSuccess={this.props.doWhenSuccess} checkBeforePost={this.props.saveWorkSetting}
onToPublishClick={this.onToPublishClick}
></PublishRightnow>
<PublishRightnow ref={this.endModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
isPublish={false} doWhenSuccess={this.props.doWhenSuccess}></PublishRightnow>
</div>
<style>{`
.drop_down_menu li a {
padding: 0px;
font-size: 14px;
color: #333;
}
.drop_down_menu {
width: 121px;
}
.drop_down_menu li {
overflow: visible;
width: 121px;
}
.drop_down_menu, .drop_down_normal {
padding-top: 10px;
padding-bottom: 8px;
}
`}</style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={exportResultUrl} className="color-dark">导出成绩</a></li>
<li><a href={exportUrl} className="color-dark">导出作品附件</a></li>
</ul>
</li>:""}
{/* <a className={"fr color-blue font-16"} href={exportUrl}></a>
<a className={"fr color-blue font-16"} href={exportResultUrl}>导出成绩</a> */}
{/*<a className={"fr color-blue font-16"}>导出</a>*/}
{end_immediately && <a className={"fr color-blue font-16"} onClick={() => { this.endModal.current.open() } }>立即截止</a>}
{publish_immediately && <a className={"fr color-blue font-16"} onClick={() => { this.publishModal.current.open() } } >立即发布</a>}
{/*<a className={"fr color-blue font-16"}>项目在线质量检测</a>*/}
{isAdmin && <a className={"fr color-blue font-16"} onClick={() => this.props.toEditPage(this.props.match.params, workId)}>编辑作业</a>}
</React.Fragment> :
<React.Fragment>
{work_statuses && work_statuses.indexOf('提交作品') != -1 && <a className={"fr color-blue font-16"} href={"javascript:void(0)"}
onClick={() => { this.props.toWorkPostPage(this.props.match.params)}}
>提交作品</a>}
{work_statuses && work_statuses.indexOf('修改作品') != -1 && <a className={"fr color-blue font-16"} href={"javascript:void(0)"}
onClick={() => { this.props.toWorkPostPage(this.props.match.params, null, true, work_id)}}
>修改作品</a>}
{work_statuses && work_statuses.indexOf('补交附件') != -1 &&
<React.Fragment>
<AccessoryModal
{...this.props}
modalname={"补交附件"}
visible={accessoryVisible}
Cancelname={"取消"}
Savesname={"确认"}
Cancel={this.Cancelvisible}
setupdate={this.setupdate}
reviseAttachmentUrl={`/student_works/${work_id}/revise_attachment.json`}
/>
<a className={"fr color-blue font-16"} href={"javascript:void(0)"}
onClick={this.addAccessory}
>补交附件</a>
</React.Fragment>
}
</React.Fragment> }
</React.Fragment>
)
}
}
export default TabRightComponents;

@ -1,235 +1,235 @@
import React, { Component } from "react";
import { Modal, Checkbox, Input, Spin, Select, Divider } from "antd";
import axios from 'axios'
import ModalWrapper from "../../common/ModalWrapper"
import InfiniteScroll from 'react-infinite-scroller';
import { ConditionToolTip } from 'educoder'
const Option = Select.Option;
const pageCount = 15;
// 代码查重弹框
class CheckCodeModal extends Component{
constructor(props){
super(props);
this.state={
checkBoxValues: [],
candidates: [],
hasMore: true,
loading: false,
page: 1
}
}
fetchMemberList = (arg_page) => {
const courseId = this.props.match.params.coursesId
const page = arg_page || this.state.page;
const { name, school_name } = this.state
let url = `/courses/${courseId}/search_teacher_candidate.json`
this.setState({ loading: true })
axios.post(url, {
page: page,
limit: pageCount,
school_name: school_name || '',
name: name || ''
})
.then((response) => {
if (!response.data.candidates || response.data.candidates.length == 0) {
this.setState({
page,
loading: false,
hasMore: false,
})
} else {
this.setState({
candidates: page == 1 ? response.data.candidates : this.state.candidates.concat(response.data.candidates),
page,
loading: false,
hasMore: response.data.candidates.length == pageCount
})
}
})
.catch(function (error) {
console.log(error);
});
}
componentDidMount() {
}
fetchOptions = () => {
// add_teacher_popup
const courseId = this.props.match.params.coursesId
let url = `/courses/${courseId}/add_teacher_popup.json`
axios.get(url, {
})
.then((response) => {
if (response.data.graduation_groups) {
this.setState({
graduation_groups: response.data.graduation_groups
})
}
if (response.data.course_groups) {
this.setState({
course_groups: response.data.course_groups
})
}
})
.catch(function (error) {
console.log(error);
});
}
setVisible = (visible) => {
if (visible) {
this.fetchMemberList()
this.fetchOptions()
}
this.refs.modalWrapper.setVisible(visible)
if (visible == false) {
this.setState({
checkBoxValues: []
})
}
}
onSendOk = () => {
const courseId = this.props.match.params.coursesId
const url = `/courses/${courseId}/add_teacher.json`
const params = {
"user_list": this.state.checkBoxValues.map (item => { return { 'user_id': item }}) ,
"graduation_group_id": "2",
"course_group_id": "820",
// "role": ROLE_TEACHER_NUM
}
const { graduationGroup, courseGroup } = this.state
if (graduationGroup) {
params.graduation_group_id = graduationGroup
}
if (courseGroup) {
params.course_group_id = courseGroup
}
axios.post(url, params)
.then((response) => {
if (response.data.status == 0) {
this.setVisible(false)
this.props.showNotification('添加成功')
}
})
.catch(function (error) {
console.log(error);
});
}
onOk = () => {
this.onSendOk()
}
onCheckBoxChange = (checkBoxValues) => {
this.setState({
checkBoxValues: checkBoxValues
})
}
handleInfiniteOnLoad = () => {
this.fetchMemberList(this.state.page + 1)
}
onSearch = () => {
this.fetchMemberList(1)
}
handleGradationGroupChange = (value) => {
this.setState({
graduationGroup: value
})
}
handleCourseGroupChange = (value) => {
this.setState({
courseGroup: value
})
}
render(){
const { candidates, checkBoxValues, loading, hasMore, name, school_name
, graduationGroup, graduation_groups, courseGroup, course_groups } = this.state
const { moduleName } = this.props
return(
<ModalWrapper
ref="modalWrapper"
width="700px"
title={`代码查重`}
{...this.props }
onOk={this.onOk}
className="checkCodeModal"
>
<style>
{`
.demo-loading-container {
position: absolute;
bottom: 93px;
width: 82%;
text-align: center;
}
.df {
display: flex;
align-items: baseline;
margin: 12px 0;
}
.firstLabel {
flex: 0 0 60px;
}
.df span.label {
margin-right: 8px;
text-align: right;
margin-left: 12px;
}
.df .ant-input-affix-wrapper {
width: 32%;
}
.checkCodeModal label.task-hide {
width: 100%;
}
`}
</style>
<p className="clearfix mb2" style={{ margin: '0px 15px 6px' }}>
<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>
</p>
<div>
{/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
<div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}>
<Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
{ candidates && candidates.map( candidate => {
return (
<p className="clearfix mb7" key={candidate.id}>
<Checkbox className="fl" value={candidate.id} ></Checkbox>
<span className="fl with25">
<ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.name}</label>
</ConditionToolTip>
</span>
<span className="fl with25">
<ConditionToolTip title={candidate.nickname} condition={candidate.nickname && candidate.nickname.length > 12 }>
<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>
</p>
)
}) }
</Checkbox.Group>
</div>
</div>
</ModalWrapper>
)
}
}
export default CheckCodeModal;
import React, { Component } from "react";
import { Modal, Checkbox, Input, Spin, Select, Divider } from "antd";
import axios from 'axios'
import ModalWrapper from "../../common/ModalWrapper"
import InfiniteScroll from 'react-infinite-scroller';
import { ConditionToolTip } from 'educoder'
const Option = Select.Option;
const pageCount = 15;
// 代码查重弹框
class CheckCodeModal extends Component{
constructor(props){
super(props);
this.state={
checkBoxValues: [],
candidates: [],
hasMore: true,
loading: false,
page: 1
}
}
fetchMemberList = (arg_page) => {
const courseId = this.props.match.params.coursesId
const page = arg_page || this.state.page;
const { name, school_name } = this.state
let url = `/courses/${courseId}/search_teacher_candidate.json`
this.setState({ loading: true })
axios.post(url, {
page: page,
limit: pageCount,
school_name: school_name || '',
name: name || ''
})
.then((response) => {
if (!response.data.candidates || response.data.candidates.length == 0) {
this.setState({
page,
loading: false,
hasMore: false,
})
} else {
this.setState({
candidates: page == 1 ? response.data.candidates : this.state.candidates.concat(response.data.candidates),
page,
loading: false,
hasMore: response.data.candidates.length == pageCount
})
}
})
.catch(function (error) {
console.log(error);
});
}
componentDidMount() {
}
fetchOptions = () => {
// add_teacher_popup
const courseId = this.props.match.params.coursesId
let url = `/courses/${courseId}/add_teacher_popup.json`
axios.get(url, {
})
.then((response) => {
if (response.data.graduation_groups) {
this.setState({
graduation_groups: response.data.graduation_groups
})
}
if (response.data.course_groups) {
this.setState({
course_groups: response.data.course_groups
})
}
})
.catch(function (error) {
console.log(error);
});
}
setVisible = (visible) => {
if (visible) {
this.fetchMemberList()
this.fetchOptions()
}
this.refs.modalWrapper.setVisible(visible)
if (visible == false) {
this.setState({
checkBoxValues: []
})
}
}
onSendOk = () => {
const courseId = this.props.match.params.coursesId
const url = `/courses/${courseId}/add_teacher.json`
const params = {
"user_list": this.state.checkBoxValues.map (item => { return { 'user_id': item }}) ,
"graduation_group_id": "2",
"course_group_id": "820",
// "role": ROLE_TEACHER_NUM
}
const { graduationGroup, courseGroup } = this.state
if (graduationGroup) {
params.graduation_group_id = graduationGroup
}
if (courseGroup) {
params.course_group_id = courseGroup
}
axios.post(url, params)
.then((response) => {
if (response.data.status == 0) {
this.setVisible(false)
this.props.showNotification('添加成功')
}
})
.catch(function (error) {
console.log(error);
});
}
onOk = () => {
this.onSendOk()
}
onCheckBoxChange = (checkBoxValues) => {
this.setState({
checkBoxValues: checkBoxValues
})
}
handleInfiniteOnLoad = () => {
this.fetchMemberList(this.state.page + 1)
}
onSearch = () => {
this.fetchMemberList(1)
}
handleGradationGroupChange = (value) => {
this.setState({
graduationGroup: value
})
}
handleCourseGroupChange = (value) => {
this.setState({
courseGroup: value
})
}
render(){
const { candidates, checkBoxValues, loading, hasMore, name, school_name
, graduationGroup, graduation_groups, courseGroup, course_groups } = this.state
const { moduleName } = this.props
return(
<ModalWrapper
ref="modalWrapper"
width="700px"
title={`代码查重`}
{...this.props }
onOk={this.onOk}
className="checkCodeModal"
>
<style>
{`
.demo-loading-container {
position: absolute;
bottom: 93px;
width: 82%;
text-align: center;
}
.df {
display: flex;
align-items: baseline;
margin: 12px 0;
}
.firstLabel {
flex: 0 0 60px;
}
.df span.label {
margin-right: 8px;
text-align: right;
margin-left: 12px;
}
.df .ant-input-affix-wrapper {
width: 32%;
}
.checkCodeModal label.task-hide {
width: 100%;
}
`}
</style>
<p className="clearfix mb2" style={{ margin: '0px 15px 6px' }}>
<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>
</p>
<div>
{/* https://github.com/CassetteRocks/react-infinite-scroller/issues/70 */}
<div className="edu-back-skyblue padding10-15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}>
<Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
{ candidates && candidates.map( candidate => {
return (
<p className="clearfix mb7" key={candidate.id}>
<Checkbox className="fl" value={candidate.id} ></Checkbox>
<span className="fl with25">
<ConditionToolTip title={candidate.name} condition={candidate.name && candidate.name.length > 12 }>
<label className="task-hide fl" style={{"maxWidth":"208px;"}}>{candidate.name}</label>
</ConditionToolTip>
</span>
<span className="fl with25">
<ConditionToolTip title={candidate.nickname} condition={candidate.nickname && candidate.nickname.length > 12 }>
<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>
</p>
)
}) }
</Checkbox.Group>
</div>
</div>
</ModalWrapper>
)
}
}
export default CheckCodeModal;

@ -1,5 +1,5 @@
import React, {Component} from "react";
import {WordsBtn} from 'educoder';
import {WordsBtn,markdownToHTML} from 'educoder';
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Pagination} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom';
import axios from 'axios';
@ -102,9 +102,9 @@ class Exercisestatisticalresult extends Component {
}
`}
</style>
<div className={"educontent mb20" }>
<div className={"educontent mb20" } style={{width: "1250px"}}>
{data&&data.course_groups.length===0?"":<div className="stud-class-set bor-bottom-greyE">
{data&&data.course_groups.length===0?"":<div className="stud-class-set">
<div className="clearfix edu-back-white">
<ul className="clearfix" style={{padding:'20px'}}>
<li className="clearfix mt10">
@ -180,13 +180,16 @@ class Exercisestatisticalresult extends Component {
{data&&data.commit_results.map((item,key)=>{
return(
<div className="stud-class-set bor-greyE mb20" key={key}>
<div className="stud-class-set mb20" key={key}>
<div className="clearfix edu-back-white poll_list" style={{padding: '20px'}}>
<div className="font-16 shixunreporttitle fl" >
<span className="CACFF">{item.ques_type===0?"单选":item.ques_type===1?"多选":item.ques_type===2?"判断":item.ques_type===3?"填空":item.ques_type===4?"主观":item.ques_type===5?"实训":""}</span>
<span>Q{item.ques_position}
<span className="markdown-body" dangerouslySetInnerHTML={createMarkup(item.ques_title)}></span>
</span>
<span className="CACFF">{item.ques_position+"."}{item.ques_type===0?"单选":item.ques_type===1?"多选":item.ques_type===2?"判断":item.ques_type===3?"填空":item.ques_type===4?"主观":item.ques_type===5?"实训":""}</span>
<div>
{/*Q{item.ques_position}*/}
<div dangerouslySetInnerHTML={{__html: markdownToHTML(item.ques_title).replace(/▁/g,"▁▁▁")}}></div>
{/*<span className="markdown-body" dangerouslySetInnerHTML={createMarkup(item.ques_title)}></span>*/}
</div>
</div>
<div className="fr shixunreporttitles">正确率<span style={{color:'#FF6800'}}> {item.right_percent}%</span></div>
</div>

@ -1,181 +1,186 @@
import React, {Component} from "react";
import {WordsBtn} from 'educoder';
import {Table} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom';
class OfficialAcademicTranscript extends Component {
constructor(props) {
super(props);
this.state = {
loadingstate:true,
datas:undefined
}
}
componentDidMount() {
}
render() {
let {data}=this.props;
let datas=[];
// data&&data.exercise_counts.forEach((item,key)=>{ })
datas.push({
commit_percent:data&&data.exercise_counts.commit_percent,
min_score:data&&data.exercise_counts.min_score,
max_score:data&&data.exercise_counts.max_score,
average_score:data&&data.exercise_counts.average_score,
fail_counts:data&&data.exercise_counts.fail_counts,
pass_counts:data&&data.exercise_counts.pass_counts,
good_counts:data&&data.exercise_counts.good_counts,
best_counts:data&&data.exercise_counts.best_counts,
})
let columns=[{
title: '提交率',
dataIndex: 'commit_percent',
key: 'commit_percent',
render: (text, record) => (
<span style={{color:'#333333'}}>
{record.commit_percent===0?0:(record.commit_percent*100).toFixed(2)}<span className={"font-size12"}>%</span>
</span>
),
}, {
title: '最低分',
dataIndex: 'min_score',
key: 'min_score',
render: (text, record) => (
<span>
<span style={{color:'#333333'}}>{record.min_score}<span className={"font-size12"}></span></span>
</span>
),
}, {
title: '最高分',
dataIndex: 'max_score',
key: 'max_score',
render: (text, record) => (
<span style={{color:'#FF6800'}}>
{record.max_score}<span className={"font-size12"}></span>
</span>
),
}, {
title: '平均分',
key: 'average_score',
dataIndex: 'average_score',
render: (text, record) => (
<span style={{color:'#333333'}}>
{record.average_score}<span className={"font-size12"}></span>
</span>
),
}, {
title: '不及格(0-60)',
key: 'fail_counts',
dataIndex: 'fail_counts',
render: (text, record) => (
<span style={{color:'#333333'}}>
{record.fail_counts}<span className={"font-size12"}></span>
</span>
),
}, {
title: '及格(60-70)',
key: 'pass_counts',
dataIndex: 'pass_counts',
render: (text, record) => (
<span style={{color:'#333333'}}>
{record.pass_counts}<span className={"font-size12"}></span>
</span>
),
}, {
title: '良好(70-90)',
key: 'good_counts',
dataIndex: 'good_counts',
render: (text, record) => (
<span>
<span style={{color:'#333333'}}>{record.good_counts}<span className={"font-size12"}></span></span>
</span>
),
}, {
title: '优秀(90-100)',
key: 'best_counts',
dataIndex: 'best_counts',
render: (text, record) => (
<span>
<span style={{color:'#FF6800'}}>{record.best_counts}<span className={"font-size12"}></span></span>
</span>
),
}];
// {
// title: '调分',
// key: 'adjustmentminute',
// dataIndex: 'adjustmentminute',
//
// render: (text, record) => (
// <span>
// <a>6小时 50分钟 6秒</a>
// </span>
// ),
// },
return (
<div>
{/*{data===undefined?"":""}*/}
<style>{`
.ant-table-thead > tr > th{
text-align: center;
}
.tasknamebox{
width: 50px;
height: 24px;
border: 1px solid rgba(221,23,23,1);
border-radius: 12px;
color: rgba(221,23,23,1);
display: inline-block;
line-height: 24px;
}
.tasknameboxs{
color: #666666 !important;
background:rgba(237,237,237,1) !important;
}
.ant-table-tbody > tr > td{
font-size:14px;
}
.task-hide{
max-width: 345px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ant-table-tbody > tr{
height:64px;
text-align: center;
}
`}
</style>
{datas===undefined?"":<Table
dataSource={datas}
columns={columns}
pagination={false}
// loading={loadingstate}
// onChange={this.TablePagination}
/>}
</div>
)
}
}
import React, {Component} from "react";
import {WordsBtn} from 'educoder';
import {Table} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom';
class OfficialAcademicTranscript extends Component {
constructor(props) {
super(props);
this.state = {
loadingstate:true,
datas:undefined
}
}
componentDidMount() {
}
render() {
let {data}=this.props;
let datas=[];
// data&&data.exercise_counts.forEach((item,key)=>{ })
datas.push({
commit_percent:data&&data.exercise_counts.commit_percent,
min_score:data&&data.exercise_counts.min_score,
max_score:data&&data.exercise_counts.max_score,
average_score:data&&data.exercise_counts.average_score,
fail_counts:data&&data.exercise_counts.fail_counts,
pass_counts:data&&data.exercise_counts.pass_counts,
good_counts:data&&data.exercise_counts.good_counts,
best_counts:data&&data.exercise_counts.best_counts,
})
let columns=[{
title: '提交率',
dataIndex: 'commit_percent',
key: 'commit_percent',
render: (text, record) => (
<span style={{color:'#333333'}}>
{record.commit_percent===0?0:(record.commit_percent*100).toFixed(2)}<span className={"font-size12"}>%</span>
</span>
),
}, {
title: '最低分',
dataIndex: 'min_score',
key: 'min_score',
render: (text, record) => (
<span>
<span style={{color:'#333333'}}>{record.min_score}<span className={"font-size12"}></span></span>
</span>
),
}, {
title: '最高分',
dataIndex: 'max_score',
key: 'max_score',
render: (text, record) => (
<span style={{color:'#FF6800'}}>
{record.max_score}<span className={"font-size12"}></span>
</span>
),
}, {
title: '平均分',
key: 'average_score',
dataIndex: 'average_score',
render: (text, record) => (
<span style={{color:'#333333'}}>
{record.average_score}<span className={"font-size12"}></span>
</span>
),
}, {
title: '不及格(0-60)',
key: 'fail_counts',
dataIndex: 'fail_counts',
render: (text, record) => (
<span style={{color:'#333333'}}>
{record.fail_counts}<span className={"font-size12"}></span>
</span>
),
}, {
title: '及格(60-70)',
key: 'pass_counts',
dataIndex: 'pass_counts',
render: (text, record) => (
<span style={{color:'#333333'}}>
{record.pass_counts}<span className={"font-size12"}></span>
</span>
),
}, {
title: '良好(70-90)',
key: 'good_counts',
dataIndex: 'good_counts',
render: (text, record) => (
<span>
<span style={{color:'#333333'}}>{record.good_counts}<span className={"font-size12"}></span></span>
</span>
),
}, {
title: '优秀(90-100)',
key: 'best_counts',
dataIndex: 'best_counts',
render: (text, record) => (
<span>
<span style={{color:'#FF6800'}}>{record.best_counts}<span className={"font-size12"}></span></span>
</span>
),
}];
// {
// title: '调分',
// key: 'adjustmentminute',
// dataIndex: 'adjustmentminute',
//
// render: (text, record) => (
// <span>
// <a>6小时 50分钟 6秒</a>
// </span>
// ),
// },
return (
<div>
{/*{data===undefined?"":""}*/}
<style>{`
.ant-table-thead > tr > th{
text-align: center;
}
.tasknamebox{
width: 50px;
height: 24px;
border: 1px solid rgba(221,23,23,1);
border-radius: 12px;
color: rgba(221,23,23,1);
display: inline-block;
line-height: 24px;
}
.tasknameboxs{
color: #666666 !important;
background:rgba(237,237,237,1) !important;
}
.ant-table-tbody > tr > td{
font-size:14px;
}
.task-hide{
max-width: 345px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ant-table-tbody > tr{
height:64px;
text-align: center;
}
.exerctabel .ant-table-tbody > tr >td{
border:1px solid transparent;
}
`}
</style>
{datas===undefined?"":<Table
className={"exerctabel"}
dataSource={datas}
columns={columns}
pagination={false}
// loading={loadingstate}
// onChange={this.TablePagination}
/>}
</div>
)
}
}
export default OfficialAcademicTranscript;

@ -66,12 +66,16 @@ class Exercisetablesmubus extends Component {
width:'300px',
render: (text, record) => (
<span style={{color:'#FF6800'}}>
{record.max_score===undefined?"":<Progress
strokeColor={{
'0%': '#29BD8B',
'100%': '#29BD8B',
}}
percent={record.max_score*100} showInfo={false} />}
{record.max_score===undefined?"":<span>
<div style={{
float: 'left',
width: '220px'
}}><Progress
strokeColor={{
'0%': '#29BD8B',
'100%': '#29BD8B',
}}
percent={record.max_score*100} showInfo={false}/></div><div className={"fr"}>{record.max_score*100}%</div></span>}
</span>
),
}];
@ -125,10 +129,14 @@ class Exercisetablesmubus extends Component {
}
.ant-table-tbody > tr > td:nth-child(1){
text-align: left;
}
.Exermubu .ant-table-tbody > tr:nth-last-child(1) > td{
border:1px solid transparent;
}
`}
</style>
{datas===undefined?"":<Table
className={"Exermubu"}
dataSource={datas}
columns={columns}
pagination={false}

@ -159,7 +159,7 @@ class Testpapersettinghomepage extends Component{
return(
<div className="newMain clearfix ">
<div className={"educontent mb20"}>
<div className={"educontent mb20"} style={{width:"1250px"}}>
{/* 公用的提示弹框 */}
{this.state.Modalstype===true?<Modals
modalsType={this.state.Modalstype}
@ -177,7 +177,7 @@ class Testpapersettinghomepage extends Component{
callback={this.callback}
/>:""}
<div className="educontent mb20">
<div className="educontent mb20" style={{width:"1250px"}}>
<p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue " to={`/courses/${this.props.match.params.coursesId}/students}`}>{this.props.coursedata.name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
@ -195,7 +195,7 @@ class Testpapersettinghomepage extends Component{
`}
</style>
<div className="educontent">
<div className="educontent" style={{width:"1250px"}}>
<p className=" fl color-black summaryname ">
{Commonheadofthetestpaper === undefined?"":Commonheadofthetestpaper.exercise_name}
</p>
@ -258,9 +258,9 @@ class Testpapersettinghomepage extends Component{
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a
onClick={()=>this.experiment(`/api/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`)}
calssName="color-dark">学生成绩</a></li>
<li><a href={`/api/exercises/${this.props.match.params.Id}/export_exercise`} calssName="color-dark">空白试卷</a></li>
<li><a calssName="color-dark"
className="color-dark">学生成绩</a></li>
<li><a href={`/api/exercises/${this.props.match.params.Id}/export_exercise`} className="color-dark">空白试卷</a></li>
<li><a className="color-dark"
onClick={()=>this.experiment(`/api/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval}`)}
>学生答题试卷</a></li>
</ul>

@ -215,7 +215,7 @@ class GraduationTasksSubmitnew extends Component{
let {search} = this.state;
this.searchList(search,1,10)
this.searchList(search,1,20)
}

@ -240,12 +240,12 @@ class GraduationTasksedit extends Component{
handleSubmit=(e)=>{
let {fileList}=this.state;
if(fileList.length===0){
this.setState({
shixunsreplace:true,
})
return
}
// if(fileList.length===0){
// this.setState({
// shixunsreplace:true,
// })
// return
// }
this.Commoninterface(fileList);
}

@ -214,13 +214,13 @@ class GraduationTasksnew extends Component {
// 提交按钮
handleSubmit = (e) => {
let {fileList} = this.state;
if(fileList.length===0){
this.setState({
shixunsreplace:true,
})
return
}
// if(fileList.length===0){
// this.setState({
// shixunsreplace:true,
// })
//
// return
// }
this.Commoninterface(fileList);

@ -1056,13 +1056,16 @@ class GraduationTaskssettingapp extends Component{
padding-top: 10px;
padding-bottom: 8px;
}
.drop_down_menu li .color-dark{
color: #666 !important;
}
`}
</style>
{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"} calssName="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="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>:""}

@ -701,7 +701,7 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => (
<span>
<a style={{color:'#989898'}}>
{record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm:ss')}
{record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm')}
</a>
</span>
),
@ -741,11 +741,11 @@ class GraduationTaskssettinglist extends Component{
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.finalscore.work_score==="--"?"未评阅": <pre>
<Tooltip placement="right" title={record.finalscore.work_score==="--"?"未评阅": <pre>
{record.finalscore.final_score.username}({record.finalscore.final_score.login})<br/>
{record.finalscore.ultimate_score===true?"":"教师评分:"+record.finalscore.teacher_comment_score+"分"}<br/>
{record.finalscore.cross_comment_score===undefined?"":"交叉评分:"+record.finalscore.cross_comment_score+"分"+<br/>}
{record.finalscore.late_penalty===undefined?"":"迟交扣分:"+record.finalscore.late_penalty+"分"+<br/>}
{record.finalscore.cross_comment_score===undefined||record.finalscore.cross_comment_score==="未批阅"?"交叉评分:--":"交叉评分:"+record.finalscore.cross_comment_score+"分"}<br/>
{record.finalscore.late_penalty===undefined?"":"迟交扣分:"+record.finalscore.late_penalty+"分"}<br/>
最终成绩{record.finalscore.work_score}<br/>
</pre>}>
<a style={{color:parseInt(record.finalscore.work_score)>90?'#DD1717':parseInt(record.finalscore.work_score)>60&&parseInt(record.finalscore.work_score)<90?"#FF6800":'#747A7F'}}>{record.finalscore.work_score==="--"?"--":record.finalscore.work_score}</a>
@ -1010,13 +1010,16 @@ class GraduationTaskssettinglist extends Component{
padding-top: 10px;
padding-bottom: 8px;
}
.drop_down_menu li .color-dark{
color: #666 !important;
}
`}
</style>
{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"} calssName="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="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>:""}
@ -1141,17 +1144,28 @@ class GraduationTaskssettinglist extends Component{
</ul>
<div id="graduation_work_list" style={{padding:'0px 40px 10px 40px'}}>
<style>
{
`
.edu-menu-lists li:hover {
background: #f0f0f0 !important;
}
.edu-menu-lists li:hover a{
color: #666 !important;
}
`
}
</style>
<div className="clearfix">
{this.props.isAdmin()===true?<span className="fl color-grey-6 font-12">
<span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>
个检索结果{taskslistdata&&taskslistdata.work_count} 学生 </span>:""}
{this.props.isAdmin()===true?<div className="fr color-grey-6 edu-menu-panel">
<p>
<a data-remote="true">
<a data-remote="true" class="color-grey-6 font-12">
{order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p>
<ul className="edu-menu-list">
<ul className="edu-menu-list edu-menu-lists" style={{width: '87px'}}>
<li onClick={(e)=>this.funorder("updated_at")}><a data-remote="true">更新时间</a>
</li>
<li onClick={(e)=>this.funorder("work_score" )}><a data-remote="true">最终成绩</a>

@ -303,13 +303,16 @@ class GraduationTasksquestions extends Component{
padding-top: 10px;
padding-bottom: 8px;
}
.drop_down_menu li .color-dark{
color: #666 !important;
}
`}
</style>
{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"} calssName="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="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>:""}

@ -14,9 +14,8 @@ class ShixunWorkModal extends Component{
}
}
componentDidMount() {
let {group_list}=this.state;
let url="/homework_commons/"+this.props.match.params.homeworkid+"/group_list.json";
axios.get(url,{params:{
limit:10,
page:1,
@ -28,9 +27,16 @@ class ShixunWorkModal extends Component{
group_list:undefined
})
}else{
const newgroup_list=[];
response.data.group_list.map((item,key)=>{
newgroup_list.push(item)
})
if( response.data.ungroup_list!== undefined || response.data.ungroup_list !== null){
newgroup_list.push(response.data.ungroup_list)
}
this.setState({
course_groups:response.data,
group_list:response.data.group_list
group_list:newgroup_list,
})
}
@ -43,18 +49,35 @@ class ShixunWorkModal extends Component{
//勾选实训
shixunhomeworkedit=(checkedValues)=>{
let types=false
let{group_list}=this.state;
if(checkedValues.length===group_list.length){
this.setState({
onChangetype:true,
group_ids:checkedValues
})
}else{
this.setState({
group_ids:checkedValues,
onChangetype:false
})
}
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(types===false){
if(checkedValues.length===group_list.length){
this.setState({
onChangetype:true,
group_ids:checkedValues
})
}else{
this.setState({
group_ids:checkedValues,
onChangetype:false
})
}
}
}
contentViewScroll=(e)=>{
@ -71,17 +94,33 @@ class ShixunWorkModal extends Component{
page:newpage,
}
}).then((response) => {
response.data. course_groups.group_list&&response.data.group_list.map((item,key)=>{
newgroup_list.push(item)
})
response.data. course_groups.ungroup_list&&response.data.ungroup_list.map((items,keys)=>{
newgroup_list.push(items)
})
this.setState({
course_groups:response.data,
group_list:newgroup_list,
page:newpage
})
if(response!==null || response!==undefined){
if(response.data.group_list.length>0){
console.log("84");
response.data.group_list.map((item,key)=>{
newgroup_list.push(item);
this.setState({
course_groups:response.data,
group_list:newgroup_list,
page:newpage
})
})
}
if(response.data.ungroup_list===undefined || response.data.ungroup_list === null) {
}else {
console.log("95");
console.log(response.data.ungroup_list);
newgroup_list.push(response.data.ungroup_list);
this.setState({
course_groups:response.data,
group_list:newgroup_list,
page:newpage
})
}
}
}).catch((error) => {
console.log(error)
});
@ -130,10 +169,10 @@ class ShixunWorkModal extends Component{
this.props.showNotification(`请先选择分班`);
return
}
if(group_ids&&group_ids.length < 2){
this.props.showNotification(`有效作品数少于2个无法查重`);
return
}
// if(group_ids&&group_ids.length < 2){
// this.props.showNotification(`有效作品数少于2个无法查重`);
// return
// }
let url="/homework_commons/"+this.props.match.params.homeworkid+"/homework_code_repeat.json";
axios.post(url, {
@ -247,17 +286,17 @@ class ShixunWorkModal extends Component{
<Checkbox
className="fl task-hide edu-txt-left"
name="shixun_homework[]"
value={item.id}
value={item=== undefined?"":item.id}
>
<label style={{"textAlign": "left", "color": "#05101A"}}
className="task-hide color-grey-name" title="frerere">{item.name}</label>
className="task-hide color-grey-name" title="frerere">{item===undefined?"":item.name}</label>
</Checkbox>
</li>
<li className="fl" style={{width: '150px'}}>
{item.works_count}
{item===undefined?"":item.works_count}
</li>
<li className="fl" style={{width: '160px'}}>
{item.last_review_time}
{item===undefined?"":item.last_review_time}
</li>
</div>
)

Loading…
Cancel
Save