hjm 6 years ago
commit 8300491b27

@ -49,8 +49,19 @@ class Fileslists extends Component{
this.seactall(parseInt(this.props.match.params.Id),1) this.seactall(parseInt(this.props.match.params.Id),1)
} }
this.updadatalist(); this.updadatalist();
on('updateNavSuccess', this.updateNavSuccess)
} }
updateNavSuccess=()=>{
this.setState({
isSpin:true
})
if(this.props.match.params.main_id){
this.seactall();
}else if(this.props.match.params.Id){
this.seactall(parseInt(this.props.match.params.Id),1)
}
}
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
if(prevProps.match.params.main_id != this.props.match.params.main_id){ if(prevProps.match.params.main_id != this.props.match.params.main_id){
this.setState({ this.setState({

@ -55,12 +55,12 @@ class CoursesBanner extends Component {
let courseId = this.props.match.params.coursesId; let courseId = this.props.match.params.coursesId;
let url = "/courses/" + courseId + "/top_banner.json" let url = "/courses/" + courseId + "/top_banner.json"
axios.get(url).then((result) => { axios.get(url).then((result) => {
if( result!=undefined){
let data = result.data; let data = result.data;
this.setState({ this.setState({
coursedata: data coursedata: data
}) })
// console.log(data) }
}) })
} }
showeditmenu = () => { showeditmenu = () => {

@ -200,7 +200,7 @@ class HomeworkModal extends Component{
{this.props.modaltype===undefined||this.props.modaltype===2||this.props.modaltype===4 {this.props.modaltype===undefined||this.props.modaltype===2||this.props.modaltype===4
|| !course_groups || course_groups.length == 0 || !course_groups || course_groups.length == 0
|| this.props.usingCheckBeforePost ?"":<ul className="upload_select_box fl clearfix mt20 mb30" || this.props.usingCheckBeforePost ?"":<ul className="upload_select_box fl clearfix mt20 mb30"
style={{"overflow-y":"auto"}} style={{"overflow-y":"auto",padding:"10px 0px"}}
id="search_not_members_list" id="search_not_members_list"
// onScroll={this.contentViewScroll} // onScroll={this.contentViewScroll}
@ -221,8 +221,8 @@ class HomeworkModal extends Component{
{ {
course_groups.map((item,key)=>{ course_groups.map((item,key)=>{
return( return(
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}> <div className="clearfix edu-txt-center lineh-40" key={key}>
<li style={{ width: '100%'}}> <li style={{ width: '100%',padding: "0px 10px"}}>
<Checkbox <Checkbox
className="task-hide edu-txt-left" className="task-hide edu-txt-left"
name="shixun_homework[]" name="shixun_homework[]"

@ -5,7 +5,7 @@ import ExerciseListItem from './ExerciseListItem'
import axios from 'axios'; import axios from 'axios';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
import '../css/members.css' import '../css/members.css'
import { WordsBtn } from 'educoder' import { WordsBtn,on, off, trigger } from 'educoder'
import '../css/busyWork.css' import '../css/busyWork.css'
import _ from 'lodash'; import _ from 'lodash';
import moment from 'moment' import moment from 'moment'
@ -53,6 +53,11 @@ class Exercise extends Component{
// 加载列表 // 加载列表
componentDidMount(){ componentDidMount(){
this.reloadList();
on('updateNavSuccess', this.updateNavSuccess)
}
updateNavSuccess=()=>{
this.reloadList(); this.reloadList();
} }

@ -660,7 +660,7 @@ class ExerciseReviewAndAnswer extends Component{
return( return(
<div className="bor-top-greyE pt30 pb30" id={"Anchor_"+parseInt(key+1)}> <div className="bor-top-greyE pt30 pb30" id={"Anchor_"+parseInt(key+1)}>
<p className="clearfix font-16 pl30 pr30"> <p className="clearfix font-16 pl30 pr30">
<span className="color-blue mr5">{exercise_questions.q_position}{type[item.question_type]}</span><span className="color-grey-9 mr5">({item.question_score})</span> <span className="color-blue mr5">{item.q_position}{type[item.question_type]}</span><span className="color-grey-9 mr5">({item.question_score})</span>
<span className="fr"> <span className="fr">
{ {
// 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮 // 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮

@ -65,7 +65,7 @@ class fillEmpty extends Component{
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.question_number)-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);
@ -115,11 +115,11 @@ class fillEmpty extends Component{
<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.question_number}${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={item.q_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.question_number)} initValue={item.value} onCMBlur={()=>this.onBlurEmpty(key,questionType.q_position)}
></DMDEditor> ></DMDEditor>
} }
</div> </div>

@ -25,7 +25,7 @@ class Multiple extends Component{
}else{ }else{
k=0; k=0;
} }
this.props.changeQuestionStatus && this.props.changeQuestionStatus(parseInt(this.props.questionType.question_number)-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);
@ -39,6 +39,7 @@ class Multiple extends Component{
user_exercise_status user_exercise_status
}=this.props }=this.props
let isStudent =this.props.isStudent(); let isStudent =this.props.isStudent();
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}>

@ -30,7 +30,7 @@ class simpleAnswer extends Component{
// simpleValue:undefined // simpleValue:undefined
// }) // })
let k= simpleAnswer == "" ? 0 :1; let k= simpleAnswer == "" ? 0 :1;
this.props.changeQuestionStatus && this.props.changeQuestionStatus(parseInt(this.props.questionType.question_number)-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);

@ -1,26 +1,18 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip ,Spin} from "antd"; import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip ,Spin} from "antd";
import CourseLayoutcomponent from '../common/CourseLayoutComponent'; import {WordsBtn, on, off, trigger } from 'educoder';
import HomeworkModal from "../coursesPublic/HomeworkModal"; import HomeworkModal from "../coursesPublic/HomeworkModal";
import ShixunModal from "../coursesPublic/ShixunModal";
import PathModal from "../coursesPublic/PathModal";
import AddcoursesNav from "../coursesPublic/AddcoursesNav"; import AddcoursesNav from "../coursesPublic/AddcoursesNav";
import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish' import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish';
import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd' import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd';
import PollListItem from './PollListItem' import PollListItem from './PollListItem';
import NoneData from '../coursesPublic/NoneData' import NoneData from '../coursesPublic/NoneData';
import UseBank from '../busyWork/UseBank' import UseBank from '../busyWork/UseBank';
import _ from 'lodash'; import _ from 'lodash';
import '../css/members.css';
import '../css/members.css' import '../css/busyWork.css';
import '../css/busyWork.css' import Modals from '../../modals/Modals';
import axios from 'axios';
import { WordsBtn } from 'educoder'
import Modals from '../../modals/Modals'
import axios from 'axios'
const Search = Input.Search; const Search = Input.Search;
@ -139,6 +131,15 @@ class Poll extends Component{
} }
// 加载列表 // 加载列表
componentDidMount(){ componentDidMount(){
this.setState({
isSpin:true
})
let{type,StudentList_value,page}=this.state
this.InitList(type,StudentList_value,page);
on('updateNavSuccess', this.updateNavSuccess)
}
updateNavSuccess=()=>{
this.setState({ this.setState({
isSpin:true isSpin:true
}) })

@ -57,7 +57,29 @@ class ShixunHomework extends Component{
isSpin:false isSpin:false
} }
} }
updateNavSuccess=()=>{
this.setState({
isSpin:true
})
if(this.props.match.params.main_id){
this.setState({
isSpin:true
})
this.seactall();
if(this.props.isAdmin()===true){
this.updadatalist()
}
}else if(this.props.match.params.category_id){
this.setState({
isSpin:true
})
this.seactall(parseInt(this.props.match.params.category_id))
if(this.props.isAdmin()===true){
this.updadatalist()
}
}
}
componentDidMount() { componentDidMount() {
this.setState({ this.setState({
isSpin:true isSpin:true
@ -80,6 +102,7 @@ class ShixunHomework extends Component{
this.updadatalist() this.updadatalist()
} }
} }
on('updateNavSuccess', this.updateNavSuccess)
} }
seactall=(id)=>{ seactall=(id)=>{
this.setState({ this.setState({

@ -308,7 +308,7 @@ class Infos extends Component{
: :
<div className="inline"> <div className="inline">
<a href="javascript:void(0);" onClick={this.followPerson} className="user_default_btn user_watch_btn user_private_btn fl mr20">{followed ? "取消关注":"关注"}</a> <a href="javascript:void(0);" onClick={this.followPerson} className="user_default_btn user_watch_btn user_private_btn fl mr20">{followed ? "取消关注":"关注"}</a>
<a href={`/users/${login}/message_detail?user_id=${id}`} className="user_default_btn user_private_btn fl">私信</a> <a href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${login}/message_detail?user_id=${id}`} className="user_default_btn user_private_btn fl">私信</a>
</div> </div>
} }
</div> </div>

@ -122,7 +122,7 @@ class InfosProject extends Component{
<div className="square-list clearfix"> <div className="square-list clearfix">
{ {
!isStudent && page == 1 && !category && is_current && !isStudent && page == 1 && !category && is_current &&
<Create href={"/projects/new"} name={"新建项目"} index="4"></Create> <Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建项目"} index="4"></Create>
} }
{ {
(!data || data.projects.length==0) && (isStudent || category) && <NoneData></NoneData> (!data || data.projects.length==0) && (isStudent || category) && <NoneData></NoneData>
@ -130,7 +130,7 @@ class InfosProject extends Component{
{ {
data && data.projects && data.projects.map((item,key)=>{ data && data.projects && data.projects.map((item,key)=>{
return( return(
<div className="square-Item" onClick={()=>this.turnToCourses(`/projects/${item.id}`,item.can_visited)} style={{"cursor": "pointer"}}> <div className="square-Item" onClick={()=>this.turnToCourses(`${this.props.Headertop && this.props.Headertop.old_url}/projects/${item.id}`,item.can_visited)} style={{"cursor": "pointer"}}>
{ {
item.is_public==1 && item.is_public==1 &&
<React.Fragment> <React.Fragment>

Loading…
Cancel
Save