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

 Conflicts:
	public/react/src/modules/tpm/shixuns/ShixunsIndex.js
video_transcode
杨树明 5 years ago
commit e734c979a9

@ -25,7 +25,7 @@ module GitHelper
decode_content =
if cd["encoding"] == 'GB18030' && cd['confidence'] > 0.8
content.encode('UTF-8', 'GBK', {:invalid => :replace, :undef => :replace, :replace => ' '})
elsif cd['encoding'].blank?
elsif cd['encoding'].blank? && !content.blank?
raise("ERROR_UTF8")
else
content.force_encoding('UTF-8')
@ -36,7 +36,7 @@ module GitHelper
rescue Exception => e
Rails.logger.error(e.message)
error_msg = e.message == "ERROR_UTF8" ? "文件无法预览" : "文档内容获取异常"
error_msg = e.message == "ERROR_UTF8" ? "文件编码异常请将文件编码设置为UTF-8" : "文档内容获取异常"
error_status = e.message == "ERROR_UTF8" ? -2 : -1
raise Educoder::TipException.new(error_status, error_msg)
end

@ -2,7 +2,7 @@ desc "同步学院或者单位评测数"
namespace :sync_evaluate do
task outpus_count: :environment do
School.find_in_batches(batch_size: 500) do |school|
School.find_each do |school|
Parallel.each_with_index(school, in_processes: 5) do |s|
puts "school_id:#{s.id}"
evaluate_count = Game.find_by_sql("select sum(g.evaluate_count) as e_count from games g, user_extensions ue where

@ -22,7 +22,7 @@
<meta name=”Description” Content=”EduCoder实训项目为单个知识点关卡实践训练帮助学生巩固单一弱点强化学习。 >
<meta name=”Description” Content=”EduCoder实践教学平台各类大赛为进一步提高各类学生综合运用高级语言程序设计能力培养创新意识和实践探索精神发掘优秀软件人才。 >
<!-- <meta name="viewport" id="viewport" content="width=device-width, initial-scale=0.3, maximum-scale=0.3, user-scalable=no">-->
<meta name="viewport" id="viewport" content="width=device-width, initial-scale=0.3, maximum-scale=0.3">
<!-- <meta name="viewport" id="viewport" content="width=device-width, initial-scale=0.3, maximum-scale=0.3">-->
<meta name="theme-color" content="#000000">
<!--<meta http-equiv="cache-control" content="no-cache,no-store, must-revalidate" />-->

@ -895,7 +895,7 @@ class College extends Component {
共建实训
</p>
<p className="yslstatistic-base-item-label">
报告
报告
</p>
<p className="yslstatistic-base-item-label">
学员实战时间

@ -331,7 +331,7 @@ export default class Shixuninformation extends Component {
<Checkbox
checked={this.state.test_set_permission}
onChange={this.Checktest_set_permission}></Checkbox>
<label style={{top: '6px'}} className="color-grey-9 ml10">选中则允许学员允许学员通过金币解锁查看隐藏测试集的内容</label>
<label style={{top: '6px'}} className="color-grey-9 ml10">选中则允许学员通过金币解锁查看隐藏测试集的内容</label>
</span>
</div>

@ -362,11 +362,11 @@ class Repository extends Component {
{commits===undefined?"":commits[0].time}
</acronym> {commits===undefined?"":commits[0].title}
</span>
<a href={`/shixuns/${match.params.shixunId}/${this.props.secret_repository_tab ? 'secret_repository' : 'repository'}/${match.params.shixunId}/commits`}
<Link to={`/shixuns/${match.params.shixunId}/${this.props.secret_repository_tab ? 'secret_repository' : 'repository'}/${match.params.shixunId}/commits`}
className="color-grey-8 fr font-16 mt3">
<i className="iconfont icon-tijiaojilu font-18 fl mr5"></i>
<span className="fl color-grey-8 ">提交记录</span>
</a>
</Link>
</div>}

@ -218,7 +218,7 @@ class RepositoryAddFile extends Component {
{
`
.padding20-30{
padding:20px 30px 5px 30px;
padding:20px 30px 60px 30px;
}
.formStyle .ant-form-item{
margin-bottom:0px !important;
@ -231,31 +231,20 @@ class RepositoryAddFile extends Component {
<p className="ant-form-item-label">
<div className={"font-20 color-black"}>新建文件</div>
</p>
<Form.Item label="提交信息">
{getFieldDecorator('message', {
rules: [{
required: true, message: '请输入提交信息',
},{
whitespace: true, message: '请勿输入空格'
}],
})(
<Input placeholder="必填描述主要修改内容相当于Git Commit message的Header" size="large" className="winput-300-35 fl "/>
)}
</Form.Item>
<div className={"mt50"}>
<Form.Item>
<div className={" mb50"}>
<Form.Item label="文件名称或文件路径">
{getFieldDecorator('path', {
rules: [{
required: true, message: '请输入提交信息',
required: true, message: '请输入文件名称或文件路径',
},{
whitespace: true, message: '请勿输入空格'
}],
})(
<span>
<span> </span><span><Input value={this.state.path} placeholder="文件名称或文件路径" className="fl" style={{ width: 200 }} size="large" onInput={(e)=>this.setinput(e)}/></span><span className={" ml10 fl"}>
提示1.输入文件名可以创建一个新文件2.输入新文件夹名/新文件名可以创建新文件夹和新文件</span>
<span> </span><span><Input value={this.state.path} placeholder="请输入文件名称或文件路径" className="fl" style={{ width: 240 }} size="large" onInput={(e)=>this.setinput(e)}/></span><span className={" ml10 fl"}>
提示1.输入文件名可以创建一个新文件2.输入新文件夹名/新文件名可以创建新文件夹和新文件step1/HelloWorld.java</span>
</span>
)}
</Form.Item>
@ -276,7 +265,18 @@ class RepositoryAddFile extends Component {
<div className="mt10 mb25 repoCMWrapper filecode">
<textarea className="" id="codemirror-file-edit" style={{display:'none'}} name="content"></textarea>
</div>
<Form.Item label="提交信息">
{getFieldDecorator('message', {
rules: [{
required: true, message: '请输入提交信息',
},{
whitespace: true, message: '请勿输入空格'
}],
})(
<Input placeholder="请输入本次提交的主要信息,合理的描述信息有利于代码历史记录的管理" size="large" className="winput-300-35 fl "/>
)}
</Form.Item>
{/*<Form.Item label="提交信息">*/}
{/* {getFieldDecorator('message', {*/}
{/* rules: [{required: true, message: "请输入提交信息"}],*/}

@ -266,23 +266,14 @@ class RepositoryAddFileupload_files extends Component {
<div className={"font-20 color-black"}>上传文件</div>
</p>
<Form.Item label="提交信息">
{getFieldDecorator('message', {
rules: [{
required: true, message: '请输入提交信息',
},{
whitespace: true, message: '请勿输入空格'
}],
})(
<Input placeholder="必填描述主要修改内容相当于Git Commit message的Header" onInput={this.FormInput} className="winput-300-35 fl"/>
)}
</Form.Item>
<div>
<p className="ant-form-item-label">
<div className={"color888 font-16"}>当前目录{this.state.filspath===""?"/":"/"+this.state.filspath} <span className={"color-blue pointer"} onClick={this.Selectfiledirectory}>选择文件目录</span></div>
</p>
</div>
<p className="ant-form-item-label">
<div className={"color888 font-16"}>当前目录{this.state.filspath===""?"/":"/"+this.state.filspath} <span className={"color-blue pointer"} onClick={this.Selectfiledirectory}>选择文件目录</span></div>
</p>
{/*<div className="mt10 mb25 repoCMWrapper filecode">*/}
@ -308,7 +299,18 @@ class RepositoryAddFileupload_files extends Component {
{/* <textarea className="winput-100-130 fl"></textarea>*/}
{/* )}*/}
{/*</Form.Item>*/}
<Form.Item label="提交信息">
{getFieldDecorator('message', {
rules: [{
required: true, message: '请输入提交信息',
},{
whitespace: true, message: '请勿输入空格'
}],
})(
<Input placeholder="必填描述主要修改内容相当于Git Commit message的Header" onInput={this.FormInput} className="winput-300-35 fl"/>
)}
</Form.Item>
</div>
</Form>
</div>

@ -9,6 +9,7 @@ import UpgradeModals from '../../modals/UpgradeModals';
import GotoQQgroup from '../../../modal/GotoQQgroup'
import btnUrl from './btn-new.png'
const queryString = require('query-string');
class ShixunsIndex extends Component {
constructor(props) {
super(props)

Loading…
Cancel
Save