Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_hjm_a
cxt 5 years ago
commit a60c14511f

@ -1,6 +1,7 @@
class Ecs::CourseAchievementMethodsController < Ecs::CourseBaseController
def show
include_associations = { ec_course_achievement_methods: [:ec_course_evaluation, :ec_course_evaluation_subitems] }
include_associations = { ec_course_achievement_methods:
[:ec_course_evaluation, ec_achievement_evaluation_relates: :ec_course_evaluation_subitem] }
@course_targets = current_course.ec_course_targets.includes(include_associations)
end

@ -20,8 +20,8 @@ class Ecs::CourseTargetsController < Ecs::CourseBaseController
def with_achievement_methods
@course_targets = current_course.ec_course_targets
.includes(:ec_graduation_subitems,
ec_course_achievement_methods: [:ec_course_evaluation, :ec_course_evaluation_subitems])
.includes(ec_course_achievement_methods:
[:ec_course_evaluation, ec_achievement_evaluation_relates: :ec_course_evaluation_subitem])
end
private

@ -2,10 +2,10 @@ class Wechats::JsSdkSignaturesController < ApplicationController
def create
timestamp = Time.now.to_i
noncestr = ('A'..'z').to_a.sample(8).join
signature = Util::Wechat.js_sdk_signature(params[:url], noncestr, timestamp)
signature = Wechat::OfficialAccount.js_sdk_signature(params[:url], noncestr, timestamp)
render_ok(appid: Util::Wechat.appid, timestamp: timestamp, noncestr: noncestr, signature: signature)
rescue Util::WechatStore::Error => ex
render_ok(appid: Wechat::OfficialAccount.appid, timestamp: timestamp, noncestr: noncestr, signature: signature)
rescue Wechat::Error => ex
render_error(ex.message)
end
end

@ -0,0 +1,2 @@
module Wechat
end

@ -1,8 +1,6 @@
class Util::WechatStore
class Wechat::Client
BASE_SITE = 'https://api.weixin.qq.com'.freeze
Error = Class.new(StandardError)
attr_reader :appid, :secret
def initialize(appid, secret)
@ -60,11 +58,11 @@ class Util::WechatStore
Rails.logger.error("[wechat] response:#{response.status} #{result.inspect}")
if response.status != 200
raise Error, result.inspect
raise Wechat::Error.parse(result)
end
if result['errcode'].present? && result['errcode'].to_i.nonzero?
raise Error, result.inspect
raise Wechat::Error.parse(result)
end
result

@ -0,0 +1,14 @@
class Wechat::Error < StandardError
attr_reader :code
def initialize(code, message)
super message
@code = code
end
class << self
def parse(result)
new(result['errcode'], result['errmsg'])
end
end
end

@ -1,8 +1,4 @@
module Util::Wechat
BASE_SITE = 'https://api.weixin.qq.com'.freeze
Error = Class.new(StandardError)
class Wechat::OfficialAccount
class << self
attr_accessor :appid, :secret
@ -13,15 +9,15 @@ module Util::Wechat
end
def access_token
wechat_store.access_token
client.access_token
end
def jsapi_ticket
wechat_store.jsapi_ticket
client.jsapi_ticket
end
def wechat_store
@_wechat_store ||= ::Util::WechatStore.new(appid, secret)
def client
@_client ||= Wechat::Client.new(appid, secret)
end
end
end

@ -20,10 +20,26 @@ class CreateDiffRecordService < ApplicationService
def diff_content
content = ''
arr = []
index = 0
fragment_size = 1
Diffy::Diff.new(before, after).each do |line|
next unless line =~ /^[\+-]/
unless line =~ /^[\+-]/
if arr.empty? && index < fragment_size
content += line
index += 1
else
index = 0
arr << line
arr.shift if arr.size > fragment_size
end
next
end
content += arr.join('') if arr.present?
content += line
arr.clear
end
content
end

