|
|
|
@ -42,6 +42,7 @@ class VideoIndex extends Component {
|
|
|
|
|
liveVisible: false,
|
|
|
|
|
statistics: false,
|
|
|
|
|
myktid:null,
|
|
|
|
|
mytitle:''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -56,10 +57,23 @@ class VideoIndex extends Component {
|
|
|
|
|
this.getLiveList(page);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Setmyktid=(id)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
myktid:id
|
|
|
|
|
})
|
|
|
|
|
Setmyktid=(id,title)=>{
|
|
|
|
|
const isAdmin = this.props&& this.props.isAdmin();
|
|
|
|
|
if(isAdmin===true){
|
|
|
|
|
this.setState({
|
|
|
|
|
myktid:id,
|
|
|
|
|
statistics:true,
|
|
|
|
|
mytitle:title,
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
statistics:true,
|
|
|
|
|
myktid:null,
|
|
|
|
|
mytitle:"",
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
componentDidMount = () => {
|
|
|
|
|
const {search} = this.props.location;
|
|
|
|
@ -84,6 +98,8 @@ class VideoIndex extends Component {
|
|
|
|
|
if(this.props.homedirectory ===true){
|
|
|
|
|
this.setState({
|
|
|
|
|
statistics:false,
|
|
|
|
|
myktid:null,
|
|
|
|
|
mytitle:"",
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -260,12 +276,14 @@ class VideoIndex extends Component {
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
statistics: bool,
|
|
|
|
|
myktid:null,
|
|
|
|
|
mytitle:"",
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
const {videos, upload, videoData, type, liveData, lives, page, liveVisible, isSpining, liveId, otherLinkVisible, statistics} = this.state;
|
|
|
|
|
const {videos, upload, videoData, type, liveData, lives, page, liveVisible, isSpining, liveId, otherLinkVisible, statistics,myktid} = this.state;
|
|
|
|
|
const {coursesId, videoId} = this.props.match.params;
|
|
|
|
|
let {course_identity} = this.props && this.props.coursedata;
|
|
|
|
|
let is_teacher = this.props && this.props.user && this.props.user.is_teacher;
|
|
|
|
@ -382,8 +400,16 @@ class VideoIndex extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
:
|
|
|
|
|
(
|
|
|
|
|
myktid===null||myktid===undefined?
|
|
|
|
|
<Videostatistics {...this.props} {...this.state} statisticsy={(b) => this.statisticsy(b)}></Videostatistics>
|
|
|
|
|
:
|
|
|
|
|
|
|
|
|
|
<Videostatisticscomtwo {...this.state} {...this.props} tisid={myktid} mytitle={mytitle} tisticsbools={(b,id,t)=>this.tisticsbools(b,id,t)}></Videostatisticscomtwo>
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Videostatistics {...this.props} {...this.state} statisticsy={(b) => this.statisticsy(b)}></Videostatistics>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -394,7 +420,7 @@ class VideoIndex extends Component {
|
|
|
|
|
type === "video" ?
|
|
|
|
|
<Videos
|
|
|
|
|
mykt={"mykt"}
|
|
|
|
|
Setmyktid={(id)=>this.Setmyktid(id)}
|
|
|
|
|
Setmyktid={(id,title)=>this.Setmyktid(id,title)}
|
|
|
|
|
upload={upload}
|
|
|
|
|
videos={videos}
|
|
|
|
|
page={page}
|
|
|
|
|