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

dev_aliyun_beta
hjm 5 years ago
commit ee599d93d0

@ -36,8 +36,8 @@ class Users::QuestionBanksController < Users::BaseController
.group('graduation_tasks.gtask_bank_id').count
when 'gtopic' then
StudentGraduationTopic.joins(:graduation_topic)
.where(gtopic_banks: { gtopic_bank_id: question_bank_ids }).where('status != 0')
.group('gtopic_banks.gtopic_bank_id').count
.where(graduation_topics: { gtopic_bank_id: question_bank_ids }).where('student_graduation_topics.status = 1')
.group('graduation_topics.gtopic_bank_id').count
end
end

@ -49,8 +49,11 @@ if question.question_type <= 2 #当为选择题或判断题时,只显示选
if question.question_type == 2 #返回答案的文字
standard_text = standard_answers_array.first.to_i == 1 ? "正确" : "错误"
else
if question.question_type == 1 && standard_answers_array.size == 1
standard_answers_array = standard_answers_array.first.to_s.split("")
end
array_text_answer = []
standard_answers_array.each{|a| array_text_answer.push((a+64).chr)}
standard_answers_array.each{|a| array_text_answer.push((a.to_i+64).chr)}
standard_text = array_text_answer.join("")
end
json.standard_answer_show standard_text

@ -3,7 +3,7 @@ import React, { Component } from 'react';
import MonacoEditor from 'react-monaco-editor';
//MonacoDiffEditor 对比模式
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker,Breadcrumb,Upload,Button,notification} from 'antd';
import {Input, Select, Radio, Checkbox, Popconfirm, message, Modal,Icon,DatePicker,Breadcrumb,Upload,Button,notification, Tooltip} from 'antd';
// import "antd/dist/antd.css";
@ -1607,9 +1607,12 @@ export default class TPMsettings extends Component {
{
settingsData === undefined ? "" : settingsData.shixun.main_type.map((item, key) => {
return(
<Option value={item.id} key={key} title={item.description} >{item.type_name}</Option>
return (
<Option value={item.id} key={key} >
<Tooltip placement="right" title={item.description} >
{item.type_name}
</Tooltip>
</Option>
)
})
}
@ -2176,19 +2179,18 @@ export default class TPMsettings extends Component {
</div>:""}
</div>
{/*"name": "我是镜像名", # 镜像名称*/}
{/*"cpu_limit": 1, # cpu核*/}
{/*"lower_cpu_limit": 0.1, # 最低cpu核 浮点数*/}
{/*"memory_limit": 1024 ,#内存限制*/}
{/*"request_limit": 10, # 内存要求*/}
{/*"mirror_repository_id": 12, # 镜像id*/}
{this.props.identity<3?<div className="edu-back-white padding40-20 mb20">
<p className="color-grey-6 font-16 mb30">服务配置</p>
{ shixun_service_configs&&shixun_service_configs.map((item,key)=>{
return(
<div key={key}>
<div id="5">
<p className="color-grey-6 font-16 mt30 mb20" id="shixun_scenario_type_name">{item.name}</p>
<p className="color-grey-6 font-16 mt30 mb20" id="shixun_scenario_type_name">
<span className={"fl"}>{item.name}</span>
<span className={"fr mr40"} onClick={()=>this.Deselectlittle(item.mirror_repository_id)}><i className="fa fa-times-circle color-grey-c font-16 fl"></i></span>
</p>
<div className="clearfix mb5">
<label className="panel-form-label fl">CPU()</label>
<div className="pr fl with80 status_con">

@ -4,7 +4,7 @@ import {TPMIndexHOC} from '../TPMIndexHOC';
import {SnackbarHOC,appendFileSizeToUploadFileAll} from 'educoder';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification,Tooltip} from 'antd';
// import "antd/dist/antd.css";
@ -993,9 +993,11 @@ class Newshixuns extends Component {
{
newshixunlist === undefined ? "" : newshixunlist.main_type.map((item, key) => {
return (
<Option value={item.id} key={key}>{item.type_name}</Option>
<Option value={item.id} key={key} >
<Tooltip placement="right" title={item.description} >
{item.type_name}
</Tooltip>
</Option>
)
})
}

Loading…
Cancel
Save