diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js index 718b6de42..303d683ce 100644 --- a/public/react/src/modules/courses/boards/BoardsNew.js +++ b/public/react/src/modules/courses/boards/BoardsNew.js @@ -78,6 +78,7 @@ class BoardsNew extends Component{ if (data) { this.editTopic = data; this.props.form.setFieldsValue({ + sticky: !!data.sticky, content: data.content, subject: data.subject, select_board_id: data.board_id // TODO 没返回给前端 @@ -309,6 +310,14 @@ class BoardsNew extends Component{ label="标题" className="topicTitle " > + {getFieldDecorator('sticky', { + valuePropName: 'checked', + })( + 置顶 + )} {getFieldDecorator('subject', { rules: [{ required: true, message: '请输入标题', @@ -347,7 +356,7 @@ class BoardsNew extends Component{ )} - { isAdmin && @@ -355,7 +364,7 @@ class BoardsNew extends Component{ })( 置顶 )} - } + } */} {label} 不限 - { - options.length > 1 && - } +
+ { + options.length > 1 && + } +
) } diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index 3579f983b..26501fe99 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -945,11 +945,20 @@ a.white-btn.use_scope-btn:hover{ font-size: 12px !important; } /* md编辑器在form中时,使用这个样式,可以把错误信息绝对定位 */ +/* 去掉form下边距 */ +.mdInForm.ant-form-item { + margin-bottom: 0px; +} .mdInForm .has-error .ant-form-explain { position: absolute; margin-top: -2px; margin-left: -7px; } +/* !!!课堂下统一的form样式前缀 courseForm */ +.courseForm .ant-select-selection--single, .courseForm .ant-select-selection__rendered{ + height: 40px; + line-height: 40px; +} /*新建课堂*/ diff --git a/public/react/src/modules/courses/poll/PollDetailTabForth.js b/public/react/src/modules/courses/poll/PollDetailTabForth.js index 01366c2f9..3dff2bc87 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabForth.js +++ b/public/react/src/modules/courses/poll/PollDetailTabForth.js @@ -1,7 +1,7 @@ import React,{ Component } from "react"; import {Form,Checkbox,DatePicker,Button,Input,Select,Tooltip} from "antd"; -import { handleDateString } from 'educoder'; +import { handleDateString,ConditionToolTip } from 'educoder'; import PollDetailTabForthRules from './PollDetailTabForthRules' import HomeworkModal from "../coursesPublic/HomeworkModal"; @@ -585,48 +585,56 @@ class PollDetailTabForth extends Component{
发布时间: -
- -

- { - unit_p_tip && unit_p_tip != "" ? { unit_p_tip }:"" - } -

-
+
+ + + + + +

+ { + unit_p_tip && unit_p_tip != "" ? { unit_p_tip }:"" + } +

+
(学生收到问卷的时间)
截止时间:
- - + + + + + +

{ unit_e_tip && unit_e_tip != "" ? { unit_e_tip }:"" diff --git a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js index 4193cdc62..2f3621844 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js +++ b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js @@ -390,20 +390,24 @@ class PollDetailTabForthRules extends Component{

- this.changeRulePublishTime(e, date,r)} - showTime={{ format: 'HH:mm' }} - format="YYYY-MM-DD HH:mm" - disabledTime={disabledDateTime} - disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.p_timeflag == true ? true : !flagPageEdit} - style={{"height":"42px",width:'100%'}} - > + + + this.changeRulePublishTime(e, date,r)} + showTime={{ format: 'HH:mm' }} + format="YYYY-MM-DD HH:mm" + disabledTime={disabledDateTime} + disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.p_timeflag == true ? true : !flagPageEdit} + style={{"height":"42px",width:'100%'}} + > + +

{ rule.publish_flag && rule.publish_flag!=""?{rule.publish_flag}:"" @@ -411,20 +415,24 @@ class PollDetailTabForthRules extends Component{

- this.changeRuleEndTime(e, date,r)} - showTime={{ format: 'HH:mm' }} - format="YYYY-MM-DD HH:mm" - disabledTime={disabledDateTime} - disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.e_timeflag == true ? true : !flagPageEdit} - style={{"height":"42px"}} - > + + + this.changeRuleEndTime(e, date,r)} + showTime={{ format: 'HH:mm' }} + format="YYYY-MM-DD HH:mm" + disabledTime={disabledDateTime} + disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.e_timeflag == true ? true : !flagPageEdit} + style={{"height":"42px"}} + > + +

