From f103d7adc9c3035232cb46340d4aadab275e5c82 Mon Sep 17 00:00:00 2001
From: caicai8 <1149225589@qq.com>
Date: Mon, 26 Aug 2019 14:13:52 +0800
Subject: [PATCH 1/3] issue
---
.../courses/exercise/ExerciseReviewAndAnswer.js | 2 +-
public/react/src/modules/courses/poll/Poll.js | 14 +++++---------
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js
index cdbc7218b..3b849b2cf 100644
--- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js
+++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js
@@ -704,7 +704,7 @@ class ExerciseReviewAndAnswer extends Component{
{
// 填空(一直都有调分),和简答题调分:老师身份 已经评分的才能出现调分按钮
- isAdmin && ((parseInt(item.answer_status) == 1 && item.question_type == 4) || item.question_type == 3) ?
+ isAdmin && ((parseInt(item.answer_status) != 0 && item.question_type == 4) || item.question_type == 3) ?
+ { item.author && {item.author} } {item.commit_count===undefined?"":{item.commit_count} 已交} {item.uncommit_count===undefined?"":{item.uncommit_count} 未交} { diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index 5248f4c1a..f61a7852b 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -134,6 +134,7 @@ class ExerciseListItem extends Component{ {/**/}
+ { item.author && {item.author} } {item.exercise_status===1?"":{item.exercise_answer} 已答} {item.exercise_status===1?"":{item.exercise_unanswer} 未答} {item.unreview_count===null||item.exercise_status===1?"":{item.unreview_count} 未评数 } diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index 9f40d3064..1fc1905d1 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -553,6 +553,9 @@ class ExerciseReviewAndAnswer extends Component{ height:16px; margin-top:2px; } + .standardAnswer.editormd-html-preview,.answerStyle.editormd-html-preview{ + width:100%!important + } `} {/*
*/}
+ { item.author && {item.author} }
{
item.polls_status !=1 &&
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js
index 942c06800..9a9f9bd29 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js
@@ -333,7 +333,7 @@ class ShixunhomeWorkItem extends Component{
{/* {discussMessage.author.name} */}
-
+ { discussMessage.author && {discussMessage.author} }
{discussMessage.commit_count===undefined?"":{discussMessage.commit_count} 已交}
{discussMessage.uncommit_count===undefined?"":{discussMessage.uncommit_count} 未交}
{/*{discussMessage.replies_count} 3 未评*/}
From 17e1f44146ce7521f467d7eecba35cb435f34aa8 Mon Sep 17 00:00:00 2001
From: caicai8 <1149225589@qq.com>
Date: Tue, 27 Aug 2019 14:13:30 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E9=97=AE=E5=8D=B7-=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/poll/Poll.js | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/public/react/src/modules/courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js
index 16a488fce..aae09b41c 100644
--- a/public/react/src/modules/courses/poll/Poll.js
+++ b/public/react/src/modules/courses/poll/Poll.js
@@ -103,11 +103,11 @@ class Poll extends Component{
this.InitList(e.key,StudentList_value,page);
}
// 获取列表数据
- InitList=(type,search,page)=>{
+ InitList=(type,search,page,bank_checkValue)=>{
this.setState({
isSpin:true
})
- let {pageSize}=this.state
+ let { pageSize,checkBoxValues }=this.state
let coursesId=this.props.match.params.coursesId;
let url='/courses/'+coursesId+'/polls.json?limit='+pageSize+'&page='+page
if(type!="0"){
@@ -123,7 +123,7 @@ class Poll extends Component{
course_types:result.data.course_types,
polls_counts:result.data.polls_counts,
isSpin:false,
- checkBoxValues:[]
+ checkBoxValues: bank_checkValue ? bank_checkValue : []
})
}
}).catch((error)=>{
@@ -209,12 +209,6 @@ class Poll extends Component{
//判断是否有选中数据
if(this.state.checkBoxValues.length==0){
this.props.showNotification("请先在列表中选择数据");
- // this.setState({
- // modalsType:true,
- // modalsTopval:"请先在列表中选择数据",
- // modalsBottomval:'',
- // loadtype:true
- // })
}else{
if(value != "bank"){
this.setState({
@@ -325,13 +319,13 @@ class Poll extends Component{
}
// 题库选用成功后,立即发布,刷新页面
useBankSuccess=(checkValue,value)=>{
+ debugger;
this.setState({
isSpin:true
})
let{type,StudentList_value,page}=this.state
- this.InitList(type,StudentList_value,page);
- console.log(checkValue);
- console.log(value);
+ this.InitList(type,StudentList_value,page,value);
+
let coursesId=this.props.match.params.coursesId;
let url=`/courses/${coursesId}/polls/publish_modal.json`;
axios.get(url,{