diff --git a/app/models/laboratory.rb b/app/models/laboratory.rb index 53e66ece0..f319ace80 100644 --- a/app/models/laboratory.rb +++ b/app/models/laboratory.rb @@ -19,7 +19,7 @@ class Laboratory < ApplicationRecord return if subdomain.blank? rails_env = EduSetting.get('rails_env') - subdomain = subdomain.slice(0, subdomain.size - rails_env.size - 1) if subdomain.end_with?(rails_env) # winse.dev => winse + subdomain = subdomain.slice(0, subdomain.size - rails_env.size - 1) if rails_env && subdomain.end_with?(rails_env) # winse.dev => winse find_by_identifier(subdomain) end diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index cddea79a6..9cf68503d 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -93,14 +93,16 @@ export function initAxiosInterceptors(props) { config.url = url; } } - // - // if (requestMap[config.url] === true) { // 避免重复的请求 导致页面f5刷新 也会被阻止 显示这个方法会影响到定制信息 - // console.log(config); - // console.log(JSON.parse(config)); - // console.log(config.url); - // console.log("被阻止了是重复请求================================="); - // return false; - // } + + if (config.method === "post") { + if (requestMap[config.url] === true) { // 避免重复的请求 导致页面f5刷新 也会被阻止 显示这个方法会影响到定制信息定制信息是get 请求 + // console.log(config); + // console.log(JSON.parse(config)); + // console.log(config.url); + // console.log("被阻止了是重复请求================================="); + return false; + } + } // 非file_update请求 if (config.url.indexOf('update_file') === -1) { requestMap[config.url] = true; diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index d364f7ada..2610656cc 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -209,6 +209,9 @@ class Fileslistitem extends Component{ text-overflow:ellipsis; white-space:nowrap } + .mt2{ + margin-top:2px; + } `}
window.$(`.sourceitem${index} input`).click() }>
this.eventStop(event)}> @@ -248,6 +251,29 @@ class Fileslistitem extends Component{ :"" } {discussMessage.is_publish===false?:""} + + {this.props.isAdmin? + this.eventStop(event)}> + + this.settingList()}>设置 + + :""} + + {this.props.isStudent===true&&this.props.current_user.login===discussMessage.author.login? + this.eventStop(event)}> + + + this.settingList()}>设置 + + + + this.onDelete(discussMessage.id)}>删除 + + + :""}
}

