Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_hss
杨树林 6 years ago
commit 1ec2feaf32

@ -1,5 +1,6 @@
function createMDEditor(element, opts){
var defaults = {
height: 600,
path: '/editormd/lib/',
syncScrolling: "single",
tex: true,

@ -67,13 +67,19 @@ class GamesController < ApplicationController
uri = "#{shixun_tomcat}/bridge/vnc/getvnc"
params = {tpiID: @myshixun.id, :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(@shixun))}"}
res = uri_post uri, params
logger.info("###############---- ")
if res && res['code'].to_i != 0
raise("实训云平台繁忙繁忙等级99")
end
if request.subdomain == "pre-newweb"
# 无域名版本
#@vnc_url = "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless"
@vnc_url = "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless"
else
# 有域名版本
@vnc_url = "https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless"
end
@vnc_evaluate = @shixun.vnc_evaluate
rescue Exception => e
Rails.logger.error(e.message)

@ -265,6 +265,7 @@ class QuestionBanksController < ApplicationController
# exercise.update_column(:quotes, exercise.quotes+1)
# end
new_exercise if new_exercise.save!
exercise.update_column(:quotes, exercise.quotes+1)
end
end
@ -292,6 +293,7 @@ class QuestionBanksController < ApplicationController
# poll.update_column(:quotes, poll.quotes+1)
# end
new_poll if new_poll.save!
poll.update_column(:quotes, poll.quotes+1)
end
end

@ -448,6 +448,7 @@ class ShixunsController < ApplicationController
ShixunMirrorRepository.create(:shixun_id => @shixun.id, :mirror_repository_id => mirror)
end
end
logger.info("#########shixun_params#{shixun_params}")
@shixun.update_attributes(shixun_params)
logger.info("##########shixun_info_params: #{shixun_info_params}")
logger.info("##########params[:shixun_info][:evaluate_script]: #{params[:shixun_info][:evaluate_script]}")

@ -1,7 +1,7 @@
class GtopicBank < ApplicationRecord
belongs_to :user
belongs_to :graduation_topic
belongs_to :course_list
belongs_to :graduation_topic, optional: true
belongs_to :course_list, optional: true
has_many :attachments, as: :container, dependent: :destroy
has_many :graduation_topics, dependent: :nullify

@ -24,7 +24,7 @@ module Searchable::Course
author_name: teacher&.real_name,
author_school_name: teacher&.school_name,
visits_count: visits,
members_count: members_count,
members_count: course_members_count,
is_public: is_public == 1,
first_category_url: ApplicationController.helpers.module_url(none_hidden_course_modules.first, self)
}

@ -0,0 +1,31 @@
class MigrateBankReferenceId < ActiveRecord::Migration[5.2]
def change
HomeworkBank.all.each do |bank|
if bank.homework_common
bank.homework_common.update_column("homework_bank_id", bank.id) if bank.homework_common.homework_bank_id.nil?
end
end
GtopicBank.all.each do |bank|
if bank.graduation_topic
bank.graduation_topic.update_column("gtopic_bank_id", bank.id) if bank.graduation_topic.gtopic_bank_id.nil?
end
end
GtaskBank.all.each do |bank|
if bank.graduation_task
bank.graduation_task.update_column("gtask_bank_id", bank.id) if bank.graduation_task.gtask_bank_id.nil?
end
end
ExerciseBank.all.each do |bank|
if bank.container_type == 'Exercise'
exercise = Exercise.find_by(id: bank.container_id)
exercise.update_column("exercise_bank_id", bank.id) if exercise && exercise.exercise_bank_id.nil?
elsif bank.container_type == 'Poll'
poll = Poll.find_by(id: bank.container_id)
poll.update_column("exercise_bank_id", bank.id) if poll && poll.exercise_bank_id.nil?
end
end
end
end

@ -41,7 +41,7 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator = true, item, inde
console.log('arg_course_groups', arg_course_groups)
const urlStyle = {"lef":"tunset", minWidth: '262px'};
const urlStyle = {"left":"unset", minWidth: '262px'};
if (alwaysShow == true) {
urlStyle.display = 'block'
}

@ -74,13 +74,18 @@ function CourseGroupChooserModal({ course_groups = [], isAdminOrCreator, item, i
position: relative;
top: auto;
box-shadow: none;
padding-top: 12px;
}
.courseGroupChooserModal .drop_down_menu .mainGroup{
background: #f2f9ff;
padding: 0 20px;
}
.courseGroupChooserModal .drop_down_menu li:hover,.courseGroupChooserModal .drop_down_normal li:hover{
background: #f2f9ff;
padding-top: 12px;
}
.courseGroupChooserModal .drop_down_menu .mainGroup.ant-checkbox-group {
width: 100%;
max-height: 300px
height: 300px;
}
.courseGroupChooserModal .drop_down_search {
margin: 0;

@ -74,6 +74,8 @@ class ActionView extends Component {
render() {
const { onRunCodeTest, onShowPrevStage, onShowNextStage, gameBuilding
, game, classes, st, shixun, record, challenge, time_limit, real_time_limit } = this.props;
console.log(shixun)
return (
<div className="-flex -layout-h" id="game_operate_action">
<style>{`
@ -150,7 +152,7 @@ class ActionView extends Component {
<div id="code_test" className="act_btn">
{(shixun&&shixun.vnc || shixun&&shixun.vnc_evaluate) && <div id="code_test" className="act_btn">
{
st === 1 && game.status === 2 ?
<Tooltip title={ "已通关的选择题任务无法再次测评" }>
@ -174,7 +176,7 @@ class ActionView extends Component {
<i className="fa fa-play-circle font-16"></i>
测评
</a>}
</div>
</div>}
</div>
);
/*

@ -34,6 +34,7 @@ function getNewTreeData(treeData, curKey, child, level) {
}
function fileData2TreeData(repoFilesData) {
if(repoFilesData!=null){
const fileTreeData = [];
repoFilesData.forEach((item) => {
if (item.kind === 'file') {
@ -51,6 +52,8 @@ function fileData2TreeData(repoFilesData) {
}
})
return fileTreeData;
}
}
class CodeRepositoryViewContainer extends Component {

@ -1653,8 +1653,6 @@ export default class TPMsettings extends Component {
// onMouseEnter={operateauthority?this.bigopen:""}
onSelect={operateauthority?this.bigopens:""}
// open={opers}
showSearch
optionFilterProp="children"
filterOption={(input, option) =>
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0

@ -84,11 +84,10 @@ class InfosTopics extends Component{
if(user_id===undefined){
user_id=this.props.match.params&&this.props.match.params.username;
user_id=1
}
if(user_id!=undefined){
let {per_page}=this.state;
let url=`/users/${user_id}/question_banks.json`;
@ -112,8 +111,6 @@ class InfosTopics extends Component{
isSpin:false
})
});
}
}

Loading…
Cancel
Save