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

issues25489
杨树明 5 years ago
commit bb9cfc0015

@ -524,11 +524,16 @@ class StudentWorksController < ApplicationController
@echart_data = student_efficiency(@homework, @work)
@myself_eff = @echart_data[:efficiency_list].find { |item| item.last == @user.id }
@myself_consume = @echart_data[:consume_list].find { |item| item.last == @user.id }
filename_ = "#{@use&.student_id}_#{@use&.real_name}_#{@shixun&.name}_#{Time.now.strftime('%Y%m%d_%H%M%S')}"
filename = Base64.urlsafe_encode64(filename_.strip)
stylesheets = %w(shixun_work/shixun_work.css shared/codemirror.css)
render pdf: 'shixun_work/shixun_work', filename: filename, stylesheets: stylesheets, disposition: 'inline', type:"pdf_attachment.content_type",stream:false
if params[:export].present? && params[:export]
normal_status(0,"正在下载中")
else
set_export_cookies
render pdf: 'shixun_work/shixun_work', filename: filename, stylesheets: stylesheets, disposition: 'inline', type:"pdf_attachment.content_type",stream:false
end
# render pdf: 'shixun_work/shixun_work', filename: filename, stylesheets: stylesheets, disposition: 'inline', type:"pdf_attachment.content_type",stream:false
end
# 作品调分

@ -1138,7 +1138,7 @@ class Listofworksstudentone extends Component {
{
record.ultimate_score === true ?
<Tooltip placement="bottom" title={<div>
<div>{record.user_name}{record.user_login}</div>
{/*<div>{record.user_name}{record.user_login}</div>*/}
<div>{record.finalscore === "--" ? <span>最终调整成绩0</span> :
<span>最终调整成绩{record.finalscore}</span>}</div>
</div>}>
@ -1164,16 +1164,21 @@ class Listofworksstudentone extends Component {
</Tooltip>
:
<Tooltip placement="bottom" title={<div>
<div>{record.user_name}{record.user_login}</div>
<div>完成任务评测之前查看了参考答案{record.view_answer_count}</div>
{/*<div>{record.user_name}{record.user_login}</div>*/}
<div>{record.levelscore === "--" ? <span>关卡得分0</span> :
<span>关卡得分{record.levelscore}</span>}</div>
<div>{record.efficiencyscore === "--" ? <span>效率评分0</span> :
<span>效率评分{record.efficiencyscore}</span>}</div>
<div>{record.late_penalty === "--" ? <span>迟交扣分0</span> :
<span>迟交扣分{record.late_penalty}</span>}</div>
<div>{record.finalscore === "--" ? <span>当前成绩0</span> :
<span>当前成绩{record.finalscore}</span>}</div>
{record.view_answer_count===null?"":<div>查看参考答案{record.view_answer_count}</div>}
<div>{record.finalscore === "--" ? <span>最终成绩0</span> :
<span>最终成绩{record.finalscore}</span>}</div>
</div>}>
{
record.finalscore && record.finalscore === "--" ?
@ -1473,7 +1478,7 @@ class Listofworksstudentone extends Component {
{
record.ultimate_score === true ?
<Tooltip placement="bottom" title={<div>
<div>{record.user_name}{record.user_login}</div>
{/*<div>{record.user_name}{record.user_login}</div>*/}
<div>{record.finalscore === "--" ? <span>最终调整成绩0</span> :
<span>最终调整成绩{record.finalscore}</span>}</div>
</div>}>
@ -1499,16 +1504,21 @@ class Listofworksstudentone extends Component {
</Tooltip>
:
<Tooltip placement="bottom" title={<div>
<div>{record.user_name}{record.user_login}</div>
<div>完成任务评测之前查看了参考答案{record.view_answer_count}</div>
{/*<div>{record.user_name}{record.user_login}</div>*/}
<div>{record.levelscore === "--" ? <span>关卡得分0</span> :
<span>关卡得分{record.levelscore}</span>}</div>
<div>{record.efficiencyscore === "--" ? <span>效率评分0</span> :
<span>效率评分{record.efficiencyscore}</span>}</div>
<div>{record.late_penalty === "--" ? <span>迟交扣分0</span> :
<span>迟交扣分{record.late_penalty}</span>}</div>
<div>{record.finalscore === "--" ? <span>当前成绩0</span> :
<span>当前成绩{record.finalscore}</span>}</div>
{record.view_answer_count===null?"":<div>查看参考答案{record.view_answer_count}</div>}
<div>{record.finalscore === "--" ? <span>最终成绩0</span> :
<span>最终成绩{record.finalscore}</span>}</div>
</div>}>
{
record.finalscore && record.finalscore === "--" ?

@ -72,10 +72,10 @@ class ShixunWorkReport extends Component {
})
}
}else {
this.props.slowDownload(url)
// this.props.slowDownload(url)
// this.props.showNotification(`正在下载中`);
// window.open("/api"+url+'?export=true', '_blank');
this.props.showNotification(`正在下载中`);
window.open("/api"+url+'?export=true', '_blank');
this.setState({ isspinning: false })
}
}).catch((error) => {

Loading…
Cancel
Save