diff --git a/public/react/src/modules/courses/poll/PollDetailIndex.js b/public/react/src/modules/courses/poll/PollDetailIndex.js
index 79eecd694..9cbeef706 100644
--- a/public/react/src/modules/courses/poll/PollDetailIndex.js
+++ b/public/react/src/modules/courses/poll/PollDetailIndex.js
@@ -1,204 +1,204 @@
-import React,{ Component } from "react";
-import {Menu} from "antd";
-
-
-import CoursesListType from '../coursesPublic/CoursesListType';
-import { WordsBtn } from 'educoder'
-import PollTabFirst from './PollDetailTabFirst'
-import PollTabSecond from './PollDetailTabSecond'
-import PollTabThird from './PollDetailTabThird'
-import PollTabForth from './PollDetailTabForth'
-
-import DownloadMessage from '../../modals/DownloadMessage';
-
-import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish'
-import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd'
-import CancelPublish from './pollPublicBtn/CancelPublish'
-
-import '../css/members.css'
-import '../css/busyWork.css'
-
-import axios from 'axios'
-
-const map={1:"未发布",2:"提交中",3:"已截止"}
-class PollDetailIndex extends Component{
- constructor(props){
- super(props);
- this.state={
- tab:["0"],
- pollDetail:undefined,
- user_permission:undefined
- }
- }
-
- getPollInfo=()=>{
- console.log(this.props);
- let pollId=this.props.match.params.pollId;
- let url=`/polls/${pollId}/common_header.json`
- axios.get(url).then((result)=>{
- if(result.status==200){
- this.setState({
- pollDetail:result.data,
- user_permission:result.data.user_permission
- })
- }
- }).catch((error)=>{
- console.log(error);
- })
- }
-
- componentDidMount(){
- const query =this.props.location.search;
- if(query.indexOf("?")!=-1){
- const type = query.split('?');
- let name = type[1].split("tab=");
- name = String(name).split(",");
- name = decodeURI(name[1]);
- if(name!=undefined && name!="" && name!="undefined"){
- this.setState({
- tab:[name]
- })
- }
- }
-
- this.getPollInfo();
- }
-
- //切换tab
- changeTab=(e)=>{
- this.setState({
- tab:e.key
- })
- }
-
- confirmysl(url){
- this.refs.DownloadMessage.confirmysl(url);
- }
-
- render(){
- let {tab,pollDetail,user_permission}=this.state;
-
- const isAdmin =this.props.isAdmin();
- const isStudent = this.props.isStudent();
- return(
-
-
-
-
- {this.props.coursedata.name}
- >
- 问卷
- >
- 问卷详情
-
-
- {pollDetail && pollDetail.polls_name}
-
-
-
- this.props.history.goBack()}>返回
-
-
-
-
-
-
- {
- isAdmin &&
-
- 编辑问卷
- {/* 立即发布 */}
- {
- user_permission && user_permission.poll_unpublish_count > 0 ?
-
-
-
- :""
- }
- {/* 立即截止、撤销发布 */}
- {
- user_permission && user_permission.poll_publish_count > 0 ?
-
-
-
- :""
- }
- {/* {
- user_permission && user_permission.poll_publish_count>0 ?
-
-
-
- :""
- } */}
- this.confirmysl("/polls/"+this.props.match.params.pollId+"/commit_result.xlsx")} href="javascript:void(0);">导出统计
-
- }
- {
- isStudent &&
-
- {
- user_permission && user_permission.current_status!=3 ?
-
- { user_permission && user_permission.current_status ==0 ? "继续答题" : user_permission.current_status == 1 ? "查看答题" : "开始答题" }
-
- :""
- }
-
- }
-
-
-
- {
- // 答题列表
- parseInt(tab[0])==0 &&
- }
- {
- // 统计结果
- parseInt(tab[0])==1 &&
- }
-
- {
- //问卷预览
- parseInt(tab[0])==2 &&
- }
- {
- //设置
- parseInt(tab[0])==3 &&
- }
-
-
-
-
- )
- }
-}
+import React,{ Component } from "react";
+import {Menu} from "antd";
+
+
+import CoursesListType from '../coursesPublic/CoursesListType';
+import { WordsBtn } from 'educoder'
+import PollTabFirst from './PollDetailTabFirst'
+import PollTabSecond from './PollDetailTabSecond'
+import PollTabThird from './PollDetailTabThird'
+import PollTabForth from './PollDetailTabForth'
+
+import DownloadMessage from '../../modals/DownloadMessage';
+
+import ImmediatelyPublish from './pollPublicBtn/ImmediatelyPublish'
+import ImmediatelyEnd from './pollPublicBtn/ImmediatelyEnd'
+import CancelPublish from './pollPublicBtn/CancelPublish'
+
+import '../css/members.css'
+import '../css/busyWork.css'
+
+import axios from 'axios'
+
+const map={1:"未发布",2:"提交中",3:"已截止",4:"已结束"}
+class PollDetailIndex extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ tab:["0"],
+ pollDetail:undefined,
+ user_permission:undefined
+ }
+ }
+
+ getPollInfo=()=>{
+ console.log(this.props);
+ let pollId=this.props.match.params.pollId;
+ let url=`/polls/${pollId}/common_header.json`
+ axios.get(url).then((result)=>{
+ if(result.status==200){
+ this.setState({
+ pollDetail:result.data,
+ user_permission:result.data.user_permission
+ })
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+ }
+
+ componentDidMount(){
+ const query =this.props.location.search;
+ if(query.indexOf("?")!=-1){
+ const type = query.split('?');
+ let name = type[1].split("tab=");
+ name = String(name).split(",");
+ name = decodeURI(name[1]);
+ if(name!=undefined && name!="" && name!="undefined"){
+ this.setState({
+ tab:[name]
+ })
+ }
+ }
+
+ this.getPollInfo();
+ }
+
+ //切换tab
+ changeTab=(e)=>{
+ this.setState({
+ tab:e.key
+ })
+ }
+
+ confirmysl(url){
+ this.refs.DownloadMessage.confirmysl(url);
+ }
+
+ render(){
+ let {tab,pollDetail,user_permission}=this.state;
+
+ const isAdmin =this.props.isAdmin();
+ const isStudent = this.props.isStudent();
+ return(
+
+
+
+
+ {this.props.coursedata.name}
+ >
+ 问卷
+ >
+ 问卷详情
+
+
+ {pollDetail && pollDetail.polls_name}
+
+
+
+ this.props.history.goBack()}>返回
+
+
+
+
+
+
+ {
+ isAdmin &&
+
+ 编辑问卷
+ {/* 立即发布 */}
+ {
+ user_permission && user_permission.poll_unpublish_count > 0 ?
+
+
+
+ :""
+ }
+ {/* 立即截止、撤销发布 */}
+ {
+ user_permission && user_permission.poll_publish_count > 0 ?
+
+
+
+ :""
+ }
+ {/* {
+ user_permission && user_permission.poll_publish_count>0 ?
+
+
+
+ :""
+ } */}
+ this.confirmysl("/polls/"+this.props.match.params.pollId+"/commit_result.xlsx")} href="javascript:void(0);">导出统计
+
+ }
+ {
+ isStudent &&
+
+ {
+ user_permission && user_permission.current_status!=3 ?
+
+ { user_permission && user_permission.current_status ==0 ? "继续答题" : user_permission.current_status == 1 ? "查看答题" : "开始答题" }
+
+ :""
+ }
+
+ }
+
+
+
+ {
+ // 答题列表
+ parseInt(tab[0])==0 &&
+ }
+ {
+ // 统计结果
+ parseInt(tab[0])==1 &&
+ }
+
+ {
+ //问卷预览
+ parseInt(tab[0])==2 &&
+ }
+ {
+ //设置
+ parseInt(tab[0])==3 &&
+ }
+
+
+
+
+ )
+ }
+}
export default PollDetailIndex
\ No newline at end of file
diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js
index 898b296f0..e456e2ed9 100644
--- a/public/react/src/modules/courses/poll/PollListItem.js
+++ b/public/react/src/modules/courses/poll/PollListItem.js
@@ -1,13 +1,13 @@
import React,{ Component } from "react";
import Tooltip from 'material-ui/Tooltip';
-import {Link} from 'react-router-dom'
-import moment from 'moment'
+import {Link} from 'react-router-dom';
+import moment from 'moment';
import CoursesListType from '../coursesPublic/CoursesListType';
-import { WordsBtn,formatDuring } from 'educoder'
-import '../css/members.css'
-import '../css/busyWork.css'
+import { WordsBtn,formatDuring } from 'educoder';
+import '../css/members.css';
+import '../css/busyWork.css';
-const polls_status={1:"未发布",2:"提交中",3:"已截止"}
+const polls_status={1:"未发布",2:"提交中",3:"已截止",4:"已结束"}
const dataformat="YYYY-MM-DD HH:mm";
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index 3e2219b40..822d05e09 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -674,7 +674,8 @@ submittojoinclass=(value)=>{
{/*教学案例*/}
在线竞赛
-
+ 教学案例
+ 众包社区
交流问答