From c117b2d0a463f84a883f846483241677a734105a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 31 Aug 2019 14:31:27 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E5=90=88=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../react/src/modules/courses/poll/PollNew.js | 35 ++++++++++++-------
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js
index b84bf4794..419fd8f5f 100644
--- a/public/react/src/modules/courses/poll/PollNew.js
+++ b/public/react/src/modules/courses/poll/PollNew.js
@@ -1803,17 +1803,22 @@ class PollNew extends Component {
var urlly = `/polls/${poll_id}/poll_questions.json`
var max_choicess = null;
var min_choicess = null;
- if (max_choices === 0 && min_choices === 0) {
+ try {
+ if (max_choices === 0 && min_choices === 0) {
+ max_choicess = null;
+ min_choicess = null;
+ } else {
+ max_choicess = max_choices;
+ min_choicess = min_choices;
+ }
+ }catch (e) {
max_choicess = null;
min_choicess = null;
- } else {
- max_choicess = max_choices;
- min_choicess = min_choices;
}
- console.log("createquestionsandanswers");
- console.log(max_choicess);
- console.log(min_choicess);
- console.log(length);
+ // console.log("createquestionsandanswers");
+ // console.log(max_choicess);
+ // console.log(min_choicess);
+ // console.log(length);
axios.post(urlly, {
question_title: object.question.question_title,
question_type: number,
@@ -1856,13 +1861,19 @@ class PollNew extends Component {
var thiss = this;
var max_choicess = null;
var min_choicess = null;
- if (max_choices === 0 && min_choices === 0) {
+ try {
+ if (max_choices === 0 && min_choices === 0) {
+ max_choicess = null;
+ min_choicess = null;
+ } else {
+ max_choicess = max_choices;
+ min_choicess = min_choices;
+ }
+ }catch (e) {
max_choicess = null;
min_choicess = null;
- } else {
- max_choicess = max_choices;
- min_choicess = min_choices;
}
+
console.log("createquestionsandanswers");
console.log(max_choicess);
console.log(min_choicess);
From 179db075604625682a81959eb9cc5f24f0a192f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Sat, 31 Aug 2019 14:32:06 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=96=B0=E5=BB=BA?=
=?UTF-8?q?=E8=AF=BE=E5=A0=82=20=E9=87=91=E8=AF=BE=E4=BD=93=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/courses/new/CoursesNew.js | 6 +++---
public/react/src/modules/courses/new/Goldsubject.js | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js
index 381886563..bcf5a8c19 100644
--- a/public/react/src/modules/courses/new/CoursesNew.js
+++ b/public/react/src/modules/courses/new/CoursesNew.js
@@ -870,14 +870,14 @@ class CoursesNew extends Component {
})(
- {optionschool}
)}
-
+
{/*(输入内容出现匹配的下拉菜单←同账号管理的单位信息填写)*/}
diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js
index 8ef193947..a01821cb1 100644
--- a/public/react/src/modules/courses/new/Goldsubject.js
+++ b/public/react/src/modules/courses/new/Goldsubject.js
@@ -1026,10 +1026,11 @@ class Goldsubject extends Component {
- {optionschool}
)}
From d4234a874c4f16baccffa7f7adfbeddf648847e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 31 Aug 2019 14:35:03 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E5=90=88=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../react/src/modules/courses/poll/PollNew.js | 49 ++++++++++++++-----
1 file changed, 37 insertions(+), 12 deletions(-)
diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js
index 419fd8f5f..494ce7150 100644
--- a/public/react/src/modules/courses/poll/PollNew.js
+++ b/public/react/src/modules/courses/poll/PollNew.js
@@ -1819,16 +1819,29 @@ class PollNew extends Component {
// console.log(max_choicess);
// console.log(min_choicess);
// console.log(length);
- axios.post(urlly, {
+ var datay={};
+ datay={
question_title: object.question.question_title,
question_type: number,
is_necessary: object.question.is_necessary,
- max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess,
- min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess,
question_answers: option,
question_other_answer: null,
insert_id: insert_id
- }).then((result) => {
+ }
+ if(number&&number===2){
+ datay={
+ question_title: object.question.question_title,
+ question_type: number,
+ is_necessary: object.question.is_necessary,
+ max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess,
+ min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess,
+ question_answers: option,
+ question_other_answer: null,
+ insert_id: insert_id
+ }
+ }
+
+ axios.post(urlly, datay).then((result) => {
// try {
if (result !== undefined) {
if (result.data.status === 0) {
@@ -1874,20 +1887,32 @@ class PollNew extends Component {
min_choicess = null;
}
- console.log("createquestionsandanswers");
- console.log(max_choicess);
- console.log(min_choicess);
- console.log(length);
- axios.put(url, {
+ // console.log("createquestionsandanswers");
+ // console.log(max_choicess);
+ // console.log(min_choicess);
+ // console.log(length);
+ var datay={};
+ datay={
// debug: true,
question_title: object.question.question_title,
question_type: number,
is_necessary: object.question.is_necessary,
- max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess,
- min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess,
question_answers: option,
question_other_answer: null,
- }).then((result) => {
+ };
+ if(number&&number===2){
+ datay={
+ // debug: true,
+ question_title: object.question.question_title,
+ question_type: number,
+ is_necessary: object.question.is_necessary,
+ max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess,
+ min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess,
+ question_answers: option,
+ question_other_answer: null,
+ };
+ }
+ axios.put(url,datay ).then((result) => {
try {
if (result.data.status === 0) {
this.props.showNotification(`编辑题目成功`);
From a95bd30fd7cecde4cc0d98e6d5f1ea7ae441be0f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 31 Aug 2019 14:41:00 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E5=90=88=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../react/src/modules/courses/poll/PollNew.js | 53 +++++++++++--------
1 file changed, 31 insertions(+), 22 deletions(-)
diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js
index 494ce7150..fb079d621 100644
--- a/public/react/src/modules/courses/poll/PollNew.js
+++ b/public/react/src/modules/courses/poll/PollNew.js
@@ -1828,17 +1828,21 @@ class PollNew extends Component {
question_other_answer: null,
insert_id: insert_id
}
- if(number&&number===2){
- datay={
- question_title: object.question.question_title,
- question_type: number,
- is_necessary: object.question.is_necessary,
- max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess,
- min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess,
- question_answers: option,
- question_other_answer: null,
- insert_id: insert_id
+ try {
+ if(number===2){
+ datay={
+ question_title: object.question.question_title,
+ question_type: number,
+ is_necessary: object.question.is_necessary,
+ max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess,
+ min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess,
+ question_answers: option,
+ question_other_answer: null,
+ insert_id: insert_id
+ }
}
+ }catch (e) {
+
}
axios.post(urlly, datay).then((result) => {
@@ -1900,19 +1904,24 @@ class PollNew extends Component {
question_answers: option,
question_other_answer: null,
};
- if(number&&number===2){
- datay={
- // debug: true,
- question_title: object.question.question_title,
- question_type: number,
- is_necessary: object.question.is_necessary,
- max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess,
- min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess,
- question_answers: option,
- question_other_answer: null,
- };
+ try {
+ if(number===2){
+ datay={
+ // debug: true,
+ question_title: object.question.question_title,
+ question_type: number,
+ is_necessary: object.question.is_necessary,
+ max_choices: max_choicess===undefined?length:max_choicess===null?length:max_choicess===0?length:max_choicess,
+ min_choices: min_choicess===undefined?2:min_choicess===null?2:min_choicess===0?2:min_choicess,
+ question_answers: option,
+ question_other_answer: null,
+ };
+ }
+ }catch (e) {
+
}
- axios.put(url,datay ).then((result) => {
+
+ axios.put(url,datay).then((result) => {
try {
if (result.data.status === 0) {
this.props.showNotification(`编辑题目成功`);
From d270680ffbc23c8f1335bb6b8bcfee9611150df9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Sat, 31 Aug 2019 15:13:08 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=20=E9=87=91=E8=AF=BE=E5=BC=80=E8=AF=BE?=
=?UTF-8?q?=E9=80=9A=E7=9F=A5=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/paths/PathDetail/DetailTop.js | 34 ++++++++++++++-----
1 file changed, 26 insertions(+), 8 deletions(-)
diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js
index 4506f8700..9a460d696 100644
--- a/public/react/src/modules/paths/PathDetail/DetailTop.js
+++ b/public/react/src/modules/paths/PathDetail/DetailTop.js
@@ -35,6 +35,7 @@ class DetailTop extends Component{
getdatalist=()=>{
let courseslist=[];
let keys=1;
+ let listtype=false;
if(this.props.courses!=undefined&&this.props.courses.length!=0){
if(this.props.detailInfoList.has_start===true){
this.props.courses.map((item,key)=>{
@@ -47,14 +48,31 @@ class DetailTop extends Component{
})
}else{
- this.props.courses.map((item,key)=>{
- if(this.props.pathtopskey===key+1){
- keys=key+1
- return(
- courseslist.push(item)
- )
- }
- })
+ this.props.courses.map((item,key)=>{
+ if(listtype===false){
+ keys=key+1
+ if(item.course_status.status===0) {
+ listtype=true
+ return (
+ courseslist.push(item)
+ )
+ }
+ }
+ })
+
+
+ this.props.courses.map((item,key)=>{
+ if(listtype===false){
+ keys=key+1
+ if(item.course_status.status===2) {
+ listtype=true
+ return (
+ courseslist.push(item)
+ )
+ }
+ }
+ })
+
}
}
this.setState({