@ -49,14 +49,14 @@ class Ecs::CreateCourseAchievementMethodsService < ApplicationService
create_data = new_data - old_data
# 生成需要创建关系的 subitem id 数据
create_attributes = create_data.map { |arr| { ec_course_evaluation_subitem_id: arr[0], position: arr[1] } }
create_attributes = create_data.map { |arr| { ec_course_target_id: course_target.id, ec_course_evaluation_subitem_id: arr[0], position: arr[1] } }
# 处理需要更新或者删除的记录
exists_attributes = relates.map do |relate|
if destroy_data.include?([relate.ec_course_evaluation_subitem_id, relate.position])
{ id: relate.id, _destroy: true }
else
relate.as_json(only: %i[id ec_course_evaluation_subitem_id ec_course_achievement_method_id position])
relate.as_json(only: %i[id ec_course_target_id ec_course_evaluation_subitem_id ec_course_achievement_method_id position])
end
end

@ -7,5 +7,3 @@ end
json.course_evaluation_subitems ec_course_achievement_method.ec_course_evaluation_subitems,
partial: 'ecs/shared/ec_course_evaluation_subitem', as: :ec_course_evaluation_subitem
json.course_evaluation_relates ec_course_achievement_method.ec_course_evaluation.evaluation_relates

@ -1,3 +1,32 @@
json.course_targets @course_targets,
partial: 'ecs/course_targets/shared/ec_course_target_with_achievement_methods',
as: :ec_course_target
json.course_targets do
json.array! @course_targets do |course_target|
json.extract! course_target, :id, :position, :content
json.course_achievement_methods do
json.array! course_target.ec_course_achievement_methods do |achievement_method|
evaluation = achievement_method.ec_course_evaluation
json.extract! achievement_method, :id, :score, :percentage
json.course_evaluation do
json.partial! 'ecs/course_evaluations/shared/ec_course_evaluation_only', ec_course_evaluation: evaluation
end
json.course_evaluation_relates do
json.array! achievement_method.ec_achievement_evaluation_relates do |relate|
json.extract! relate, :id, :position, :ec_course_evaluation_subitem_id
subitem = relate.ec_course_evaluation_subitem
if evaluation.is_course_type?
json.name subitem&.name
else
json.name subitem&.name ? "#{evaluation.name}#{relate.position}:#{subitem&.name}" : "#{evaluation.name}#{relate.position}"
end
end
end
end
end
end
end

@ -1,2 +1,29 @@
json.course_targets do
json.array! @course_targets do |course_target|
json.extract! course_target, :id, :position, :content
json.course_targets @course_targets, partial: 'ecs/course_targets/shared/ec_course_target_with_achievement_methods', as: :ec_course_target
json.course_achievement_methods do
json.array! course_target.ec_course_achievement_methods do |achievement_method|
evaluation = achievement_method.ec_course_evaluation
json.extract! achievement_method, :id, :score, :percentage
json.course_evaluation do
json.partial! 'ecs/course_evaluations/shared/ec_course_evaluation_only', ec_course_evaluation: evaluation
end
json.course_evaluation_relates do
json.array! achievement_method.ec_achievement_evaluation_relates do |relate|
json.extract! relate, :id, :position, :ec_course_evaluation_subitem_id
subitem = relate.ec_course_evaluation_subitem
if evaluation.is_course_type?
json.name subitem&.name
else
json.name subitem&.name ? "#{evaluation.name}#{relate.position}:#{subitem&.name}" : "#{evaluation.name}#{relate.position}"
end
end
end
end
end
end
end

@ -12,5 +12,5 @@ rescue => ex
wechat_config = {}
end
Util::Wechat.appid = wechat_config['appid']
Util::Wechat.secret = wechat_config['secret']
Wechat::OfficialAccount.appid = wechat_config['appid']
Wechat::OfficialAccount.secret = wechat_config['secret']

@ -55,7 +55,6 @@ class CoursesBanner extends Component {
}
}
componentDidMount() {
this.onloadupdatabanner()
on('updatabanner', this.updatabanner)
axios.interceptors.response.use((response) => {
@ -69,9 +68,17 @@ class CoursesBanner extends Component {
}
return response;
}, (error) => {
});
}
componentDidUpdate(prevProps) {
if(prevProps.user!=this.props.user){
if(this.props.match.path==="/courses/:coursesId"){
if(this.props.user!=undefined){
this.props.history.push(this.props.user.first_category_url)
}
}
}
}
componentWillUnmount() {
off('updatabanner', this.updatabanner)
}