{ rule.end_flag && rule.end_flag!=""?{rule.end_flag}:"" diff --git a/public/react/src/modules/courses/poll/PollDetailTabThird.js b/public/react/src/modules/courses/poll/PollDetailTabThird.js index 5d9a01fb8..c3994c7c0 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabThird.js +++ b/public/react/src/modules/courses/poll/PollDetailTabThird.js @@ -70,9 +70,9 @@ class PollDetailTabThird extends Component{

{item.question.question_number}、{map[item.question.question_type]} - { item.question.is_necessary==1 ? 必答:"" } + { item.question.is_necessary==1 ? 必答:选答 } { item.question.question_type == 2 ? - + { item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : "可选"+item.question.min_choices+"-"+item.question.max_choices+"项" diff --git a/public/react/src/modules/courses/poll/PollInfo.js b/public/react/src/modules/courses/poll/PollInfo.js index 7177cb6b9..8256e3710 100644 --- a/public/react/src/modules/courses/poll/PollInfo.js +++ b/public/react/src/modules/courses/poll/PollInfo.js @@ -185,9 +185,11 @@ class PollInfo extends Component{ flag=answers.indexOf(a_id) > -1?true:false; answers= type == 1 ? answers[0] : answers; }else{ - flag=answers==a_id?true:false; + flag = answers==a_id?true:false; + } + if(answers && (answers.length>0 || answers !="")){ + this.postAnswer(q_id,answers,flag ? inputs.text : "",key); } - this.postAnswer(q_id,answers,flag ? inputs.text : "",key); } //提交主观题 @@ -379,13 +381,21 @@ class PollInfo extends Component{

{item.question.question_number}、{map[item.question.question_type]} - { item.question.is_necessary==1 ? 必答:"" } + { item.question.is_necessary==1 ? 必答:选答 } + { item.question.question_type == 2 ? + + { + item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : + "可选"+item.question.min_choices+"-"+item.question.max_choices+"项" + } + :"" + }
  • {item.question.question_title}
  • { //单选 item.question.question_type==1 && - + { item.question.answers && item.question.answers.map((i,k)=>{ return( @@ -422,7 +432,12 @@ class PollInfo extends Component{ { //多选 item.question.question_type==2 && - this.ChangeOptionMuntil(value,item.question.id,key)} disabled={isAdmin?true:false} defaultValue={item.question.poll_answer_ids} className="answerList" name={key}> + this.ChangeOptionMuntil(value,item.question.id,key)} + disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1)?true:false} + defaultValue={item.question.poll_answer_ids} + className="answerList" + name={key}> { item.question.answers && item.question.answers.map((i,k)=>{ return( @@ -466,14 +481,13 @@ class PollInfo extends Component{ { j.id == item.question.id ? - + : "" } ) }) } -
    } diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index 3ebb6eb73..8c1d814ed 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -45,6 +45,10 @@ class PollListItem extends Component{ item.lock_status === 0 ? :"" } + { + isStudent && ((item.polls_status == 1 && (item.current_status ==0 ||item.current_status ==2)) || (item.polls_status==3 && item.current_status==2)) ? + 未提交:"" + }

    { diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index a39ae5bf7..fa2ed08b4 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -779,13 +779,13 @@ class PollNew extends Component { } } - if (maxtie < 2) { + if (maxtie < 3) { if (object.question.question_type === 1) { - this.props.showNotification(`选项不能少于2个!`); + this.props.showNotification(`选项不能少于3个!`); return } else if (object.question.question_type === 2) { - this.props.showNotification(`选项不能少于2个!`); + this.props.showNotification(`选项不能少于3个!`); return } @@ -1259,12 +1259,12 @@ class PollNew extends Component { } } - if (maxtie < 2) { + if (maxtie < 3) { if (object.question.question_type === 1) { - this.props.showNotification('选项不能少于2个!'); + this.props.showNotification('选项不能少于3个!'); return } else if (object.question.question_type === 2) { - this.props.showNotification('选项不能少于2个!'); + this.props.showNotification('选项不能少于3个!'); return } @@ -2489,7 +2489,7 @@ class PollNew extends Component { }

    -

    {item.question.question_title}

    +

    {item.question.question_title}

    {/*
    {item.question.question_title}
    */} {item.question.question_type === 1 ? ( @@ -2500,7 +2500,7 @@ class PollNew extends Component { {/*
    {items.answer_text}
    */} {/*
    {items.answer_text}
    */} - {items.answer_text} + {items.answer_text}
    ) @@ -2512,7 +2512,7 @@ class PollNew extends Component { return (
    - {items.answer_text} + {items.answer_text} {/* { var str = txt; if(str.length>25){ @@ -81,7 +80,7 @@ class TraineetraininginformationModal extends Component { } render() { var columns; - if(this.state.boolgalist&&this.state.boolgalist === true) { + if(this.props.boolgalist&&this.props.boolgalist === true) { columns = [ { title: '关卡', diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 10e4e4641..9a1de2846 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -33,8 +33,10 @@ if (!window['indexHOCLoaded']) { $('head').append($('') .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?1525440977`)); - $('head').append($('') - .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440977`)); + // index.html有加载 + // $('head').append($('') + // .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440977`)); + // $('head').append($('') // .attr('href', `${_url_origin}/stylesheets/educoder/css_min_all.css?1525440977`)); diff --git a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js index e86923cbc..e70454056 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js +++ b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js @@ -302,8 +302,8 @@ export default class TPMMDEditor extends Component {
    - {noStorage == true ? '' :

    } - {noStorage == true ? '' :

    } + {noStorage == true ? ' ' :

    } + {noStorage == true ? ' ' :

    }
    )