dev_forum
杨树明 5 years ago
parent c633f4e5c6
commit 6a462ff111

@ -9,7 +9,7 @@ const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const eslintFormatter = require('react-dev-utils/eslintFormatter'); const eslintFormatter = require('react-dev-utils/eslintFormatter');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
// const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin'); const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const getClientEnvironment = require('./env'); const getClientEnvironment = require('./env');
const paths = require('./paths'); const paths = require('./paths');
@ -249,7 +249,8 @@ module.exports = {
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
// You can remove this if you don't use Moment.js: // You can remove this if you don't use Moment.js:
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
], new MonacoWebpackPlugin(),
],
// Some libraries import Node modules but don't use them in the browser. // Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works. // Tell Webpack to provide empty mocks for them so importing them works.
node: { node: {

File diff suppressed because it is too large Load Diff

@ -3,7 +3,6 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@flatten/array": "^1.1.7",
"@icedesign/base": "^0.2.5", "@icedesign/base": "^0.2.5",
"@novnc/novnc": "^1.1.0", "@novnc/novnc": "^1.1.0",
"antd": "^3.20.1", "antd": "^3.20.1",
@ -48,6 +47,7 @@
"moment": "^2.23.0", "moment": "^2.23.0",
"monaco-editor": "^0.15.6", "monaco-editor": "^0.15.6",
"monaco-editor-webpack-plugin": "^1.7.0", "monaco-editor-webpack-plugin": "^1.7.0",
"npm": "^6.10.1",
"object-assign": "4.1.1", "object-assign": "4.1.1",
"postcss-flexbugs-fixes": "3.2.0", "postcss-flexbugs-fixes": "3.2.0",
"postcss-loader": "2.0.8", "postcss-loader": "2.0.8",
@ -159,7 +159,6 @@
"port": "3007", "port": "3007",
"devDependencies": { "devDependencies": {
"@babel/runtime": "7.0.0-beta.51", "@babel/runtime": "7.0.0-beta.51",
"antd": "^3.6.5",
"babel-plugin-import": "^1.11.0", "babel-plugin-import": "^1.11.0",
"concat": "^1.0.3", "concat": "^1.0.3",
"happypack": "^5.0.1", "happypack": "^5.0.1",

@ -152,8 +152,8 @@ class UseBank extends Component{
) )
.then((response) => { .then((response) => {
if (response.data.status == 0) { if (response.data.status == 0) {
this.props.useBankSuccess && this.props.useBankSuccess(checkBoxValues,response.data.object_ids);
this.props.showNotification('题库选用成功') this.props.showNotification('题库选用成功')
this.props.useBankSuccess && this.props.useBankSuccess(checkBoxValues,response.data.object_ids);
this.closeSelectBank(); this.closeSelectBank();
this.props.updataleftNavfun() this.props.updataleftNavfun()
this.setState({ this.setState({

@ -38,13 +38,14 @@ class coursesHome extends Component{
} }
//搜索 //搜索
searchValue=(e)=>{ searchValue=(e)=>{
let { search }=this.state; let { search ,order}=this.state;
this.setState({ this.setState({
order:'all', order:order,
page:1 page:1
}) })
this.searchcourses(16,1,'all',search) this.searchcourses(16,1,order,search)
} }

@ -42,7 +42,7 @@ class Exercisetablesmubus extends Component {
key: 'commit_percent', key: 'commit_percent',
render: (text, record) => ( render: (text, record) => (
<span style={{color:text.type===true? "#29BD8B":'#333333'}}> <span style={{color:text.type===true? "#29BD8B":'#333333'}}>
{text.value!="有效填写量"&&text.value!="wrong"?text.num +"."+ text.value:false} {text.value!="有效填写量"&&text.value!="wrong"?text.value:false}
{text.value==="wrong"?"填写了错误答案":false} {text.value==="wrong"?"填写了错误答案":false}
{text.value==="有效填写量"?"有效填写量":false} {text.value==="有效填写量"?"有效填写量":false}
</span> </span>

@ -1,159 +1,159 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {Checkbox,Radio, Input} from "antd"; import {Checkbox,Radio, Input} from "antd";
import {DMDEditor,markdownToHTML } from 'educoder' import {DMDEditor,markdownToHTML } from 'educoder'
import axios from 'axios' import axios from 'axios'
const tagArray = [ const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', // 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', // 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' // 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
] ]
class fillEmpty extends Component{ class fillEmpty extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.mdRef = React.createRef() this.mdRef = React.createRef()
let { questionType }=this.props; let { questionType }=this.props;
let array=[]; let array=[];
for(var i=0;i < questionType.multi_count; i++){ for(var i=0;i < questionType.multi_count; i++){
let item=""; let item="";
if(questionType.user_answer.length>0){ if(questionType.user_answer.length>0){
if(questionType.user_answer[i]){ if(questionType.user_answer[i]){
item=questionType.user_answer[i].answer_text; item=questionType.user_answer[i].answer_text;
} }
} }
array.push({ array.push({
value:item, value:item,
q_id:questionType.question_number q_id:questionType.question_number
}) })
} }
this.state={ this.state={
array array
} }
} }
toMDMode = (that) => { toMDMode = (that) => {
// if ( this.mdReactObject) { // if ( this.mdReactObject) {
// let mdReactObject = this.mdReactObject; // let mdReactObject = this.mdReactObject;
// this.mdReactObject = null // this.mdReactObject = null
// mdReactObject.toShowMode() // mdReactObject.toShowMode()
// } // }
this.mdReactObject = that; this.mdReactObject = that;
} }
onOptionContentChange = (value, index) => { onOptionContentChange = (value, index) => {
let array = this.state.array.slice(0); let array = this.state.array.slice(0);
array[index].value = value; array[index].value = value;
this.setState({ array }) this.setState({ array })
} }
onBlurEmpty=(index,number)=>{ onBlurEmpty=(index,number)=>{
let array = this.state.array.slice(0); let array = this.state.array.slice(0);
let v=array[index].value; let v=array[index].value;
let question_id=this.props.questionType.question_id; let question_id=this.props.questionType.question_id;
let url=`/exercise_questions/${question_id}/exercise_answers.json` let url=`/exercise_questions/${question_id}/exercise_answers.json`
axios.post((url),{ axios.post((url),{
exercise_choice_id:parseInt(index)+1, exercise_choice_id:parseInt(index)+1,
answer_text:v answer_text:v
}).then((result)=>{ }).then((result)=>{
if(result.status==200){ if(result.status==200){
//this.refs[`md${number}${index}`].toShowMode(); //this.refs[`md${number}${index}`].toShowMode();
let count=0; let count=0;
for(var i=0;i<array.length;i++){ for(var i=0;i<array.length;i++){
if(array[i].value ==""){ count++; } if(array[i].value ==""){ count++; }
} }
let k = count==array.length ? 0 : 1; let k = count==array.length ? 0 : 1;
this.props.changeQuestionStatus && this.props.changeQuestionStatus(parseInt(this.props.questionType.q_position)-1,k); this.props.changeQuestionStatus && this.props.changeQuestionStatus(parseInt(this.props.questionType.q_position)-1,k);
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
} }
render(){ render(){
let { let {
questionType , questionType ,
exercise , exercise ,
user_exercise_status, user_exercise_status,
}=this.props }=this.props
let { let {
array array
}=this.state }=this.state
let isAdmin = this.props.isAdmin(); let isAdmin = this.props.isAdmin();
let isStudent = this.props.isStudent(); let isStudent = this.props.isStudent();
return( return(
<div className="pl30 pr30"> <div className="pl30 pr30">
<style>{` <style>{`
.emptyPanel div#content_editorMd_show{ .emptyPanel div#content_editorMd_show{
width: 100%; width: 100%;
border-radius: 4px; border-radius: 4px;
height: 35px; height: 35px;
margin-top:0px; margin-top:0px;
background-color:#fafafa; background-color:#fafafa;
color:#999; color:#999;
line-height:25px; line-height:25px;
} }
.answerStyle{ .answerStyle{
background:#f5f5f5; background:#f5f5f5;
border-radius:4px; border-radius:4px;
border: 1px solid #eaeaea; border: 1px solid #eaeaea;
padding:5px; padding:5px;
min-height:35px; min-height:35px;
box-sizing:border-box; box-sizing:border-box;
} }
`}</style> `}</style>
{ {
array.map((item,key)=>{ array.map((item,key)=>{
return( return(
<li className="df mb10 emptyPanel"> <li className="df mb10 emptyPanel">
<span className="mr10 lineh-35 font-16">答案(填空{key+1})</span> <span className="mr10 lineh-35 font-16">答案(填空{key+1})</span>
<div className="flex1" style={{width:"0"}}> <div className="flex1" style={{width:"0"}}>
{ {
user_exercise_status == 1 ? user_exercise_status == 1 ?
<input value={item.value} className="input-100-35" style={{backgroundColor: "#F5F5F5",cursor:"default"}} placeholder={ isStudent && item.value ? `请输入填空${key+1}的答案` : "" } readOnly/> <input value={item.value} className="input-100-35" style={{backgroundColor: "#F5F5F5",cursor:"default"}} placeholder={ isStudent && item.value ? `请输入填空${key+1}的答案` : "" } readOnly/>
: :
<DMDEditor <DMDEditor
ref={`md${questionType.q_position}${key}`} ref={`md${questionType.q_position}${key}`}
toMDMode={this.toMDMode} toShowMode={this.toShowMode} toMDMode={this.toMDMode} toShowMode={this.toShowMode}
height={150} className={'optionMdEditor'} watch={false} noStorage={true} height={150} className={'optionMdEditor'} watch={false} noStorage={true}
mdID={questionType.question_id +"_"+ key} placeholder={`输入填空${key+1}的答案`} onChange={(value) => this.onOptionContentChange(value, key)} mdID={questionType.question_id +"_"+ key} placeholder={`输入填空${key+1}的答案`} onChange={(value) => this.onOptionContentChange(value, key)}
initValue={item.value} onCMBlur={()=>this.onBlurEmpty(key,questionType.q_position)} initValue={item.value} onCMBlur={()=>this.onBlurEmpty(key,questionType.q_position)}
></DMDEditor> ></DMDEditor>
} }
</div> </div>
</li> </li>
) )
}) })
} }
{ {
// 答案公开,且试卷已经截止 // 答案公开,且试卷已经截止
isAdmin && isAdmin &&
<div> <div>
<p className="bor-top-greyE pt20 mt20 font-16 mb10">参考答案</p> <p className="bor-top-greyE pt20 mt20 font-16 mb10">参考答案</p>
{ questionType.standard_answer && questionType.standard_answer.map((item,k)=>{ { questionType.standard_answer && questionType.standard_answer.map((item,k)=>{
return( return(
<ul className="df font-16"> <ul className="df font-16">
<span className="mr10">填空{k+1}:</span> <span className="mr10">填空{k+1}:</span>
<li className="flex1"> <li className="flex1">
{ {
item.answer_text && item.answer_text.map((i,index)=>{ item.answer_text && item.answer_text.map((i,index)=>{
return( return(
<div className="standardAnswer markdown-body answerStyle mb10" dangerouslySetInnerHTML={{__html: markdownToHTML(i)}}></div> <div className="standardAnswer markdown-body answerStyle mb10" dangerouslySetInnerHTML={{__html: markdownToHTML(i)}}></div>
) )
}) })
} }
</li> </li>
</ul> </ul>
) )
}) })
} }
</div> </div>
} }
</div> </div>
) )
} }
} }
export default fillEmpty export default fillEmpty

@ -1,73 +1,73 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {Checkbox,Radio, Input} from "antd"; import {Checkbox,Radio, Input} from "antd";
import {markdownToHTML} from 'educoder' import {markdownToHTML} from 'educoder'
import axios from 'axios' import axios from 'axios'
const tagArray = [ const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', // 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', // 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' // 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
] ]
class Multiple extends Component{ class Multiple extends Component{
constructor(props){ constructor(props){
super(props); super(props);
} }
saveId=(value)=>{ saveId=(value)=>{
let question_id=this.props.questionType.question_id; let question_id=this.props.questionType.question_id;
let url=`/exercise_questions/${question_id}/exercise_answers.json`; let url=`/exercise_questions/${question_id}/exercise_answers.json`;
axios.post((url),{ axios.post((url),{
exercise_choice_id:value exercise_choice_id:value
}).then((result)=>{ }).then((result)=>{
if(result.status==200){ if(result.status==200){
let k=0; let k=0;
if(value.length > 0 ){ if(value.length > 0 ){
k=1; k=1;
}else{ }else{
k=0; k=0;
} }
this.props.changeQuestionStatus && this.props.changeQuestionStatus(parseInt(this.props.questionType.q_position)-1,k); this.props.changeQuestionStatus && this.props.changeQuestionStatus(parseInt(this.props.questionType.q_position)-1,k);
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
} }
render(){ render(){
let { let {
questionType , questionType ,
exercise, exercise,
user_exercise_status user_exercise_status
}=this.props }=this.props
let isStudent =this.props.isStudent(); let isStudent =this.props.isStudent();
console.log(questionType); console.log(questionType);
return( return(
<div className="pl30 pr30"> <div className="pl30 pr30">
<Checkbox.Group disabled={ user_exercise_status == 1 ? true : false } onChange={this.saveId} defaultValue={questionType.user_answer}> <Checkbox.Group disabled={ user_exercise_status == 1 ? true : false } onChange={this.saveId} defaultValue={questionType.user_answer}>
{ {
questionType.question_choices && questionType.question_choices.map((item,key)=>{ questionType.question_choices && questionType.question_choices.map((item,key)=>{
return( return(
<p className="clearfix mb15 df"> <p className="clearfix mb15 df">
<Checkbox className="fl lineh-20 " value={item.choice_id}></Checkbox> <Checkbox className="fl lineh-20 " value={item.choice_id}></Checkbox>
<span class="fl lineh-20 mt1">{tagArray[key]}.</span><span style={{display:"inline-block"}} className="markdown-body mt1" dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span> <span class="fl lineh-20 mt1"></span><span style={{display:"inline-block"}} className="markdown-body mt1" dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span>
</p> </p>
) )
}) })
} }
</Checkbox.Group> </Checkbox.Group>
{ {
// 答案公开,且试卷已经截止 // 答案公开,且试卷已经截止
isStudent && exercise && exercise.answer_open==true && exercise.exercise_status == 3 && isStudent && exercise && exercise.answer_open==true && exercise.exercise_status == 3 &&
<p className="bor-top-greyE pt20 mt10 font-16">参考答案 <p className="bor-top-greyE pt20 mt10 font-16">参考答案
{questionType.standard_answer.map((i,k)=>{ {questionType.standard_answer.map((i,k)=>{
return( return(
<span value={k}>{tagArray[parseInt(i)-1]}</span> <span value={k}>{tagArray[parseInt(i)-1]}</span>
) )
}) })
} }
</p> </p>
} }
</div> </div>
) )
} }
} }
export default Multiple export default Multiple

@ -1,68 +1,68 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {Checkbox,Radio, Input} from "antd"; import {Checkbox,Radio, Input} from "antd";
import {markdownToHTML} from 'educoder' import {markdownToHTML} from 'educoder'
import axios from 'axios' import axios from 'axios'
const tagArray = [ const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', // 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', // 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' // 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
] ]
class single extends Component{ class single extends Component{
constructor(props){ constructor(props){
super(props); super(props);
} }
changeItem=(e)=>{ changeItem=(e)=>{
let choiceId=e.target.value; let choiceId=e.target.value;
let question_id=this.props.questionType.question_id; let question_id=this.props.questionType.question_id;
let url=`/exercise_questions/${question_id}/exercise_answers.json`; let url=`/exercise_questions/${question_id}/exercise_answers.json`;
axios.post((url),{ axios.post((url),{
exercise_choice_id:choiceId exercise_choice_id:choiceId
}).then((result)=>{ }).then((result)=>{
if(result){ if(result){
this.props.changeQuestionStatus && this.props.changeQuestionStatus(parseInt(this.props.questionType.q_position)-1,1); this.props.changeQuestionStatus && this.props.changeQuestionStatus(parseInt(this.props.questionType.q_position)-1,1);
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
} }
render(){ render(){
let { let {
questionType , questionType ,
exercise, exercise,
user_exercise_status user_exercise_status
}=this.props }=this.props
let isStudent =this.props.isStudent(); let isStudent =this.props.isStudent();
return( return(
<div className="pl30 pr30"> <div className="pl30 pr30">
<Radio.Group disabled={ user_exercise_status == 1 ? true : false } defaultValue={questionType.user_answer[0]} onChange={this.changeItem}> <Radio.Group disabled={ user_exercise_status == 1 ? true : false } defaultValue={questionType.user_answer[0]} onChange={this.changeItem}>
{ {
questionType.question_choices && questionType.question_choices.map((item,key)=>{ questionType.question_choices && questionType.question_choices.map((item,key)=>{
return( return(
<p className={parseInt(questionType.question_type) == 0 ? "clearfix mb15 df" : "fl mr40"}> <p className={parseInt(questionType.question_type) == 0 ? "clearfix mb15 df" : "fl mr40"}>
<Radio className="fl lineh-20" value={item.choice_id}></Radio> <Radio className="fl lineh-20" value={item.choice_id}></Radio>
<span className="fl lineh-20 mr3 mt1">{tagArray[key]}.</span><span style={{display:"inline-block"}} className="markdown-body fl mt1" dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span> <span className="fl lineh-20 mr3 mt1"></span><span style={{display:"inline-block"}} className="markdown-body fl mt1" dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span>
</p> </p>
) )
}) })
} }
</Radio.Group> </Radio.Group>
{ {
// 答案公开,且试卷已经截止 // 答案公开,且试卷已经截止
isStudent && exercise && exercise.answer_open==true && (exercise.exercise_status == 3 || user_exercise_status == 1) && isStudent && exercise && exercise.answer_open==true && (exercise.exercise_status == 3 || user_exercise_status == 1) &&
<p className="bor-top-greyE pt20 mt10 font-16">参考答案 <p className="bor-top-greyE pt20 mt10 font-16">参考答案
{questionType.standard_answer.map((i,k)=>{ {questionType.standard_answer.map((i,k)=>{
return( return(
<span value={k}>{tagArray[parseInt(i)-1]}</span> <span value={k}>{tagArray[parseInt(i)-1]}</span>
) )
}) })
} }
</p> </p>
} }
</div> </div>
) )
} }
} }
export default single export default single

@ -65,12 +65,12 @@ class GraduationTasksappraise extends Component{
} }
goback=()=>{ goback=()=>{
let {datalist}=this.state; // let {datalist}=this.state;
let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id; // let category_id=this.props.match.params.category_id;
//
window.location.href="/courses/"+courseId+"/graduation_tasks/"+datalist.graduation_id; // window.location.href="/courses/"+courseId+"/graduation_tasks/"+datalist.graduation_id;
window.history.go(-1)
} }
Cancelvisible=()=>{ Cancelvisible=()=>{

@ -783,16 +783,30 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()?operation.map((tag,key) => { {this.props.isAdmin()?operation.map((tag,key) => {
return( return(
<div key={key}> <div key={key}>
{/*<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>*/}
{/*其它历史评分将全部失效</pre>:""}>*/}
{/*{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >*/}
{/*{tag.name}*/}
{/*</a>*/}
{/*:*/}
{/*<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}*/}
{/*onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}>*/}
{/*{tag.status===0?"":tag.name}*/}
{/*</a>*/}
{/*}*/}
{/*</Tooltip>*/}
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/> <Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}> 其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} > {tag.name==="评阅"?<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name} {tag.name}
</a> </a>
: :
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}} <a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}> onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}>
{tag.status===0?"":tag.name} {tag.name}
</a> </a>
} }
@ -855,8 +869,7 @@ class GraduationTaskssettinglist extends Component{
) )
} }
if(taskslistdata&&taskslistdata.have_project===false){
if(taskslistdata&&taskslistdata.have_grouping===false){
columns.some((item,key)=> { columns.some((item,key)=> {
if (item.title === "关联项目") { if (item.title === "关联项目") {
@ -866,6 +879,10 @@ class GraduationTaskssettinglist extends Component{
} }
) )
}
if(taskslistdata&&taskslistdata.have_grouping===false){
columns.some((item,key)=> { columns.some((item,key)=> {
if (item.title === "分组") { if (item.title === "分组") {

@ -50,9 +50,10 @@ class GraduationTasksquestions extends Component{
} }
goback=()=>{ goback=()=>{
let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id; // let category_id=this.props.match.params.category_id;
window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id; // window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id;
window.history.go(-1)
} }
end=()=>{ end=()=>{

@ -37,7 +37,7 @@ class GraduationTasks extends Component{
} }
} }
fetchAll = (search,page,order,count) => { fetchAll = (search,page,order,count) => {
debugger
const cid = this.props.match.params.coursesId const cid = this.props.match.params.coursesId
@ -553,7 +553,8 @@ class GraduationTasks extends Component{
}) })
} }
// 题库选用成功后刷新页面 // 题库选用成功后刷新页面
useBankSuccess=()=>{ useBankSuccess=(checkBoxValues,object_ids)=>{
debugger
let {search,page,order,all_count} = this.state; let {search,page,order,all_count} = this.state;
this.fetchAll(search,page,order,all_count) this.fetchAll(search,page,order,all_count)
} }
@ -650,7 +651,7 @@ class GraduationTasks extends Component{
</Link> </Link>
</WordsBtn> : ""} </WordsBtn> : ""}
{this.props.isAdmin() ?<UseBank {...this.props} {...this.state} object_type={"gtask"} useBankSuccess={this.useBankSuccess}></UseBank>:""} {this.props.isAdmin() ?<UseBank {...this.props} {...this.state} object_type={"gtask"} useBankSuccess={()=>this.useBankSuccess()}></UseBank>:""}
</React.Fragment> </React.Fragment>
} }

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