diff --git a/app/controllers/hack_user_lastest_codes_controller.rb b/app/controllers/hack_user_lastest_codes_controller.rb index b7ec6fb8e..814d16d51 100644 --- a/app/controllers/hack_user_lastest_codes_controller.rb +++ b/app/controllers/hack_user_lastest_codes_controller.rb @@ -23,7 +23,7 @@ class HackUserLastestCodesController < ApplicationController # 同步代码 def sync_code - @my_hack.update_attributes(code: @hack.code, modify_time: @hack.modify_time) + @my_hack.update_attributes(code: @hack.code, modify_time: Time.now) end # 调试代码 diff --git a/app/templates/shared/main.css b/app/templates/shared/main.css index 09d295421..704246b74 100644 --- a/app/templates/shared/main.css +++ b/app/templates/shared/main.css @@ -557,7 +557,6 @@ a.user_orangebg_btn{background-color:#FF6800;color: #fff;} a.user_greybg_btn{background-color:#747A7F;color: #fff;} /*.user_white_btn{border: 1px solid #ffffff;color: #ffffff!important;}*/ - .pointer{cursor: pointer} .cdefault{cursor: default} diff --git a/app/views/homework_commons/_homework_public_navigation.json.jbuilder b/app/views/homework_commons/_homework_public_navigation.json.jbuilder index 243c6aecd..5570cec02 100644 --- a/app/views/homework_commons/_homework_public_navigation.json.jbuilder +++ b/app/views/homework_commons/_homework_public_navigation.json.jbuilder @@ -12,4 +12,5 @@ json.homework_type homework.homework_type if homework.homework_type == "practice" json.shixun_identifier homework.shixuns.take.try(:identifier) json.shixun_id homework.shixuns.take.try(:id) + json.shixun_status homework.shixuns.take.try(:status).to_i end diff --git a/app/views/homework_commons/index.json.jbuilder b/app/views/homework_commons/index.json.jbuilder index 9f0f9fdfd..35f321f45 100644 --- a/app/views/homework_commons/index.json.jbuilder +++ b/app/views/homework_commons/index.json.jbuilder @@ -29,6 +29,7 @@ json.homeworks @homework_commons.each do |homework| if @user_course_identity < Course::STUDENT if homework.homework_type == "practice" json.shixun_identifier homework.shixuns.take.try(:identifier) + json.shixun_status homework.shixuns.take.try(:status).to_i end elsif @user_course_identity == Course::STUDENT if homework.homework_type == "practice" diff --git a/public/react/config/webpack.config.prod.js b/public/react/config/webpack.config.prod.js index fbfbf23bc..596843f5f 100644 --- a/public/react/config/webpack.config.prod.js +++ b/public/react/config/webpack.config.prod.js @@ -326,7 +326,7 @@ module.exports = { comments: false }, compress: { - drop_debugger: true, + drop_debugger: false, drop_console: false } } diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 86cf39bac..acd18e6c3 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -13,7 +13,7 @@ function locationurl(list){ if (window.location.port === "3007") { } else { - window.location.href(list) + window.location.href=list } } let hashTimeout diff --git a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js index a9100f2f3..52cf945a0 100644 --- a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js +++ b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js @@ -493,8 +493,8 @@ class NewShixunModel extends Component{ {this.props.type==='shixuns'?

筛选:

-

this.belongto("all")}>全部实训

-

this.belongto("mine")}>我的实训

+

this.belongto("all")}>全部实训

+

this.belongto("mine")}>我的实训

:"" } {/*{this.props.type==='shixuns'? */} diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 5073a6e9c..05a3eb5cd 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -232,9 +232,9 @@ class ShixunHomeworkPage extends Component { typelist={teacherdatapage === undefined ? [""] : teacherdatapage.homework_status} /> this.gotohome()}>返回 - 1?实训详情 + target={"_blank"}>实训详情:""} @@ -336,10 +336,10 @@ class ShixunHomeworkPage extends Component { {teacherdatapage.commit_des} } - {teacherdatapage === undefined ? "" : 1?} + />:""} {this.props.isStudent() ? ( teacherdatapage&&teacherdatapage.redo_work===true? diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index f5f06c037..2a8a893cb 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -359,14 +359,14 @@ class ShixunhomeWorkItem extends Component{ } {this.props.isAdmin?this.stopPro(event)} className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"6px","display":"block"}}> - 实训详情 + {discussMessage&&discussMessage.shixun_status>1?实训详情:""} {this.props.isAdminOrCreator()?this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"btn colorblue ml20 font-16 fontweight400"}>重命名:""} {/* 设置*/} 设置 :""} - {this.props.isStudent===true?this.props.course_identity===5? + {this.props.isStudent===true?this.props.course_identity===5?discussMessage&&discussMessage.shixun_status>1? {startbtn===false? (discussMessage.task_operation[0] == '继续挑战' || discussMessage.task_operation[0] == '查看实战' ? @@ -377,7 +377,7 @@ class ShixunhomeWorkItem extends Component{ this.taskoperationId(discussMessage.task_operation[1])}> {discussMessage.task_operation[0]} ):开启中} - :"":"" + :"":"":"" } diff --git a/public/react/src/modules/developer/components/controlSetting/index.js b/public/react/src/modules/developer/components/controlSetting/index.js index 690bbad36..587e1bee9 100644 --- a/public/react/src/modules/developer/components/controlSetting/index.js +++ b/public/react/src/modules/developer/components/controlSetting/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 16:02:36 * @LastEditors: tangjiang - * @LastEditTime: 2019-12-10 09:30:27 + * @LastEditTime: 2019-12-13 17:32:33 */ import './index.scss'; import React, { useState, useRef } from 'react'; @@ -84,7 +84,7 @@ const ControlSetting = (props) => { diff --git a/public/react/src/modules/developer/components/controlSetting/index.scss b/public/react/src/modules/developer/components/controlSetting/index.scss index 4a2c221c1..97838ce5c 100644 --- a/public/react/src/modules/developer/components/controlSetting/index.scss +++ b/public/react/src/modules/developer/components/controlSetting/index.scss @@ -2,6 +2,7 @@ position: absolute; bottom: 0; width: 100%; + background:rgba(30,30,30,1); // height: 56px; .control_tab{ position: absolute; @@ -51,7 +52,8 @@ height: 56px; padding-right: 30px; padding-left: 10px; - background: #000; + // background: #000; + background:rgba(48,48,48,1); } .setting_drawer{ diff --git a/public/react/src/modules/developer/components/initTabCtx/index.js b/public/react/src/modules/developer/components/initTabCtx/index.js index 19f4230b1..3834a3e11 100644 --- a/public/react/src/modules/developer/components/initTabCtx/index.js +++ b/public/react/src/modules/developer/components/initTabCtx/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 19:46:14 * @LastEditors: tangjiang - * @LastEditTime: 2019-12-10 09:31:00 + * @LastEditTime: 2019-12-13 17:38:42 */ import './index.scss'; import React, { useState, useEffect, useRef, useImperativeHandle, forwardRef } from 'react'; @@ -50,6 +50,7 @@ function InitTabCtx (props, ref) { ], initialValue: inputValue })(