diff --git a/app/controllers/users/question_banks_controller.rb b/app/controllers/users/question_banks_controller.rb index 0dc4a3f3f..d0a331291 100644 --- a/app/controllers/users/question_banks_controller.rb +++ b/app/controllers/users/question_banks_controller.rb @@ -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 diff --git a/app/views/exercise_questions/_exercise_questions.json.jbuilder b/app/views/exercise_questions/_exercise_questions.json.jbuilder index ca8ea7e6b..bf5e02b3c 100644 --- a/app/views/exercise_questions/_exercise_questions.json.jbuilder +++ b/app/views/exercise_questions/_exercise_questions.json.jbuilder @@ -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 diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index 7285c9a39..50358aba6 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -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( - + return ( + ) }) } @@ -2176,19 +2179,18 @@ export default class TPMsettings extends Component { :""} - {/*"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?

服务配置

{ shixun_service_configs&&shixun_service_configs.map((item,key)=>{ + return(
-

{item.name}

+

+ {item.name} + this.Deselectlittle(item.mirror_repository_id)}> +

diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js index 14f5d7a5e..e4e37d15a 100644 --- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js +++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js @@ -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 ( - - - + ) }) }