- {title} + {title}

  • { firstRowRight }
  • diff --git a/public/react/src/modules/courses/coursesPublic/SelectSetting.js b/public/react/src/modules/courses/coursesPublic/SelectSetting.js index 0b7aad29e..ff5751cc6 100644 --- a/public/react/src/modules/courses/coursesPublic/SelectSetting.js +++ b/public/react/src/modules/courses/coursesPublic/SelectSetting.js @@ -55,32 +55,12 @@ class Selectsetting extends Component{ }) .then((response) => { if(response.status===200){ - - let newcourse_groups=[]; - let list =response.data.course_groups; - - if(list.length!=0){ - list.forEach((item,key)=>{ - newcourse_groups.push ({ - course_group_id:item.course_group_id, - course_group_name:item.course_group_id, - publish_time:moment(item.course_group_publish_time).format(dateFormat) - }) - }) - }else{ - newcourse_groups.push ({ - course_group_id:undefined, - course_group_name:undefined, - publish_time:"" - }) - } - this.setState({ datalist:response.data, description: response.data.description, is_public:response.data.is_public, datatime:response.data.publish_time, - Radiovalue:response.data.delay_publish===false?0:1, + Radiovalue:response.data.delay_publish==false?0:1, //attachment_histories:response.data.attachment_histories }) @@ -276,7 +256,7 @@ class Selectsetting extends Component{ lineHeight: '30px', }; - console.log(this.state.datatime) + console.log(this.state.Radiovalue) return(
      -
    • 资源名称
    • +
    • 资源名称
    • 下载
    • -
    • 引用
    • + {/*
    • 引用
    • */}
    • 版本号
    @@ -363,7 +343,7 @@ class Selectsetting extends Component{ `}
    -
  • +
  • {datalist&&datalist.title} {datalist&&datalist.attachment_histories.length===0?"":当前版本}
  • @@ -378,13 +358,13 @@ class Selectsetting extends Component{ {datalist&&datalist.attachment_histories.map((item,key)=>{ return(
    -
  • +
  • {item.title} {/*当前版本*/}
  • {item.downloads_count}
  • -
  • {item.quotes}
  • + {/*
  • {item.quotes}
  • */}
  • {moment(item.created_on).format('YYYY-MM-DD HH:mm')==="Invalid date"?"":moment(item.created_on).format('YYYY-MM-DD HH:mm')}
  • @@ -482,9 +462,9 @@ class Selectsetting extends Component{

    {this.state.newfileListtypes===true?

    请先上传资源

    :""} -

    +

    -

    +
    {data === undefined ? "" : div > .ant-spin .ant-spin-dot { top: 72%;} } - .ysltableows2 .ant-table-thead > tr > th, .ant-table-tbody > tr > td { + .ysltableows2 .ant-table-thead > tr > th, .ant-table-tbody > tr > td { + padding: 9px; + } + mysjysltable2 .ant-table-thead > tr > th, .ant-table-tbody > tr > td { padding: 9px; } `} @@ -2823,7 +2829,10 @@ class Studentshavecompletedthelist extends Component { .ysltableows .ant-table-tbody > tr > td{ height: 58px; } - .ysltableows .ant-table-thead > tr > th, .ant-table-tbody > tr > td { + .ysltableows .ant-table-thead > tr > th, .ant-table-tbody > tr > td { + padding: 9px; + } + mysjysltable3 .ant-table-thead > tr > th, .ant-table-tbody > tr > td { padding: 9px; } ` @@ -2834,7 +2843,7 @@ class Studentshavecompletedthelist extends Component { {data === undefined ? "" :
    tr > th, .ant-table-tbody > tr > td { padding: 9px; } + mysjysltable4 .ant-table-thead > tr > th, .ant-table-tbody > tr > td { + padding: 9px; + } `}
    {datas === undefined ? "" :
    { // if (checkBoxRoles.length != member_roles.length) { // 死循环 @@ -75,7 +75,7 @@ function ChangeRolePop({ member_roles = [], record, courseId, onChangeRoleSucces } > - 修改角色 + 修改角色 ) } diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index fe46e9bf4..bc534c61d 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -200,7 +200,8 @@ function buildColumns(that) { }, }) } - if(isAdminOrTeacher && hasGraduationModule) { + // 待审批不需要 + if(filterKey == '1' && isAdminOrTeacher && hasGraduationModule) { columns.unshift({ title: '', dataIndex: 'course_member_id', diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 926e1b023..03f0dea64 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -460,7 +460,7 @@ class Listofworksstudentone extends Component { ), }, ], - orders: "", + orders: "update_time", columnsstu2: [ { title: '序号', @@ -2239,9 +2239,9 @@ class Listofworksstudentone extends Component { var homeworkid = this.props.match.params.homeworkid; let urll = `/homework_commons/${homeworkid}/works_list.json?`; var order = "asc"; - // if (ordervlue === "update_time") { - // order = "desc"; - // } + if (ordervlue === "update_time") { + order = "desc"; + } var checkedValuesines = checkedValuesine; var checkedValuesineinfos = checkedValuesineinfo; var searchtexts = searchtext @@ -2653,15 +2653,15 @@ class Listofworksstudentone extends Component { } //排序 funordert = (e) => { - // if (e === "update_time") { - // // 时间 - // // 时间排序是从小到大 - // this.setState({ - // orders: "update_time", - // loadingstate: true, - // }) - // this.Startsortingt("update_time", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit); - // } + if (e === "update_time") { + // 时间 + // 时间排序是从小到大 + this.setState({ + orders: "update_time", + loadingstate: true, + }) + this.Startsortingt("update_time", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit); + } if (e === "work_score") { // 成绩 @@ -3362,10 +3362,10 @@ class Listofworksstudentone extends Component {
    • - {orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序 + {orders === "update_time" ? "时间" :orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序 diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index fa0cdd832..b3b79ae28 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1725,7 +1725,7 @@ class Trainingjobsetting extends Component { flagPageEditstwo:releasetime, flagPageEditsthrees:deadline, flagPageEditsfor:endtime, - completionefficiencyscore:true, + completionefficiencyscore:false, work_efficiencys:this.state.work_efficiencys, unifiedsetting:this.state.unifiedsetting, latedeductiontwo:this.state.latedeductiontwo, @@ -1841,7 +1841,7 @@ class Trainingjobsetting extends Component { flagPageEditstwo:releasetime, flagPageEditsthrees:deadline, flagPageEditsfor:endtime, - completionefficiencyscore:true, + completionefficiencyscore:datas.data.work_efficiency===true?true:false, work_efficiencys:datas.data.work_efficiency, unifiedsetting:datas.data.unified_setting, latedeductiontwo:datas.data.eff_score, diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 3acb02739..415b283f6 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -1142,11 +1142,38 @@ class ShixunHomework extends Component{ addsave={addsave} /> - + { + datas&&datas.category_name===undefined||datas&&datas.category_name===null?"": + + }

      - {datas&&datas.category_name===undefined||datas&&datas.category_name===null?datas&&datas.main_category_name:datas&&datas.category_name+" 作业列表"} + + {datas&&datas.category_name===undefined||datas&&datas.category_name===null?datas&&datas.main_category_name: + {datas&&datas.category_name} + 作业列表 + } +

    • {datas===undefined?"":datas.homeworks && datas.homeworks.length>1?this.props.isAdminOrCreator()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null? diff --git a/public/react/src/modules/login/LoginDialog.css b/public/react/src/modules/login/LoginDialog.css index d66acc811..1b534c790 100644 --- a/public/react/src/modules/login/LoginDialog.css +++ b/public/react/src/modules/login/LoginDialog.css @@ -103,8 +103,13 @@ } - #closeIcon{ + position: absolute; + top: -30px; + right: -27px; + z-index: 100000; +} +#logincloseIcon{ position: absolute; top: -100px; right: -27px; diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 552e8765e..6bd6ac41f 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -568,7 +568,7 @@ class LoginDialog extends Component { :""} {isRender===true?
      -
      {this.handleDialogClose()}}> +
      {this.handleDialogClose()}}>
      diff --git a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js index 5d54f514b..2e6184428 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js +++ b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js @@ -131,7 +131,7 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback, initV // Or return editormd.toolbarModes[name]; // full, simple, mini // Using "||" set icons align right. - const icons = ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear"]; + const icons = ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "link", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear"]; if (__that.props.showNullButton) { icons.push('nullBtton') }