From 27be7606345f2a87f0d3071c7841169f8302c0e5 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, 8 Jan 2020 15:49:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 2 +- .../modules/courses/boards/BoardsListItem.js | 7 +++--- .../courses/exercise/ExerciseListItem.js | 24 +++++++++++++++---- .../graduation/tasks/GraduateTaskItem.js | 14 +++++++++++ .../graduation/topics/GraduateTopicItem.js | 14 +++++++++-- .../src/modules/courses/poll/PollListItem.js | 11 +++++++-- .../shixunHomework/ShixunhomeWorkItem.js | 12 ++++++---- 7 files changed, 66 insertions(+), 18 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 2926d6c0f..5acc8bf04 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -42,7 +42,7 @@ if (isDev) { // 老师 //debugType="teacher"; // 学生 -//debugType="student"; + debugType="student"; function railsgettimes(proxy) { diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js index 0df7675a3..db58fb998 100644 --- a/public/react/src/modules/courses/boards/BoardsListItem.js +++ b/public/react/src/modules/courses/boards/BoardsListItem.js @@ -75,6 +75,7 @@ class BoardsListItem extends Component{ ) : "" } + {canNotLink?"": {} : () => this.onTitleClick(discussMessage)}>查看详情}
@@ -112,14 +113,14 @@ class BoardsListItem extends Component{
} - - {/* { (isAdmin || discussMessage.author.login == current_user.login) && + + {/* { (isAdmin || discussMessage.author.login == current_user.login) &&
} + + { + this.props.isNotMember()? item.lock_status === 0 ? + "" + :
+
  • this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>查看详情
  • +
    :"" + } + ) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 39a2f0876..6a3e4aea5 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -300,12 +300,19 @@ class GraduateTaskItem extends Component{ {this.props.isAdmin?
    + 设置 + 编辑 + + this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")} + className="btn colorblue colorblue font-16 mr20 fr"> + 查看详情 +
    :""} @@ -319,6 +326,8 @@ class GraduateTaskItem extends Component{ return( + + {item==="提交作品"? @@ -384,6 +393,11 @@ class GraduateTaskItem extends Component{ ) }):""} + {this.props.isStudent? + this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")} + className="colorblue font-16 ml20 fr mt12"> + 查看详情 + :""} diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js index a2c19ecbd..b75598636 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js @@ -120,9 +120,17 @@ class GraduateTopicItem extends Component{ {discussMessage.selected_count} 已选 {discussMessage.confirmation_count} 已确认 - + { - isAdmin && this.editTopic(`${discussMessage.id}`)} style="blue" className="font-16">编辑 + isStudent? this.toDetailPage(`${discussMessage.id}`)} + className="font-16 mr20" >查看详情:"" + } + { + isAdmin? this.toDetailPage(`${discussMessage.id}`)} className="font-16 mr20" >查看详情:"" + } + + { + isAdmin && this.editTopic(`${discussMessage.id}`)} style="blue" className="font-16 ">编辑 } { isStudent && data.user_selected == true && discussMessage.user_topic_status==0 && @@ -136,6 +144,8 @@ class GraduateTopicItem extends Component{ 选题 } + +

    diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index ec1eb2fa3..be5e7f88d 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -97,8 +97,12 @@ class PollListItem extends Component{ {"提交剩余时间:"+formatDuring(t)} } + + { - isStudent ? + isStudent ? + + { item.current_status == 0 && "继续答题" } @@ -110,10 +114,13 @@ class PollListItem extends Component{ } :"" } + { isStudent ?canNotLink ?"": this.toDetailPage(`/courses/${coursesId}/polls/${item.id}/detail`)} >查看详情:""} + { IsAdmin && } diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index 7f56e47ba..88e60a98f 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -377,11 +377,6 @@ class ShixunhomeWorkItem extends Component{ 设置
    :""} - {this.props.isStudent===true?this.props.course_identity===5? - this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} - className="btn colorblue colorblue font-16 mr20 fr mt2">查看详情 - :"":"" - } {this.props.isStudent===true?this.props.course_identity===5?discussMessage&&discussMessage.shixun_status>1? discussMessage.time_status<5? @@ -398,6 +393,13 @@ class ShixunhomeWorkItem extends Component{ :"":"":"":"" } + + {this.props.isStudent===true?this.props.course_identity===5? + this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} + className="btn colorblue colorblue font-16 mr20 fr mt2">查看详情 + :"":"" + } +