From 22c6f64d2860c2440b7e4a6ecf3603c72fcd9f49 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 8 Nov 2019 13:55:40 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/ShixunWorkReport.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) => { From 8af5243375a783cbec4208b54a6fd41d0b09be59 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Fri, 8 Nov 2019 14:07:08 +0800 Subject: [PATCH 2/3] change student_works export pdf --- app/controllers/student_works_controller.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 # 作品调分 From 8eb87be971d18a05dfa90dab12ed46b64072c021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 8 Nov 2019 14:28:03 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=9B=B8=E5=85=B3=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Listofworksstudentone.js | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index da3f489e3..00da5bd6b 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 === "--" ?