diff --git a/app/controllers/student_works_controller.rb b/app/controllers/student_works_controller.rb index de764992b..060656a88 100644 --- a/app/controllers/student_works_controller.rb +++ b/app/controllers/student_works_controller.rb @@ -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 # 作品调分 diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index a58fa709b..e43be32ea 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -1138,7 +1138,7 @@ class Listofworksstudentone extends Component { { record.ultimate_score === true ? -
{record.user_name}{record.user_login}
+ {/*
{record.user_name}{record.user_login}
*/}
{record.finalscore === "--" ? 最终调整成绩:0分 : 最终调整成绩:{record.finalscore}分}
}> @@ -1164,16 +1164,21 @@ class Listofworksstudentone extends Component {
: -
{record.user_name}{record.user_login}
-
完成任务评测之前查看了参考答案:{record.view_answer_count}关
+ {/*
{record.user_name}{record.user_login}
*/} +
{record.levelscore === "--" ? 关卡得分:0分 : 关卡得分:{record.levelscore}分}
+
{record.efficiencyscore === "--" ? 效率评分:0分 : 效率评分:{record.efficiencyscore}分}
+
{record.late_penalty === "--" ? 迟交扣分:0分 : 迟交扣分:{record.late_penalty}分}
-
{record.finalscore === "--" ? 当前成绩:0分 : - 当前成绩:{record.finalscore}分}
+ + {record.view_answer_count===null?"":
查看参考答案:{record.view_answer_count}关
} + +
{record.finalscore === "--" ? 最终成绩:0分 : + 最终成绩:{record.finalscore}分}
}> { record.finalscore && record.finalscore === "--" ? @@ -1473,7 +1478,7 @@ class Listofworksstudentone extends Component { { record.ultimate_score === true ? -
{record.user_name}{record.user_login}
+ {/*
{record.user_name}{record.user_login}
*/}
{record.finalscore === "--" ? 最终调整成绩:0分 : 最终调整成绩:{record.finalscore}分}
}> @@ -1499,16 +1504,21 @@ class Listofworksstudentone extends Component {
: -
{record.user_name}{record.user_login}
-
完成任务评测之前查看了参考答案:{record.view_answer_count}关
+ {/*
{record.user_name}{record.user_login}
*/} +
{record.levelscore === "--" ? 关卡得分:0分 : 关卡得分:{record.levelscore}分}
+
{record.efficiencyscore === "--" ? 效率评分:0分 : 效率评分:{record.efficiencyscore}分}
+
{record.late_penalty === "--" ? 迟交扣分:0分 : 迟交扣分:{record.late_penalty}分}
-
{record.finalscore === "--" ? 当前成绩:0分 : - 当前成绩:{record.finalscore}分}
+ + {record.view_answer_count===null?"":
查看参考答案:{record.view_answer_count}关
} + +
{record.finalscore === "--" ? 最终成绩:0分 : + 最终成绩:{record.finalscore}分}
}> { record.finalscore && record.finalscore === "--" ? diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 2a2ed9a9e..737ed4c00 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -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) => {