this.showparagraph(key,index)} onMouseLeave={this.hideparagraph}>
+
this.showparagraph(key,index)} onMouseLeave={this.hideparagraph}>
diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
index 0556d94e9..57ba1b0ab 100644
--- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
+++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
@@ -45,6 +45,7 @@ class Studentshavecompletedthelist extends Component {
teacherlist: undefined,
searchtext: "",
Teacherliststudentlist: undefined,
+ mylistansum:0,
review: null,
course_groupysls: undefined,
nocomment: false,
@@ -1252,6 +1253,7 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users,
current_answer_user: response.data.current_answer_user,
course_groups: response.data.course_groups,
+ mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users
})
if (response.data.current_answer_user === undefined || response.data.current_answer_user === null) {
// 学生未截止
@@ -1622,6 +1624,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users,
current_answer_user: response.data.current_answer_user,
+ mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
})
if (response.data.exercise_types.subjective === 0) {
@@ -1756,6 +1759,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
+ mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
loadingstate: false,
columnsys: arr,
})
@@ -1788,6 +1792,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
+ mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
columnsys: arr,
})
}
@@ -1823,6 +1828,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
+ mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
loadingstate: false,
columnsys: arr,
})
@@ -1854,6 +1860,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
+ mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
loadingstate: false,
columnsys: arr,
})
@@ -1885,6 +1892,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
+ mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
columnsys: arr,
})
} else {
@@ -1909,6 +1917,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
+ mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
columnsys:arr,
})
}
@@ -1923,6 +1932,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
+ mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
loadingstate: false,
columnsys: this.state.columnsystwo,
})
@@ -1948,6 +1958,7 @@ class Studentshavecompletedthelist extends Component {
commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users,
course_groups: response.data.course_groups,
+ mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
loadingstate: false,
columnsys: arr,
})
@@ -2401,7 +2412,7 @@ class Studentshavecompletedthelist extends Component {
render() {
const isAdmin = this.props.isAdmin();
- let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable, 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} = this.state;
+ let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable, 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;
// console.log("Studentshavecompletedthelist");
// console.log(this.props.current_status);
return (
@@ -2789,11 +2800,11 @@ class Studentshavecompletedthelist extends Component {
{
- Teacherliststudentlist && Teacherliststudentlist.exercise_types.total_users && Teacherliststudentlist.exercise_types.total_users > limit ?
+ mylistansum && mylistansum > limit ?
: ""
}
diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js
index 35ccea51f..c61d045bd 100644
--- a/public/react/src/modules/courses/new/Goldsubject.js
+++ b/public/react/src/modules/courses/new/Goldsubject.js
@@ -805,8 +805,8 @@ class Goldsubject extends Component {
],
})(
- 公告栏
- 在线学习
+ 公告栏
+ 在线学习
实训作业
普通作业
试卷
From ae45177822139cb3b172619a56cd254843fe3229 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 19 Aug 2019 14:40:34 +0800
Subject: [PATCH 30/30] =?UTF-8?q?=E7=B2=BE=E5=93=81=E8=AF=BE=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/coursesDetail/CoursesBanner.js | 2 +-
.../modules/courses/elearning/Elearning.js | 2 +-
.../coursesDetail => modals}/Jointheclass.js | 0
.../modules/paths/PathDetail/DetailTop.css | 13 +
.../src/modules/paths/PathDetail/DetailTop.js | 244 ++++++++++++++++--
5 files changed, 231 insertions(+), 30 deletions(-)
rename public/react/src/modules/{courses/coursesDetail => modals}/Jointheclass.js (100%)
diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
index a136904d2..ecd831087 100644
--- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
+++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
@@ -11,7 +11,7 @@ import Modals from "../../modals/Modals";
import Guide from './CoursesGuide';
import AddStudentModal from '../members/modal/AddStudentModal'
import AddTeacherModal from '../members/modal/AddTeacherModal'
-import Jointheclass from './Jointheclass'
+import Jointheclass from '../../modals/Jointheclass'
// 点击按钮复制功能
// function jsCopy(){
// var e = document.getElementById("copy_invite_code");
diff --git a/public/react/src/modules/courses/elearning/Elearning.js b/public/react/src/modules/courses/elearning/Elearning.js
index 0941de631..3b277e487 100644
--- a/public/react/src/modules/courses/elearning/Elearning.js
+++ b/public/react/src/modules/courses/elearning/Elearning.js
@@ -4,7 +4,7 @@ import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder';
import './myelearning.css'
import axios from 'axios';
import YslDetailCards from "./YslDetailCards.js";
-import Jointheclass from '../coursesDetail/Jointheclass'
+import Jointheclass from '../../modals/Jointheclass'
//在线学习
class Elearning extends Component{
constructor(props){
diff --git a/public/react/src/modules/courses/coursesDetail/Jointheclass.js b/public/react/src/modules/modals/Jointheclass.js
similarity index 100%
rename from public/react/src/modules/courses/coursesDetail/Jointheclass.js
rename to public/react/src/modules/modals/Jointheclass.js
diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.css b/public/react/src/modules/paths/PathDetail/DetailTop.css
index cc9f7b87b..17ff8507f 100644
--- a/public/react/src/modules/paths/PathDetail/DetailTop.css
+++ b/public/react/src/modules/paths/PathDetail/DetailTop.css
@@ -30,4 +30,17 @@
padding: 0 30px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
+}
+
+.newbianji1{
+ font-size: 16px !important;
+ margin-right: 10px;
+ color: #4CACFF;
+ margin-bottom: 3px;
+ display: inline-block;
+}
+
+.solidright{
+ border-right: 1px solid #000;
+ height: 42px;
}
\ No newline at end of file
diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js
index 7fd957be5..902a6d8bf 100644
--- a/public/react/src/modules/paths/PathDetail/DetailTop.js
+++ b/public/react/src/modules/paths/PathDetail/DetailTop.js
@@ -1,5 +1,5 @@
import React,{ Component } from "react";
-import { Modal,Radio,Input,Tooltip } from "antd";
+import { Modal,Radio,Input,Tooltip, Menu, Dropdown, Icon,Breadcrumb } from "antd";
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import SendPanel from "./sendPanel.js";
import { getImageUrl } from 'educoder';
@@ -20,10 +20,25 @@ class DetailTop extends Component{
Modalsbottomval:'',
loadtype:false,
deletepathtype:false,
- cardsModalsavetype:false
+ cardsModalsavetype:false,
+ MenuItemskey:1,
+ courseslist:[]
}
}
-
+ componentDidMount(){
+ let courseslist=[]
+ this.props.courses.map((item,key)=>{
+ if(1===key+1){
+ return(
+ courseslist.push(item)
+ )
+ }
+ })
+ this.setState({
+ courseslist:courseslist
+ })
+ console.log(courseslist)
+ }
allow_deletepath=()=>{
this.setState({
Modalstype:true,
@@ -141,6 +156,29 @@ class DetailTop extends Component{
})
}
+ onVisibleChanges=(type)=>{
+ this.setState({
+ onVisibleChangestype:type
+ })
+ }
+
+ MenuItems=(keys)=>{
+ let courseslist=[]
+ this.props.courses.map((item,key)=>{
+ if(keys===key+1){
+ return(
+ courseslist.push(item)
+ )
+ }
+ })
+
+ console.log(courseslist)
+
+ this.setState({
+ MenuItemskey:keys,
+ courseslist:courseslist
+ })
+ }
render(){
let{detailInfoList}=this.props;
let{Modalstype,Modalstopval,cardsModalcancel,cardsModalsave,Modalsbottomval,cardsModalsavetype,loadtype}=this.state;
@@ -150,9 +188,26 @@ class DetailTop extends Component{
lineHeight: '30px',
};
- console.log(this.props)
+
//
- return(
+
+ let menu = (
+
+ );
+
+
+
+ return(
申请发布:""
+ 申请发布:""
}
{
detailInfoList.publish_status===1 && detailInfoList.allow_statistics===true?
- 撤销申请:""
+ 撤销申请:""
}
{
detailInfoList.publish_status===2 && detailInfoList.allow_statistics===true?
- 撤销发布:""
+ 撤销发布:""
}
:""}
{this.props.courses===undefined?"":detailInfoList.is_creator===true?
:""}
{/*{this.props.courses===undefined||this.props.courses.length===0?"":*/}
{this.props.courses===undefined?"":
-
翻转课堂
-
开发社区
-
实践课程
-
项目
-
众包
-
视频
+
+
+
+
+
+ 第{this.state.MenuItemskey}次开课
+
+
+
+
+
+ {this.state.courseslist.map((item,key)=>{
+ // course_id: 1309
+ // course_identity: 5
+ // course_status: {status: 1, time: "进行至第5周,共1642周"}
+ // first_category_url: "/courses/1309/informs"
+ return(
+
+
+
+
+ 开课时间:
+
+
+ {item.start_date}
+
+
+
+
+
+
+
+
+ 结课时间:
+
+
+ {item.end_date}
+
+
+
+
+
+
+
+
+ 报名人数:
+
+
+ {item.student_count}人
+
+
+
+
+ )
+ })
+ }
+
+
+
+
+ {this.state.courseslist.map((item,key)=>{
+
+ return(
+
+ {item.course_status.status===0?
即将开课:""}
+ {item.course_status.status===1?
{item.course_status.time}:""}
+ {item.course_status.status===2?
+ detailInfoList.is_creator===true?
已结束:item.course_identity<6?
+
已结束:"":""}
+
+
+ {item.course_status.status===0?
+ detailInfoList.is_creator===true?
+ 进入课堂
+ :item.course_identity<6?
报名成功
+ :
立即报名:""}
+
+
+ {item.course_status.status===1?
+ detailInfoList.is_creator===true?
+ 进入课堂
+ :item.course_identity<6?
+ 立即学习
+ :
立即加入:""}
+
+ {item.course_status.status===2?
+ detailInfoList.is_creator===true?
+ 进入课堂
+ :item.course_identity<6?
+ 进入课堂
+ :
已结束
:""}
+
+
+ )})}
+
+
+
}