|
|
|
@ -178,20 +178,21 @@
|
|
|
|
|
<span class="fl font-bd">实训详情</span>
|
|
|
|
|
</p>
|
|
|
|
|
<%#= ApplicationController.helpers.javascript_include_tag "/codemirror/lib/codemirror", "/codemirror/mode/javascript/javascript", "/codemirror/addon/hint/show-hint", "/codemirror/addon/hint/javascript-hint", "/codemirror/addon/selection/active-line", "/codemirror/addon/lint/javascript-lint", "/codemirror/addon/lint/css-lint", "/codemirror/addon/lint/lint", "/codemirror/addon/lint/json-lint", "/editormd/lib/codemirror/addon/lint/css-lint" %>
|
|
|
|
|
<% @games.each_with_index do |game, index| %>
|
|
|
|
|
<% @challenges.each_with_index do |challenge, index| %>
|
|
|
|
|
<% game = @games.select{|game| game.challenge_id == challenge.id}.first if @games %>
|
|
|
|
|
<div class="shixun_detail_con padding15 bor-top-greyE">
|
|
|
|
|
<p class="clearfix">
|
|
|
|
|
<span class="panel-inner-icon mr15 fl mt5">
|
|
|
|
|
<% if game.challenge.st == 1 %>
|
|
|
|
|
<% if challenge.st == 1 %>
|
|
|
|
|
<i class="fa fa-th-list font-16 color_white" data-tip-down="选择题任务"></i>
|
|
|
|
|
<% else %>
|
|
|
|
|
<i class="fa fa-code font-16 color_white" data-tip-down="编程题任务"></i>
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="fl mt3"><span class="font-bd mr15">第<%= index+1 %>关</span><%= game.challenge.subject %></span>
|
|
|
|
|
<span class="fl mt3"><span class="font-bd mr15">第<%= index+1 %>关</span><%= challenge.subject %></span>
|
|
|
|
|
</p>
|
|
|
|
|
<div style="margin-left: 32px;" class="mt15">
|
|
|
|
|
<% if game.outputs.present? %>
|
|
|
|
|
<% if game.present? && game.outputs.present? %>
|
|
|
|
|
<table class="edu-pop-table edu-txt-center table-line thback" cellpadding="0" cellspacing="0">
|
|
|
|
|
<thead>
|
|
|
|
|
<th width="10%">评测次数</th>
|
|
|
|
@ -209,7 +210,7 @@
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if game.try(:lastest_code).present? && game.challenge.st == 0 %>
|
|
|
|
|
<% if game.present? && game.try(:lastest_code).present? && challenge.st == 0 %>
|
|
|
|
|
<div class="bor-grey-e mt15">
|
|
|
|
|
<p class="clearfix pt5 pb5 pl15 pr15 back-f6-grey">
|
|
|
|
|
<span class="fl">最近通过的代码</span>
|
|
|
|
@ -261,110 +262,108 @@
|
|
|
|
|
ide.setSize("auto", ide.lineCount() * 18);
|
|
|
|
|
}
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
// 基于准备好的dom,初始化echarts实例
|
|
|
|
|
if(document.getElementById('shixun_skill_chart')){
|
|
|
|
|
var effChart = echarts.init(document.getElementById('shixun_skill_chart'));
|
|
|
|
|
// 指定图表的配置项和数据
|
|
|
|
|
var option = {
|
|
|
|
|
grid: {
|
|
|
|
|
left: '3%',
|
|
|
|
|
right: '9%',
|
|
|
|
|
bottom: '3%',
|
|
|
|
|
containLabel: true
|
|
|
|
|
},
|
|
|
|
|
tooltip : {},
|
|
|
|
|
xAxis : [
|
|
|
|
|
{
|
|
|
|
|
type : 'value',
|
|
|
|
|
name: '学生序号',
|
|
|
|
|
scale:true,
|
|
|
|
|
axisLabel : {
|
|
|
|
|
formatter: ' '
|
|
|
|
|
},
|
|
|
|
|
axisTick:{
|
|
|
|
|
show:false
|
|
|
|
|
},
|
|
|
|
|
splitLine: {
|
|
|
|
|
show: false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
yAxis : [
|
|
|
|
|
{
|
|
|
|
|
type : 'value',
|
|
|
|
|
name : '工作效率',
|
|
|
|
|
scale:true,
|
|
|
|
|
axisLabel : {
|
|
|
|
|
formatter: '{value} '
|
|
|
|
|
},
|
|
|
|
|
splitLine: {
|
|
|
|
|
show: false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
series : [
|
|
|
|
|
{
|
|
|
|
|
name:'',
|
|
|
|
|
type:'scatter',
|
|
|
|
|
data: <%= @echart_data[:efficiency_list] %>,
|
|
|
|
|
itemStyle:{
|
|
|
|
|
normal:{color:'#2e65ad'}
|
|
|
|
|
},
|
|
|
|
|
markArea: {
|
|
|
|
|
silent: true,
|
|
|
|
|
itemStyle: {
|
|
|
|
|
normal: {
|
|
|
|
|
color: 'transparent',
|
|
|
|
|
borderWidth: 1,
|
|
|
|
|
borderType: 'dashed'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
markPoint : {
|
|
|
|
|
data : [
|
|
|
|
|
{
|
|
|
|
|
name: 'daiao',
|
|
|
|
|
xAxis:<%= @myself_eff[0] %>,
|
|
|
|
|
yAxis:<%= @myself_eff[1] %>
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
itemStyle: {
|
|
|
|
|
normal:{
|
|
|
|
|
color:'#c23531'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
markLine : {
|
|
|
|
|
lineStyle: {
|
|
|
|
|
normal: {
|
|
|
|
|
type: 'solid',
|
|
|
|
|
color:'#c23531'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data : [
|
|
|
|
|
{type : 'average', name: '中位值'}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name:'二班',
|
|
|
|
|
type:'scatter',
|
|
|
|
|
data: [<%= @myself_eff %>],
|
|
|
|
|
itemStyle:{
|
|
|
|
|
color:'#c23531'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表
|
|
|
|
|
effChart.setOption(option);
|
|
|
|
|
console.debug(<%= @myself_consume %>);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 基于准备好的dom,初始化echarts实例
|
|
|
|
|
if(document.getElementById('shixun_skill_chart')){
|
|
|
|
|
var effChart = echarts.init(document.getElementById('shixun_skill_chart'));
|
|
|
|
|
// 指定图表的配置项和数据
|
|
|
|
|
var option = {
|
|
|
|
|
grid: {
|
|
|
|
|
left: '3%',
|
|
|
|
|
right: '9%',
|
|
|
|
|
bottom: '3%',
|
|
|
|
|
containLabel: true
|
|
|
|
|
},
|
|
|
|
|
tooltip : {},
|
|
|
|
|
xAxis : [
|
|
|
|
|
{
|
|
|
|
|
type : 'value',
|
|
|
|
|
name: '学生序号',
|
|
|
|
|
scale:true,
|
|
|
|
|
axisLabel : {
|
|
|
|
|
formatter: ' '
|
|
|
|
|
},
|
|
|
|
|
axisTick:{
|
|
|
|
|
show:false
|
|
|
|
|
},
|
|
|
|
|
splitLine: {
|
|
|
|
|
show: false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
yAxis : [
|
|
|
|
|
{
|
|
|
|
|
type : 'value',
|
|
|
|
|
name : '工作效率',
|
|
|
|
|
scale:true,
|
|
|
|
|
axisLabel : {
|
|
|
|
|
formatter: '{value} '
|
|
|
|
|
},
|
|
|
|
|
splitLine: {
|
|
|
|
|
show: false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
series : [
|
|
|
|
|
{
|
|
|
|
|
name:'',
|
|
|
|
|
type:'scatter',
|
|
|
|
|
data: <%= @echart_data[:efficiency_list] %>,
|
|
|
|
|
itemStyle:{
|
|
|
|
|
normal:{color:'#2e65ad'}
|
|
|
|
|
},
|
|
|
|
|
markArea: {
|
|
|
|
|
silent: true,
|
|
|
|
|
itemStyle: {
|
|
|
|
|
normal: {
|
|
|
|
|
color: 'transparent',
|
|
|
|
|
borderWidth: 1,
|
|
|
|
|
borderType: 'dashed'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
markPoint : {
|
|
|
|
|
data : [
|
|
|
|
|
{
|
|
|
|
|
name: 'daiao',
|
|
|
|
|
xAxis:<%= @myself_eff[0] %>,
|
|
|
|
|
yAxis:<%= @myself_eff[1] %>
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
itemStyle: {
|
|
|
|
|
normal:{
|
|
|
|
|
color:'#c23531'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
markLine : {
|
|
|
|
|
lineStyle: {
|
|
|
|
|
normal: {
|
|
|
|
|
type: 'solid',
|
|
|
|
|
color:'#c23531'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data : [
|
|
|
|
|
{type : 'average', name: '中位值'}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name:'二班',
|
|
|
|
|
type:'scatter',
|
|
|
|
|
data: [<%= @myself_eff %>],
|
|
|
|
|
itemStyle:{
|
|
|
|
|
color:'#c23531'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表
|
|
|
|
|
effChart.setOption(option);
|
|
|
|
|
console.debug(<%= @myself_consume %>);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(document.getElementById('shixun_skill_chart')) {
|
|
|
|
|
if(document.getElementById('shixun_overall_ablility_chart')) {
|
|
|
|
|
var ablChart = echarts.init(document.getElementById('shixun_overall_ablility_chart'));
|
|
|
|
|
var dataBJ = <%= @echart_data[:consume_list] %>;
|
|
|
|
|
var schema = [
|
|
|
|
@ -479,6 +478,8 @@
|
|
|
|
|
// 使用刚指定的配置项和数据显示图表。
|
|
|
|
|
ablChart.setOption(option1);
|
|
|
|
|
}
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</html>
|
|
|
|
|