diff --git a/app/controllers/concerns/git_helper.rb b/app/controllers/concerns/git_helper.rb index 65ebd4074..d77e1c3f6 100644 --- a/app/controllers/concerns/git_helper.rb +++ b/app/controllers/concerns/git_helper.rb @@ -48,7 +48,7 @@ module GitHelper def project_fork(container, original_rep_path, username) raise Educoder::TipException.new("fork源路径为空,fork失败!") if original_rep_path.blank? # 将要生成的仓库名字 - new_repo_name = "#{username}/#{container.try(:identifier)}#{ Time.now.strftime("%Y%m%d%H%M%S")}" + new_repo_name = "#{username.try(:strip)}/#{container.try(:identifier)}#{ Time.now.strftime("%Y%m%d%H%M%S")}" uid_logger("start fork container: repo_name is #{new_repo_name}") GitService.fork_repository(repo_path: original_rep_path, fork_repository_path: (new_repo_name + ".git")) container.update_attributes!(:repo_name => new_repo_name) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 1c272e02d..6c3f34a60 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -716,7 +716,7 @@ class ShixunsController < ApplicationController rescue Exception => e if e.message != "ActiveRecord::RecordInvalid" logger.error("##########project_fork error #{e.message}") - @current_task.destroy! + @myshixun.destroy! end raise "实训云平台繁忙(繁忙等级:81)" end diff --git a/app/services/concerns/elasticsearch_able.rb b/app/services/concerns/elasticsearch_able.rb index c1640470c..e93f9c537 100644 --- a/app/services/concerns/elasticsearch_able.rb +++ b/app/services/concerns/elasticsearch_able.rb @@ -22,6 +22,7 @@ module ElasticsearchAble fragment_size: EduSetting.get('es_highlight_fragment_size') || 30, tag: '', fields: { + name: { type: 'plain' }, challenge_names: { type: 'plain' }, challenge_tag_names: { type: 'plain' }, description: { type: 'plain' }, diff --git a/db/migrate/20190729080935_modify_login_for_users.rb b/db/migrate/20190729080935_modify_login_for_users.rb new file mode 100644 index 000000000..274e163de --- /dev/null +++ b/db/migrate/20190729080935_modify_login_for_users.rb @@ -0,0 +1,9 @@ +class ModifyLoginForUsers < ActiveRecord::Migration[5.2] + def change + users = User.where("created_on > '2019-07-26 19:00:00'") + users.find_each do |use| + use.update_attributes(login: use.login.strip, phone: use.phone.try(:strip)) + use.user_extension.update_column(:student_id, use.user_extension.student_id.try(:strip)) + end + end +end diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 4eeb5497c..f58d44978 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -11,10 +11,11 @@ float: left; width: 97px;} .head-nav{ + float: left; text-align: center; height: 60px; box-sizing: border-box; - min-width: 1000px; + min-width: 1200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 363ff495d..2ad7df0d5 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -41,7 +41,7 @@ export function initAxiosInterceptors(props) { // proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.educoder.net" // proxy = "https://testeduplus2.educoder.net" - proxy="http://47.96.87.25:48080" + proxy="http://47.96.87.25:48080/" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 6b435b619..f4a90fd81 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -713,68 +713,68 @@ submittojoinclass=(value)=>{ >工程认证 - -
-
- {/**/} -
- - 实训 - - -
- {/**/} - {/*搜索框*/} - {showSearchOpentype===true?
this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}> - this.onKeywordSearchKeyDowns()} - onSearch={(value) => this.onKeywordSearchKeyDown(value)} - // onPressEnter={this.onKeywordSearchKeyDown} - style={{ width: 300,height:32}} - autoFocus={true} - /> -
:""} - - {/**/} - {/*/!**!/*/} - {/**/} - - {/**/} - {/* TODO 需要服务端接口提供最近搜索 + } + +
+
+ {/**/} +
+ + 实训 + + +
+ {/**/} + {/*搜索框*/} + {showSearchOpentype===true?
this.hideshowSearchOpen(e)} onMouseLeave={()=>this.setevaluatinghides()}> + this.onKeywordSearchKeyDowns()} + onSearch={(value) => this.onKeywordSearchKeyDown(value)} + // onPressEnter={this.onKeywordSearchKeyDown} + style={{ width: 300,height:32}} + autoFocus={true} + /> +
:""} + + {/**/} + {/*/!**!/*/} + {/**/} + + {/**/} + {/* TODO 需要服务端接口提供最近搜索
最近搜索
*/} -
-
- -
+
- {/* <%= link_to '登录', signin_path, :className => "mr5" %> diff --git a/public/react/src/modules/tpm/TPMIndex.css b/public/react/src/modules/tpm/TPMIndex.css index 0e2720b01..2f6eccfd6 100644 --- a/public/react/src/modules/tpm/TPMIndex.css +++ b/public/react/src/modules/tpm/TPMIndex.css @@ -204,4 +204,8 @@ body>.-task-title { .mainheighs{ height: 100%; display: block; +} + +.ml18a{ + margin-left:18%; } \ No newline at end of file diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index e092c17d4..0cf22376f 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -20,7 +20,7 @@ const versionNum = '0001'; // let _url_origin = getUrl() let _url_origin=''; if(window.location.port === "3007"){ - _url_origin="https://newweb.educoder.net"; + _url_origin="http://47.96.87.25:48080/"; } // let _url_origin=`https://www.educoder.net`; diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index 5ab2dc0ad..6c77ee1c5 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -11,10 +11,11 @@ float: left; width: 97px;} .head-nav{ + float: left; text-align: center; height: 60px; box-sizing: border-box; - min-width: 1000px; + min-width: 1200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;