diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 43e44c500..8bb95e330 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -49,20 +49,28 @@ class CoursesBanner extends Component { componentDidMount() { - this.updatabanner() + this.onloadupdatabanner() } - updatabanner=()=>{ - let courseId = this.props.match.params.coursesId; - let url = "/courses/" + courseId + "/top_banner.json" - axios.get(url).then((result) => { - if( result!=undefined){ - let data = result.data; - this.setState({ - coursedata: data - }) - } - }) - } + + onloadupdatabanner=()=>{ + this.updatabanner() + } + + updatabanner=()=>{ + let courseId = this.props.match.params.coursesId; + let url = "/courses/" + courseId + "/top_banner.json" + axios.get(url).then((result) => { + if( result!=undefined){ + let data = result.data; + this.setState({ + coursedata: data + }) + }else{ + this.onloadupdatabanner() + } + }) + } + showeditmenu = () => { this.setState({ show: true, diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index c842d02f2..3971cab0f 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -17,8 +17,6 @@ const CheckboxGroup = Checkbox.Group; const Search = Input.Search; const qs = require('qs'); - - class GraduationTaskssettinglist extends Component{ constructor(props){ @@ -1538,8 +1536,10 @@ class GraduationTaskssettinglist extends Component{
- {this.props.isAdmin()?{taskslistdata&&taskslistdata.work_count}个检索结果({taskslistdata&&taskslistdata.work_count} 学生) :""} - {this.props.isAdmin()?
+ {this.props.isAdmin()===true? + {taskslistdata&&taskslistdata.work_count} + 个检索结果({taskslistdata&&taskslistdata.work_count} 学生) :""} + {this.props.isAdmin()===true?

{order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序 @@ -1555,6 +1555,24 @@ class GraduationTaskssettinglist extends Component{

:""}
+ {this.props.isStudent()===true? +
+ + {taskslistdata&&taskslistdata.commit_count} + 已交 + + {taskslistdata&&taskslistdata.uncommit_count} + 未交 + + + {taskslistdata&&taskslistdata.left_time.status} : + + {taskslistdata&&taskslistdata.left_time.time} + + +
+ :""} +
{ @@ -1774,24 +1792,49 @@ class GraduationTaskssettinglist extends Component{
-
- {taskslistdata&&taskslistdata.work_count}个检索结果({taskslistdata&&taskslistdata.work_count} 学生) - -
-

- {order==="updated_at"?"时间":order==="work_score"?"成绩":order==="student_id"?"学号":""}排序

-
    -
  • this.funorder("updated_at")} className={order==="updated_at"?"none":""}>时间 -
  • -
  • this.funorder("work_score" )} className={order==="work_score"?"none":""}>成绩 -
  • -
  • this.funorder("student_id" )} className={order==="student_id"?"none":""}>学号 -
  • -
-
-
+ {this.props.isAdmin()===true? +
+ + {taskslistdata&&taskslistdata.work_count} + 个检索结果({taskslistdata&&taskslistdata.work_count} 学生) + +
+

+ {order==="updated_at"?"时间":order==="work_score"?"成绩":order==="student_id"?"学号":""}排序

+
    +
  • this.funorder("updated_at")} className={order==="updated_at"?"none":""}>时间 +
  • +
  • this.funorder("work_score" )} className={order==="work_score"?"none":""}>成绩 +
  • +
  • this.funorder("student_id" )} className={order==="student_id"?"none":""}>学号 +
  • +
+
+
+ :""} + + + {this.props.isStudent()===true? +
+ + {taskslistdata&&taskslistdata.commit_count} + 已交 + + {taskslistdata&&taskslistdata.uncommit_count} + 未交 + + + {taskslistdata&&taskslistdata.left_time.status} : + + {taskslistdata&&taskslistdata.left_time.time} + + +
+ :""} + +