From 4f0614ab9c1cd7dd235617c904620c07729b6010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 6 Nov 2019 15:29:06 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A2=98=E5=BA=93?= =?UTF-8?q?=E9=80=89=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/busyWork/UseBank.js | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index de9193fd9..50838adc1 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -11,7 +11,7 @@ import NoneData from '../coursesPublic/NoneData' const Search=Input.Search; const pageCount = 20 -// "poll", #normal 普通作业题库; group 分组作业题库; poll问卷题库; exercise试卷题库; gtask 毕设选题题库;gtopic 毕设任务 +// "poll", #normal 普通作业题库; group 分组作业题库; poll问卷题库; exercise试卷题库; gtask 毕设选题题库;gtopic 毕设任务 const engNameMap = { poll: '问卷', normal: '普通作业', @@ -37,7 +37,7 @@ class UseBank extends Component{ componentDidMount() { console.log("UseBank"); console.log(this.props); - + } onCheckBoxChange = (checkBoxValues) => { this.setState({ @@ -51,10 +51,10 @@ class UseBank extends Component{ } fetchAll = (arg_page) => { console.log('fetchAll') - const courseId = this.props.match.params.coursesId + const courseId = this.props.match.params.coursesId const page = arg_page || this.state.page; const { nav_my, search } = this.state - /** + /** normal 普通作业题库; group 分组作业题库; poll问卷题库; exercise试卷题库; gtask 毕设选题题库;gtopic 毕设任务 filter string public公共题库 2, myself我的题库 1 */ @@ -142,11 +142,11 @@ class UseBank extends Component{ this.setState({ hometypepvisible:true }) - const courseId = this.props.match.params.coursesId + const courseId = this.props.match.params.coursesId let url = `/question_banks/save_banks.json` this.setState({ loading: true }) axios.post(url - ,{ + , { "object_type": object_type, "bank_id": checkBoxValues, "course_id": courseId @@ -167,7 +167,7 @@ class UseBank extends Component{ hometypepvisible:false, checkBoxValues:[] }) - this.props.showNotification(response.data.message) + this.props.showNotification(response.data.message) } }) .catch( (error) =>{ @@ -224,7 +224,7 @@ class UseBank extends Component{ Margin-left:15px } .with63{ - width: 63% !important; + width: 52% !important; box-sizing: border-box; margin-left: 15px; } @@ -267,14 +267,14 @@ class UseBank extends Component{ > { - object_list && object_list.length == 0 && page == 1 ? "" : nav_my==='myself'? + object_list && object_list.length == 0 && page == 1 ? "" : nav_my === 'myself' ?

选用对象:你在课堂{engNameMap[object_type]}列表中已“加入题库”的{engNameMap[object_type]}

:

选用对象:题库中已设置成公共属性的所有{engNameMap[object_type]}

} - + { - nav_my !='myself' && is_teacher == false ? + nav_my != 'myself' && is_teacher == false ?

通过职业认证的教师才能访问公共题库

@@ -296,7 +296,7 @@ class UseBank extends Component{ > { object_list && object_list.map( item => { - /** + /** course_list_name: "C++程序设计" id: 3889 name: "作业3:第四章 控制结构 " @@ -313,7 +313,7 @@ class UseBank extends Component{ >{item.course_list_name} { - nav_my==='public' && + nav_my === 'public' && {item.username} } {nav_my === "myself" ? @@ -345,15 +345,15 @@ class UseBank extends Component{ 数据库原理数据库原理 { - nav_my===2 && + nav_my===2 && 胡莎莎胡莎莎 }

*/} -
+
} - -

+ +

{ isChecked !="" ? {isChecked}:"" } @@ -376,4 +376,4 @@ class UseBank extends Component{ ) } } -export default UseBank; \ No newline at end of file +export default UseBank; From 1888c7f8501f21cbf8543ec4bc2aa4bc45fdae41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 6 Nov 2019 15:42:03 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A2=98=E5=BA=93?= =?UTF-8?q?=E9=80=89=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/UseBank.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index 50838adc1..1729f7fa5 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -224,7 +224,7 @@ class UseBank extends Component{ Margin-left:15px } .with63{ - width: 52% !important; + width: 63% !important; box-sizing: border-box; margin-left: 15px; } @@ -353,7 +353,7 @@ class UseBank extends Component{ } -

+

{ isChecked !="" ? {isChecked}:"" } From 5aeac0a802f31e87b0245bafd8e0beeace08a55f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 6 Nov 2019 15:44:20 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=AB=9E=E8=B5=9Bbanner?= =?UTF-8?q?=E6=8A=A5=E5=90=8D=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Competitioncommon/CompetitionCommon.css | 4 +++ .../Competitioncommon/CompetitionCommon.js | 34 +++++++++++++++++-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.css b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.css index f55c9a336..7603137e0 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.css +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.css @@ -399,4 +399,8 @@ .color000{ color: #000; +} + +.cursorpointer{ + cursor: pointer; } \ No newline at end of file diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js index ed129d8bd..86f22bcda 100755 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js @@ -224,6 +224,18 @@ class CompetitionCommon extends Component{ Competitionedittype:false }) + } + newgotocourse=(url)=>{ + if(this.props.checkIfLogin()===false){ + this.props.showLoginDialog() + return + } + if(this.props.checkIfProfileCompleted()===false){ + this.props.showProfileCompleteDialog() + return + } + window.open(url); + } gotocourse=(url)=>{ @@ -267,7 +279,7 @@ class CompetitionCommon extends Component{ let urls = `/competitions/${this.props.match.params.identifier}/enroll`; this.Personalregistration(urls) } else { - this.props.history.replace(url); + window.open(url); } } @@ -379,8 +391,24 @@ class CompetitionCommon extends Component{ className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516">{data.competition_status === "nearly_published" ? "--" : data && data.visits_count} -

this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}>{data.competition_status === "nearly_published" ? "--" : data && data.member_count}
+ + {data.competition_status === "ended" ? +
this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)} + onClick={ data.mode === 2 ?() => this.newgotocourse(`/courses/${data.course_id}`):() => this.newgotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)} + >{data && data.member_count}
+ :data.competition_status === "nearly_published" ? +
this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)} + >{"--"}
: + data.competition_status === "progressing" ? + data.mode === 2 ? +
this.gotocourse()}>{data && data.member_count}
: signupdata && signupdata.personal === true ? +
this.gotocourse("personal")}>{data && data.member_count}
:
this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}>{data && data.member_count}
+ :""} +