Merge branch 'dev_aliyun' into dev_cs_new

dev_cs_new
caishi 5 years ago
commit c61d9e81b1

@ -328,10 +328,13 @@ class HomeworksService
work.late_penalty = work.work_status == 2 ? homework.late_penalty : 0 work.late_penalty = work.work_status == 2 ? homework.late_penalty : 0
work.commit_time = myshixun.created_at > setting_time.publish_time ? setting_time.publish_time : myshixun.created_at work.commit_time = myshixun.created_at > setting_time.publish_time ? setting_time.publish_time : myshixun.created_at
work.myshixun_id = myshixun.id work.myshixun_id = myshixun.id
work.update_time = if myshixun_endtime.present? work.update_time = if myshixun_endtime.present? && myshixun_endtime <= homework_end_or_late_time
myshixun_endtime > homework_end_or_late_time ? homework_end_or_late_time : myshixun_endtime myshixun_endtime
elsif myshixun.updated_at > homework_end_or_late_time
last_pass_time = games.select{|game| game.status == 2 && game.end_time < homework_end_or_late_time}.map(&:end_time).max
last_pass_time.present? ? last_pass_time : myshixun.created_at
else else
myshixun.updated_at > homework_end_or_late_time ? homework_end_or_late_time : myshixun.updated_at myshixun.updated_at
end end
work.final_score = final_score work.final_score = final_score

@ -461,11 +461,7 @@ class Selectsetting extends Component{
</ul> </ul>
<style>{`
<div className="pl20 pr20"
style={{"Height":"204px"}}>
<style>{`
.color-grey-9a{color: #9A9A9A !important;} .color-grey-9a{color: #9A9A9A !important;}
.datastyle{ .datastyle{
width: 120px; width: 120px;
@ -480,7 +476,12 @@ class Selectsetting extends Component{
display: inline-block; display: inline-block;
float: left; float: left;
} }
.settingbox{
max-height: 123px;
overflow-y: auto;
}
`}</style> `}</style>
<div className="pl20 pr20 settingbox">
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE"> <div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE">
<li className="fl" style={{width: '241px'}}> <li className="fl" style={{width: '241px'}}>
<span className={"isabox"} title={datalist&&datalist.title}> {datalist&&datalist.title} </span> <span className={"isabox"} title={datalist&&datalist.title}> {datalist&&datalist.title} </span>
@ -632,7 +633,7 @@ class Selectsetting extends Component{
{this.state.newfileListtypes===true?<p className={"color-red"}>请先上传资源</p>:""} {this.state.newfileListtypes===true?<p className={"color-red"}>请先上传资源</p>:""}
<p className={"winth540"}> <p className={this.state.fileListtype===true?"mt15":""}>
<style>{` <style>{`
.ant-checkbox-wrapper{ .ant-checkbox-wrapper{
margin-left:0px !important; margin-left:0px !important;
@ -640,19 +641,19 @@ class Selectsetting extends Component{
} }
`}</style> `}</style>
<div className={this.state.fileListtype===true?"mt30":""}> {/*<div className={this.state.fileListtype===true?"mt30":""}>*/}
<Checkbox {/*<Checkbox*/}
checked={is_public} {/*checked={is_public}*/}
onChange={this.onChangepublics}> {/*onChange={this.onChangepublics}>*/}
<span className={"font-14"}>勾选后所有用户可见否则仅课堂成员可见</span> {/*<span className={"font-14"}>勾选后所有用户可见,否则仅课堂成员可见</span>*/}
</Checkbox> {/*</Checkbox>*/}
</div> {/*</div>*/}
{/*{this.props.has_course_groups&&this.props.has_course_groups===true?:""}*/} {/*{this.props.has_course_groups&&this.props.has_course_groups===true?:""}*/}
{/*{this.state.course_groupss&&this.state.course_groupss.length>0?<Checkbox*/} {this.state.course_groupss&&this.state.course_groupss.length>0?<Checkbox
{/*checked={unified_setting}*/} checked={unified_setting}
{/*onChange={this.onChangesettings}>*/} onChange={this.onChangesettings}>
{/*<span>统一设置</span><span className={"font-14 color-grey-9"}>(选中则所有分班使用相同的发布设置,否则各个单独设置)</span>*/} <span>统一设置</span><span className={"font-14 color-grey-9"}>(使)</span>
{/*</Checkbox>:""}*/} </Checkbox>:""}
<style> <style>
{` {`
@ -744,6 +745,7 @@ class Selectsetting extends Component{
{/*{this.state.course_group_idtypes===true?<p className={"color-red"}>请选择分班</p>:""}*/} {/*{this.state.course_group_idtypes===true?<p className={"color-red"}>请选择分班</p>:""}*/}
{/*{course_group_publish_timestype===true?<p className={"color-red mt10"}>请填写完整</p>:""}*/} {/*{course_group_publish_timestype===true?<p className={"color-red mt10"}>请填写完整</p>:""}*/}
<textarea placeholder="请输入资源描述最大限制100个字符" className={"mt10"} value={description} onInput={this.settextarea} style={{ <textarea placeholder="请输入资源描述最大限制100个字符" className={"mt10"} value={description} onInput={this.settextarea} style={{
width: '100%', width: '100%',
height:'120px', height:'120px',

@ -469,7 +469,7 @@ class Sendresource extends Component{
{newfileListtype===true&&this.state.fileListtype===false?<p className={"color-red"}>请先上传资源</p>:""} {newfileListtype===true&&this.state.fileListtype===false?<p className={"color-red"}>请先上传资源</p>:""}
<p className={"winth540"}> <p className={this.state.fileListtype===true?"mt25":""}>
<style>{` <style>{`
.ant-checkbox-wrapper{ .ant-checkbox-wrapper{
margin-left:0px !important; margin-left:0px !important;
@ -477,13 +477,13 @@ class Sendresource extends Component{
} }
`}</style> `}</style>
<div className={this.state.fileListtype===true?"mt30":""}></div><Checkbox checked={is_public} onChange={this.onChangepublic}> {/*<div className={this.state.fileListtype===true?"mt30":""}></div><Checkbox checked={is_public} onChange={this.onChangepublic}>*/}
<span className={"font-14"}>勾选后所有用户可见否则仅课堂成员可见</span> {/*<span className={"font-14"}>勾选后所有用户可见,否则仅课堂成员可见</span>*/}
</Checkbox> {/*</Checkbox>*/}
{/*{this.state.course_groups_count&&this.state.course_groups_count>0?<Checkbox checked={is_unified_setting} onChange={this.onChangesetting}>*/} {this.state.course_groups_count&&this.state.course_groups_count>0?<Checkbox checked={is_unified_setting} onChange={this.onChangesetting}>
{/*<span>统一设置</span><span className={"font-14 color-grey-9"}>(选中则所有分班使用相同的发布设置,否则各个单独设置)</span>*/} <span>统一设置</span><span className={"font-14 color-grey-9"}>(使)</span>
{/*</Checkbox>:""}*/} </Checkbox>:""}
<style>{` <style>{`
.Selectleft20{ .Selectleft20{
margin-left: 20px !important; margin-left: 20px !important;

Loading…
Cancel
Save