@ -57,6 +57,7 @@ class Coursesleftnav extends Component{
positiontype:undefined,
toopvisible:false,
toopvisibleindex:undefined,
toopvisibleindexs:undefined,
sandiantypes:undefined,
antIcon:false,
chapterupdate:false,
@ -314,7 +315,11 @@ class Coursesleftnav extends Component{
twosandianshow=(e,key,type)=>{
// console.log("twosandianshow");
// console.log(key);
// console.log(type);
this.setState({
toopvisibleindexs:key,
twosandiantype:key,
toopvisible:false,
toopvisibleindex:undefined,
@ -322,11 +327,29 @@ class Coursesleftnav extends Component{
})
e.stopPropagation();//阻止冒泡
}
twosandianshowys=(e,key,type)=>{
// console.log("twosandianshow");
// console.log(key);
// console.log(type);
this.setState({
toopvisibleindexs:key,
})
e.stopPropagation();//阻止冒泡
}
twosandianshowyss=(e,key,type)=>{
// console.log("twosandianshow");
// console.log(key);
// console.log(type);
this.setState({
toopvisibleindexs:undefined,
})
e.stopPropagation();//阻止冒泡
}
twosandianhide=(e,index,type)=>{
// console.log(index)
this.setState({
toopvisibleindexs:undefined,
twosandiantype:undefined,
twosandiantypenum:undefined,
toopvisible:true,
@ -336,6 +359,13 @@ class Coursesleftnav extends Component{
e.stopPropagation();//阻止冒泡
}
twosandianhideys=(e,index,type)=>{
// console.log(index)
this.setState({
toopvisibleindexs:undefined,
})
e.stopPropagation();//阻止冒泡
}
//置顶
editSetup=(e,id)=>{
@ -820,6 +850,7 @@ class Coursesleftnav extends Component{
ModalSave,
loadtype,
twosandiantypes,
toopvisibleindexs
}=this.state;
let {course_modules,hidden_modules,is_teacher} =this.props;
@ -992,6 +1023,8 @@ class Coursesleftnav extends Component{
}
}
}
// console.log(iem.category_name);
// console.log(iem.category_name.length);
return(
<Draggable
key={'id'+index}
@ -1001,33 +1034,53 @@ class Coursesleftnav extends Component{
>
{(provided, snapshot) => (
<Tooltip placement="bottom" title={"拖拽二级菜单调整顺序"}
key={index}
// visible={toopvisible===true&&toopvisibleindex===iem.category_id?true:false}
visible={false}
>
{/*"/courses/"+this.props.match.params.coursesId+"/"+item.type+"/"+iem.category_type+"/"+iem.category_id*/}
<a className={"Draggablelichild"}>
<a className={"Draggablelichild"} key={index}>
<li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key)} onMouseLeave={(e)=>this.twosandianhide(e,index,item.type)} onMouseEnter={(e)=>this.twosandianshow(e,index,item.type)}
key={index}
ref={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
title={iem.category_name.length<10?"":iem.category_name}
// title={iem.category_name.length<10?"":iem.category_name}
>
<a className="fl pl46 pd0 Draggablelichild">
<span className={this.props.location.pathname===iem.second_category_url?"color-blue fl ml38 maxwidth155 task-hide Draggablelichild":"fl ml38 maxwidth155 task-hide Draggablelichild"}>{iem.category_name}</span>
<span className={this.props.location.pathname===iem.second_category_url?"color-blue fl ml38 maxwidth170 task-hide Draggablelichild":"fl ml38 maxwidth170 task-hide Draggablelichild"} onMouseEnter={(e)=>this.twosandianshowys(e,index,item.type)}>{iem.category_name}</span>
<span className={twosandiantype===undefined?this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14":item.type===twosandiantypes&&twosandiantype===index&&iem.category_id!=0?"none":this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14"} >{iem.category_count===0?"":iem.category_count}</span>
{item.type===twosandiantypes&&twosandiantype===index?
iem.category_id===0?"":
iem.category_type==="graduation_topics"||iem.category_type==="graduation_tasks"?
(
iem.category_name.length<13?
<span className={"fr mr20 color999 Draggablelichild font-14"} >{iem.category_count===0?"":iem.category_count}</span>
:
<Tooltip placement="right" key={index} title={iem.category_name} visible={toopvisibleindexs===undefined?false:toopvisibleindexs===index?true:false}>
<span className={"fr mr20 color999 Draggablelichild font-14"} >{iem.category_count===0?"":iem.category_count}</span>
:<Popover placement="right" content={this.content(item,iem,index)} trigger="hover" key={index}>
</Tooltip>
)
:
(
iem.category_name.length<13?
<Popover placement="right" content={this.content(item,iem,index)} trigger="hover" key={index} onMouseEnter={(e)=>this.twosandianshowyss(e)}>
<i className={"iconfont icon-sandian fr color999 mr15 Draggablelichild"}></i>
</Popover>:""}
</Popover>
:
<Tooltip placement="right" key={index} title={iem.category_name} visible={toopvisibleindexs===undefined?false:toopvisibleindexs===index?true:false}>
<Popover placement="right" content={this.content(item,iem,index)} trigger="hover" key={index} onMouseEnter={(e)=>this.twosandianshowyss(e)}>
<i className={"iconfont icon-sandian fr color999 mr15 Draggablelichild"}></i>
</Popover>
</Tooltip>
)
:""}
</a>
{provided.placeholder}
</li>
</a>
</Tooltip>
)}
@ -1087,17 +1140,24 @@ class Coursesleftnav extends Component{
}
}
}
// console.log(iem.category_name);
// console.log(iem.category_name.length);一开始是10 显示是13
return(
<a >
<li className="clearfix Draggableli" key={index} style={{ width: '244px'}} title={iem.category_name.length<10?"":iem.category_name}>
<a className="fl pl46 pd0 Draggablelichild" onClick={(e)=>this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key)} >
{/*<span className="fl ml38 maxwidth155 task-hide">{iem.category_name}</span>*/}
<span className={this.props.location.pathname===iem.second_category_url?"color-blue fl ml38 maxwidth155 task-hide Draggablelichild":"fl ml38 maxwidth155 task-hide Draggablelichild"}>{iem.category_name}</span>
{/*title={iem.category_name.length<10?"":iem.category_name}*/}
<li className="clearfix Draggableli" key={index} style={{ width: '244px'}} >
<Tooltip placement="right" key={index} title={iem.category_name}>
<a className="fl pl46 pd0 Draggablelichild" onClick={(e)=>this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key)} >
{/*<span className="fl ml38 maxwidth170 task-hide">{iem.category_name}</span>*/}
{/*{iem.category_name.length<10?"":*/}
{/* iem.category_name}*/}
<span className={this.props.location.pathname===iem.second_category_url?"color-blue fl ml38 maxwidth170 task-hide Draggablelichild":"fl ml38 maxwidth170 task-hide Draggablelichild"}>{iem.category_name}</span>
<span className={twosandiantype===undefined?this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue font-14":"fr mr20 color999 font-14":twosandiantype===index&&item.type!="graduation"?"none":this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue font-14":"fr mr20 color999 font-14"}>{iem.category_count===0?"":iem.category_count}</span>
</a>
</Tooltip>
</li>
</a>
)
})

