commit
3913b5a3ca
@ -0,0 +1,2 @@
|
|||||||
|
class SystemUpdateNotice < ApplicationRecord
|
||||||
|
end
|
@ -0,0 +1,7 @@
|
|||||||
|
if @notice && @notice.end_time > Time.now
|
||||||
|
json.system_update true
|
||||||
|
json.system_score @notice.notes.rstrip
|
||||||
|
json.(@notice, :subject, :start_time, :end_time)
|
||||||
|
else
|
||||||
|
json.system_update false
|
||||||
|
end
|
@ -1,5 +1,5 @@
|
|||||||
class AddTsMemForOutputs < ActiveRecord::Migration[5.2]
|
class AddTsMemForOutputs < ActiveRecord::Migration[5.2]
|
||||||
def change
|
def change
|
||||||
add_column :outputs, :ts_mem, :float
|
#add_column :outputs, :ts_mem, :float
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
class AddTsTimeForOutputs < ActiveRecord::Migration[5.2]
|
class AddTsTimeForOutputs < ActiveRecord::Migration[5.2]
|
||||||
def change
|
def change
|
||||||
add_column :outputs, :ts_time, :float
|
#add_column :outputs, :ts_time, :float
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
class ModifyAnswerForChallenges < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
challenges = Challenge.where("answer is not null or answer != ''")
|
||||||
|
.includes(:challenge_answers).unscoped
|
||||||
|
challenges.find_each do |c|
|
||||||
|
next if c.challenge_answers.present?
|
||||||
|
puts("############challenge_id:##{c.id}")
|
||||||
|
ChallengeAnswer.create(name: "解题代码", contents: "#{c.answer}", level: 1, score: 100, challenge_id: c.id)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -1,66 +1,62 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>We're sorry, but something went wrong (500)</title>
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<title>EduCoder 500 error</title>
|
||||||
<style>
|
<link type="text/css" rel="stylesheet" href="/stylesheets/educoder/edu-main.css" />
|
||||||
.rails-default-error-page {
|
<link href="//at.alicdn.com/t/font_653600_rr8l5v2aaym.css" rel="stylesheet" type="text/css"/>
|
||||||
background-color: #EFEFEF;
|
<script src="/javascripts/jquery-1.8.3-ui-1.9.2-ujs-2.0.3.js"></script>
|
||||||
color: #2E2F30;
|
|
||||||
text-align: center;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rails-default-error-page div.dialog {
|
<style type="text/css">
|
||||||
width: 95%;
|
body {
|
||||||
max-width: 33em;
|
font-family: "微软雅黑","宋体";
|
||||||
margin: 4em auto 0;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
h1 {
|
||||||
.rails-default-error-page div.dialog > div {
|
font-size: 1.5em;
|
||||||
border: 1px solid #CCC;
|
|
||||||
border-right-color: #999;
|
|
||||||
border-left-color: #999;
|
|
||||||
border-bottom-color: #BBB;
|
|
||||||
border-top: #B00100 solid 4px;
|
|
||||||
border-top-left-radius: 9px;
|
|
||||||
border-top-right-radius: 9px;
|
|
||||||
background-color: white;
|
|
||||||
padding: 7px 12% 0;
|
|
||||||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
|
||||||
}
|
}
|
||||||
|
p {
|
||||||
.rails-default-error-page h1 {
|
font-size: 0.8em;
|
||||||
font-size: 100%;
|
|
||||||
color: #730E15;
|
|
||||||
line-height: 1.5em;
|
|
||||||
}
|
}
|
||||||
|
.h_content{
|
||||||
.rails-default-error-page div.dialog > p {
|
text-align: center;
|
||||||
margin: 0 0 1em;
|
padding-top: 15px;
|
||||||
padding: 1em;
|
}
|
||||||
background-color: #F7F7F7;
|
.font_h{
|
||||||
border: 1px solid #CCC;
|
font-size: 24px;
|
||||||
border-right-color: #999;
|
color: #ff0077;
|
||||||
border-left-color: #999;
|
}
|
||||||
border-bottom-color: #999;
|
.verticalCenter{
|
||||||
border-bottom-left-radius: 4px;
|
height: 100%;
|
||||||
border-bottom-right-radius: 4px;
|
justify-content: center;
|
||||||
border-top-color: #DADADA;
|
align-items: center;
|
||||||
color: #666;
|
display: -webkit-flex;
|
||||||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
if(window.history.length == 1)
|
||||||
|
{
|
||||||
|
$("#history_back").css("color","#CCC");
|
||||||
|
$("#history_back").css("cursor","default");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
<body>
|
||||||
<body class="rails-default-error-page">
|
<!-- <h1>Internal error</h1>
|
||||||
<!-- This file lives in public/500.html -->
|
<p>An error occurred on the page you were trying to access.<br />
|
||||||
<div class="dialog">
|
If you continue to experience problems please contact your Trustie administrator for assistance.</p>
|
||||||
<div>
|
<p>If you are the Trustie administrator, check your log files for details about the error.</p> -->
|
||||||
<h1>We're sorry, but something went wrong.</h1>
|
<div class="verticalCenter">
|
||||||
|
<div class="edu-txt-center">
|
||||||
|
<img src="/images/warn/pic_500.jpg" >
|
||||||
|
<p class="font-18 mt40">您可以稍后尝试
|
||||||
|
您可以稍后尝试 <a href="javascript:history.back()" class="color-blue">返回上页</a>,或者
|
||||||
|
<a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=2f2043d88c1bd61d182b98bf1e061c6185e23055bec832c07d8148fe11c5a6cd" class="color-blue">QQ反馈>></a>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p>If you are the application owner check the logs for more information.</p>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe SystemUpdateNotice, type: :model do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 192 KiB |
Loading…
Reference in new issue