Merge branches 'dev_aliyun' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into develop

dev_home
杨树明 5 years ago
commit 00877bbd52

@ -532,7 +532,7 @@ class HomeworkCommonsController < ApplicationController
# 如果该发布规则 没有已发布的分班则需判断发布时间 # 如果该发布规则 没有已发布的分班则需判断发布时间
tip_exception("发布时间不能早于等于当前时间") if setting[:publish_time] <= strf_time(Time.now) && group_settings.group_published.count == 0 tip_exception("发布时间不能早于等于当前时间") if setting[:publish_time] <= strf_time(Time.now) && group_settings.group_published.count == 0
tip_exception("截止时间不能早于等于当前时间") if setting[:end_time] <= strf_time(Time.now) tip_exception("截止时间不能早于等于当前时间") if setting[:end_time] <= strf_time(Time.now) && group_settings.none_end.count > 0
tip_exception("截止时间不能早于发布时间") if setting[:publish_time] > setting[:end_time] tip_exception("截止时间不能早于发布时间") if setting[:publish_time] > setting[:end_time]
tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")}") if tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")}") if
@course.end_date.present? && setting[:end_time] > strf_time(@course.end_date.end_of_day) @course.end_date.present? && setting[:end_time] > strf_time(@course.end_date.end_of_day)

@ -713,6 +713,7 @@ class Exercisesetting extends Component{
course_group={course_group} course_group={course_group}
flagPageEdit={flagPageEdit} flagPageEdit={flagPageEdit}
rulesCheckInfo={(info)=>this.rulesCheckInfo(info)} rulesCheckInfo={(info)=>this.rulesCheckInfo(info)}
Commonheadofthetestpaper
></PollDetailTabForthRules> ></PollDetailTabForthRules>
} }
</div> </div>

@ -475,7 +475,7 @@ class Testpapersettinghomepage extends Component{
} }
{ {
parseInt(tab[0])==3 ? <WrappedExercisesetting {...this.props} {...this.state} triggerRef={this.bindRef}></WrappedExercisesetting>:"" parseInt(tab[0])==3 ? <WrappedExercisesetting Commonheadofthetestpaper={this.state.Commonheadofthetestpaper} {...this.props} {...this.state} triggerRef={this.bindRef}></WrappedExercisesetting>:""
} }
</div> </div>
</div> </div>
@ -483,4 +483,4 @@ class Testpapersettinghomepage extends Component{
} }
} }
export default Testpapersettinghomepage; export default Testpapersettinghomepage;

@ -478,7 +478,24 @@ class PollDetailTabForthRules extends Component{
{rule.p_timeflag===undefined?r > 0&&rule.publish_time===null?<Tooltip title="删除"> {rule.p_timeflag===undefined?r > 0&&rule.publish_time===null?<Tooltip title="删除">
<a className="mr20" onClick={()=>this.removeRules(`${r}`)}><i className="iconfont icon-shanchu color-grey-9 font-18"></i></a> <a className="mr20" onClick={()=>this.removeRules(`${r}`)}><i className="iconfont icon-shanchu color-grey-9 font-18"></i></a>
</Tooltip> </Tooltip>
:"": :(
this.props.Commonheadofthetestpaper?
(this.props.Commonheadofthetestpaper.exercise_status===1&&r > 0?
<Tooltip title="删除">
<a className="mr20" onClick={()=>this.removeRules(`${r}`)}><i className="iconfont icon-shanchu color-grey-9 font-18"></i></a>
</Tooltip>
:"")
:this.props.teacherdatapage?
(
this.props.teacherdatapage.homework_status[0]==="未发布"&&r > 0?
<Tooltip title="删除">
<a className="mr20" onClick={()=>this.removeRules(`${r}`)}><i className="iconfont icon-shanchu color-grey-9 font-18"></i></a>
</Tooltip>
:""
):
""
):
r > 0 && rule.p_timeflag == false ? r > 0 && rule.p_timeflag == false ?
<Tooltip title="删除"> <Tooltip title="删除">
<a className="mr20" onClick={()=>this.removeRules(`${r}`)}><i className="iconfont icon-shanchu color-grey-9 font-18"></i></a> <a className="mr20" onClick={()=>this.removeRules(`${r}`)}><i className="iconfont icon-shanchu color-grey-9 font-18"></i></a>

@ -354,7 +354,7 @@ class ShixunHomeworkPage extends Component {
{parseInt(tab) === 0 ?<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>:""} {parseInt(tab) === 0 ?<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>:""}
{parseInt(tab) === 1 ?<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)} Showupdateinstructionsboolfalse={(i)=>this.Showupdateinstructionsboolfalse(i)}></Workquestionandanswer>:""} {parseInt(tab) === 1 ?<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)} Showupdateinstructionsboolfalse={(i)=>this.Showupdateinstructionsboolfalse(i)}></Workquestionandanswer>:""}
{parseInt(tab) === 2 ?<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>:""} {parseInt(tab) === 2 ?<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>:""}
{parseInt(tab) === 3 ?<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""} {parseInt(tab) === 3 ?<Trainingjobsetting teacherdatapage={this.state.teacherdatapage} triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""}
</Spin> </Spin>
</div> </div>
</div> </div>

@ -2503,6 +2503,7 @@ class Trainingjobsetting extends Component {
<PollDetailTabForthRules <PollDetailTabForthRules
{...this.props} {...this.props}
{...this.state} {...this.state}
teacherdatapage={this.props.teacherdatapage}
rules={rules} rules={rules}
moduleName={"作业"} moduleName={"作业"}
course_group={rulest} course_group={rulest}

Loading…
Cancel
Save