@ -427,6 +427,7 @@ a.white-btn.use_scope-btn:hover{
.ebebeb{border-bottom: 1px solid #EBEBEB;}
.CheckboxGroup{background:rgba(249,249,249,1);}
.maxwidth155{max-width: 155px; color:#666666;font-size: 14px;}
.maxwidth170{max-width: 170px; color:#666666;font-size: 14px;}
.pl46{ margin-left: 46px !important; border-bottom: 1px solid #eeee; width: 90% !important;}
.hidden{overflow: hidden;}
.pd0{padding: 0px !important;}

@ -94,10 +94,10 @@ class YslDetailCards extends Component{
startshixunCombattype:true,
})
} else {
console.log("开始学习了");
// console.log("开始学习了");
window.open("/tasks/" + response.data.game_identifier,'_blank');
//这个是传过来 调用刷新
this.props.Myreload();
this.props.getPathCardsList();
// window.location.href = path
// let path="/tasks/"+response.data.game_identifier;
// this.props.history.push(path);
@ -109,6 +109,7 @@ class YslDetailCards extends Component{
};
componentDidMount(){
// console.log("YslDetailCards start");
let pathid=this.props.match.params.coursesId;
this.setState({
pathid:pathid

@ -381,7 +381,7 @@ class ShixunhomeWorkItem extends Component{
{
discussMessage && discussMessage.upper_category_name &&
<ConditionToolTip title={discussMessage.upper_category_name} condition={ discussMessage.upper_category_name.length > 22 }>
{ <span className="mr15 color-grey9 task-hide" style={discussMessage.time_status===1||discussMessage.time_status===2||discussMessage.time_status===3||discussMessage.time_status===4?{"maxWidth":"230px"}:{"maxWidth":"272px"}} title={discussMessage.upper_category_name}>{discussMessage.upper_category_name}</span>}
{ <span className="mr15 color-grey9 task-hide" style={discussMessage.time_status===1||discussMessage.time_status===2||discussMessage.time_status===3||discussMessage.time_status===4?{"maxWidth":"200px"}:{"maxWidth":"272px"}} title={discussMessage.upper_category_name}>{discussMessage.upper_category_name}</span>}
</ConditionToolTip>
}

@ -2147,7 +2147,7 @@ class Trainingjobsetting extends Component {
<div className="stud-class-set bor-bottom-greyE edu-back-white">
<div className=" pl20">
<p className=" clearfix " style={{height:"41px"}}>
<span className="font-16 fl "style={{"color":"#05101A"}}>发布设置 <span className="ml15 color-grey-9" style={{"font-size":"14px","text-align":"left"}}></span></span>
<span className="font-16 fl "style={{color:"#05101A"}}>发布设置 <span className="ml15 color-grey-9" style={{fontSize:"14px",textAlign:"left"}}></span></span>
{
!flagPageEdit && this.props.isAdmin() === true ?
<a className="fr white-btn edu-blueline-btn mr10 mr20 lineh-24" onClick={this.editSetting}>
@ -2161,10 +2161,10 @@ class Trainingjobsetting extends Component {
{
group_settings&&group_settings.length>0?
<div className=" clearfix edu-back-white poll_list mt10 mb20">
<Checkbox className="ml15 font-16" style={{"color":"#666666"}} onChange={this.onChange}
<Checkbox className="ml15 font-16" style={{color:"#666666"}} onChange={this.onChange}
checked={this.state.unifiedsetting}
defaultChecked={this.state.boolUnite} disabled={!flagPageEdit}>统一设置<span
className={"font-14 ml15 color-grey-c"} style={{"text-align":"left"}}>(选中则所有分班使用相同的发布设置否则各个分班单独设置)</span></Checkbox>
className={"font-14 ml15 color-grey-c"} style={{textAlign:"left"}}>(选中则所有分班使用相同的发布设置否则各个分班单独设置)</span></Checkbox>
</div>
:<div></div>
}
@ -2180,7 +2180,7 @@ class Trainingjobsetting extends Component {
unifiedsetting === undefined ? "" : unifiedsetting=== true ?
<div>
<div className="clearfix mb5 ml15">
<span className="font-16 fl mt3" style={{"color":"#999999"}}>发布时间</span>
<span className="font-16 fl mt3" style={{color:"#999999"}}>发布时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditstwo === true && publish_timebool === true?"发布时间已过,则不能修改": ""}>
<div className="fl yskspickers">
<DatePicker
@ -2204,7 +2204,7 @@ class Trainingjobsetting extends Component {
/>
</div>
</Tooltip>
<span className="ml20 fl mt5 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(学生收到作业的时间)</span>
<span className="ml20 fl mt5 color-grey-c" style={{textAlign:"left",fontSize:"14px"}}>(学生收到作业的时间)</span>
</div>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{
@ -2213,7 +2213,7 @@ class Trainingjobsetting extends Component {
}
</p>
<div className="clearfix ml15 mb5">
<span className=" fl mt3 font-16" style={{"color":"#999999"}}>截止时间</span>
<span className=" fl mt3 font-16" style={{color:"#999999"}}>截止时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditsthrees === true&&end_timebool===true?"截止时间已过,则不能修改": ""}>
<div className="fl yskspickers">
<DatePicker
@ -2239,7 +2239,7 @@ class Trainingjobsetting extends Component {
</div>
</Tooltip>
<span className=" ml20 fl mt5 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(学生按时提交作品的时间截点)</span>
<span className=" ml20 fl mt5 color-grey-c" style={{textAlign:"left",fontSize:"14px"}}>(学生按时提交作品的时间截点)</span>
</div>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{
@ -2267,16 +2267,16 @@ class Trainingjobsetting extends Component {
{/*补交设置*/}
<div className="stud-class-set bor-bottom-greyE edu-back-white">
<div className=" clearfix edu-back-white poll_list mt10">
<div className={"font-16 color-dark fl pl20 mt10 "} style={{"color":"#05101A"}}>补交设置</div>
<div className={"font-16 color-dark fl pl20 mt10 "} style={{color:"#05101A"}}>补交设置</div>
</div>
{/*value={this.state.allowreplenishment}*/}
<div className="ml40 mt10"
>
<Checkbox style={radioStyle} value={"允许补交"} checked={this.state.allowreplenishment} onChange={this.onChanges} disabled={!flagPageEdit}>开启补交 <span
className={"font-14 ml10 color-grey-c"} style={{"text-align":"left","font-size":"14px"}} >(选中则允许学生延时提交作品)</span></Checkbox>
className={"font-14 ml10 color-grey-c"} style={{textAlign:"left",fontSize:"14px"}} >(选中则允许学生延时提交作品)</span></Checkbox>
<div className={"h21 mb30 mt20"}>
<span style={{"width": "100px","color":"#999999"}}>迟交扣分</span>
<span style={{"width": "100px",color:"#999999"}}>迟交扣分</span>
<style>
{
`.ant-input-number{
@ -2290,10 +2290,10 @@ class Trainingjobsetting extends Component {
</style>
<InputNumber disabled={!whethertopay} min={0} max={1000} className="mr10 h40 color-grey-9"
onChange={this.changeTopicName}
style={{"color":"#999999","height": "40px"}}
style={{color:"#999999","height": "40px"}}
value={this.state.latededuction}/>
<span className="ml10 color-grey-9" ></span>
<span className="ml15 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(延时提交作品时学生成绩将被扣减的分值)</span>
<span className="ml15 color-grey-c" style={{textAlign:"left",fontSize:"14px"}}>(延时提交作品时学生成绩将被扣减的分值)</span>
{/*{latepenaltytype===true?<div className={"color-red ml40"}></div>:""}*/}
</div>
{
@ -2311,7 +2311,7 @@ class Trainingjobsetting extends Component {
:""
}
<div className={"h20 mb20 yskspickerss"}>
<span style={{"width": "100px","color":"#999999"}}>结束时间</span>
<span style={{"width": "100px",color:"#999999"}}>结束时间</span>
<DatePicker
showToday={false}
id={"late_timeid"}
@ -2330,7 +2330,7 @@ class Trainingjobsetting extends Component {
dropdownClassName="hideDisable"
className={handclass}
/>
<span className="ml15 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(学生延时提交作品的时间截点)</span>
<span className="ml15 color-grey-c" style={{textAlign:"left",fontSize:"14px"}}>(学生延时提交作品的时间截点)</span>
{/*{latetimetype===true?<div className={"color-red "}>结束时间不能小于截止时间</div>:""}*/}
<style>
{
@ -2354,18 +2354,18 @@ class Trainingjobsetting extends Component {
{/*评分设置*/}
<div className="stud-class-set edu-back-white">
<div className=" clearfix edu-back-white poll_list mt20">
<div className={"font-16 color-dark fl pl20 "} style={{"color":"#05101A"}}>评分设置</div>
<div className={"font-16 color-dark fl pl20 "} style={{color:"#05101A"}}>评分设置</div>
</div>
<div className="yslflexhomes">
<div style={{width:"700px"}}>
<div className="ml20 mt10 mt20">
<span className="c_grey font-13" style={{"color":"#333333"}}> 关卡任务的选择和分值设置 </span><span className="ml15 font-14 color-grey-c" style={{"text-align":"left"}}>( = + )</span>
<span className="c_grey font-13" style={{color:"#333333"}}> 关卡任务的选择和分值设置 </span><span className="ml15 font-14 color-grey-c" style={{textAlign:"left"}}>( = + )</span>
</div>
<div className=" clearfix edu-back-white poll_list mt10" style={{marginLeft:" 40px"}}>
<Checkbox disabled={!flagPageEdit} className=" font-13 mt10"
onChange={this.onChangeeffectiveness}
checked={this.state.work_efficiencys} style={{"color":"#666666"}}>效率分<span
className={"font-14 color-grey-c font-14 ml15"} style={{"text-align":"left"}}>(选中则学生最终成绩包含效率分)</span>
checked={this.state.work_efficiencys} style={{color:"#666666"}}>效率分<span
className={"font-14 color-grey-c font-14 ml15"} style={{textAlign:"left"}}>(选中则学生最终成绩包含效率分)</span>
</Checkbox>
<div>
@ -2373,13 +2373,13 @@ class Trainingjobsetting extends Component {
</div>
<div className=" mt20" style={{marginLeft:"75px"}}>
<span className="c_grey mr10" style={{"color":"#999999"}}>分值</span>
<span className="c_grey mr10" style={{color:"#999999"}}>分值</span>
<InputNumber min={0} disabled={!this.state.completionefficiencyscore} max={100} className="ml10 h40 mr10 color-grey-9"
style={{width: "100px","color":"#999999"}}
style={{width: "100px",color:"#999999"}}
onChange={this.changeTopicNametwo}
value={this.state.latedeductiontwo}/>
<span className="ml10" style={{"color":"#999999"}}></span>
<span className={"font-14 color-grey-9 "} style={{"color":"#999999"}}></span>
<span className="ml10" style={{color:"#999999"}}></span>
<span className={"font-14 color-grey-9 "} style={{color:"#999999"}}></span>
</div>
</div>
<div>
@ -2397,25 +2397,25 @@ class Trainingjobsetting extends Component {
<div className="yslflexhome">
<div >
<div className="ml20 mt40 mt20" >
<span className="c_grey font-13" style={{"color":"#333333"}}> 关卡任务分值设置规则 </span> <span> <RadioGroup className="ml50" onChange={this.onChangeslevelproportion} value={this.state.proportion}>
<span className="c_grey font-13" style={{color:"#333333"}}> 关卡任务分值设置规则 </span> <span> <RadioGroup className="ml50" onChange={this.onChangeslevelproportion} value={this.state.proportion}>
<Radio style={{ display: 'block',
height: '30px',
lineHeight: '30px',
color:"#666666",
}} disabled={!flagPageEdit} className="c_grey mt20 "
value={"均分比例"} style={{"color":"#666666"}}>均分比例</Radio>
value={"均分比例"} style={{color:"#666666"}}>均分比例</Radio>
<Radio style={{ display: 'block',
height: '30px',
lineHeight: '30px',
color:"#666666",
}} disabled={!flagPageEdit} className="c_grey ml30"
value={"经验值比例"} style={{"color":"#666666"}}>难易度</Radio>
value={"经验值比例"} style={{color:"#666666"}}>难易度</Radio>
<Radio style={{ display: 'block',
height: '30px',
lineHeight: '30px',
color:"#666666",
}} disabled={!flagPageEdit} className="c_grey mt20 ml30"
value={"自定义分值"} style={{"color":"#666666"}}>自定义分值
value={"自定义分值"} style={{color:"#666666"}}>自定义分值
{testscripttiptype===true?
<div className="invite-tipysls clearfix " id="test_script_tip" style={{left: '158px',width: '322px',zIndex: '10'}}>
<span className="right-black-trangles"></span>
@ -2442,24 +2442,24 @@ class Trainingjobsetting extends Component {
<a onClick={()=>this.testscripttip(0)}><img style={{marginBottom:"3px",marginLeft:"20px"}} src={getImageUrl("images/educoder/problem.png") }/></a>
</span>
</div>
<p className="ml20 mt15 c_grey font-13 " style={{"color":"#666666"}}> 关卡名称<span
className="color-grey-c font-12 ml10">(需要学生完成的任务请选中)</span></p>
<p className="ml20 mt15 c_grey font-13 " style={{color:"#666666"}}> 关卡名称<span
className="color-grey-c font-14 ml10">(需要学生完成的任务请选中,暂不支持跳关选择)</span></p>
<div className="ml40 mt15" >
{this.state.challenge_settings === undefined ? "" : this.state.challenge_settings.map((object, index) => {
return (
<li>
<Checkbox className="ml110 mt20 "
disabled={!flagPageEditsbox}
style={{"width": "480px","color":"#05101A"}}
style={{"width": "480px",color:"#05101A"}}
checked={object.checked}
onChange={(value) => this.onChangedatasheet(value, index)}
>{object.challenge_name}</Checkbox>
<InputNumber disabled={!flagPageEdits} className=" c_grey" min={0} max={100}
style={{"width": "100px", "margin-left": "30px","color":"#666666"}}
style={{"width": "100px", "margin-left": "30px",color:"#666666"}}
onChange={(value) => this.hangeTopicNametwodatasheet(value, index)}
value={object.challenge_score}
/>
<span className="ml10" style={{"color":"#999999"}}></span>
<span className="ml10" style={{color:"#999999"}}></span>
</li>
)
})}
@ -2468,12 +2468,12 @@ class Trainingjobsetting extends Component {
</div>
</div>
<p className="ml20 mt40 c_grey font-13 " style={{"color":"#333333"}}> 查看参考答案才通过评测的关卡扣分规则<span
<p className="ml20 mt40 c_grey font-13 " style={{color:"#333333"}}> 查看参考答案才通过评测的关卡扣分规则<span
className=" font-14 color-grey-c ml15" style={{textAlign:"left",marginLeft:"40px"}}>(学生通过评测后再查看参考答案不对成绩产生影响)</span></p>
<RadioGroup className="ml40 mt20" onChange={this.onChangeslevel} value={this.state.level}>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey" value={"扣分"}>按查看答案级别扣分<span
className="color-grey-c font-14 ml15" style={{"text-align":"left"}}>(根据学员选择查看的实训答案级别(解题思路完整答案)扣减相应的分值)</span></Radio>
className="color-grey-c font-14 ml15" style={{textAlign:"left"}}>(根据学员选择查看的实训答案级别(解题思路完整答案)扣减相应的分值)</span></Radio>
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt15"
value={"满分"}>不扣分 </Radio>
</RadioGroup>
@ -2481,12 +2481,12 @@ class Trainingjobsetting extends Component {
{/*公开设置*/}
<div className="stud-class-set bor-top-greyE edu-back-white mt35 pb5 ">
<div className=" clearfix edu-back-white poll_list mt20">
<div className={"font-16 color-dark fl pl20 "} style={{"color":"#05101A"}}>公开设置</div>
<div className={"font-16 color-dark fl pl20 "} style={{color:"#05101A"}}>公开设置</div>
</div>
<div className={"mb20 mt15"}>
<Checkbox disabled={!flagPageEdit} className="ml40" onChange={this.onChangepublicwork}
checked={this.state.publicwork} style={{"color":"#666666"}}>公开成绩</Checkbox>
<span className="font-14 color-grey-c font-14 " style={{"text-align":"left"}}>(选中则在作业截止/补交结束时间之后已提交作品的学生可以查看其它学生的成绩否则只能查看自己的成绩)</span>
checked={this.state.publicwork} style={{color:"#666666"}}>公开成绩</Checkbox>
<span className="font-14 color-grey-c font-14 " style={{textAlign:"left"}}>(选中则在作业截止/补交结束时间之后已提交作品的学生可以查看其它学生的成绩否则只能查看自己的成绩)</span>
</div>
</div>

@ -6,7 +6,7 @@ import {
import axios from 'axios';
import {getImageUrl, markdownToHTML} from 'educoder';
import "../css/messagemy.css"
import NoneData from '../../../modules/courses/coursesPublic/NoneData'
//消息页面
class MessagSub extends Component {
constructor(props) {
@ -515,7 +515,7 @@ class MessagSub extends Component {
render() {
let {page, limit, typeysl, count, isSpin, data} = this.state;
// console.log("6868686868");
// console.log(data);
console.log(data);
return (
<div className="clearfix ml20">
{/*头部筛选数据*/}
@ -549,11 +549,10 @@ class MessagSub extends Component {
<Spin size="large" className="myw100baifenbi mt10" spinning={isSpin}>
{
data === undefined ? "" : data.length === 0 ?
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb20">暂无数据哦~</p>
</div>
data === undefined ?
<NoneData></NoneData> :
data.length === 0 ?
<NoneData></NoneData>
: data.map((item, key) => {
// console.log(data)
// ridinglist-subs

@ -183,7 +183,7 @@ class NewHeader extends Component {
})
// let path="/";
// this.props.history.push(path);
broadcastChannelPostMessage('refreshPage')
// broadcastChannelPostMessage('refreshPage')
window.location.href ="/login"
message.success('退出成功');
}
@ -339,7 +339,7 @@ class NewHeader extends Component {
// this.setState({
// isRender:true
// })
broadcastChannelPostMessage('refreshPage')
// broadcastChannelPostMessage('refreshPage')
window.location.href = "/";
}
}).catch((error) => {

Loading…
Cancel
Save