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

dev_ec^2
cxt 6 years ago
commit c52f960832

@ -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

@ -93,14 +93,16 @@ export function initAxiosInterceptors(props) {
config.url = url;
}
}
//
// if (requestMap[config.url] === true) { // 避免重复的请求 导致页面f5刷新 也会被阻止 显示这个方法会影响到定制信息
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;
// }
return false;
}
}
// 非file_update请求
if (config.url.indexOf('update_file') === -1) {
requestMap[config.url] = true;

@ -209,6 +209,9 @@ class Fileslistitem extends Component{
text-overflow:ellipsis;
white-space:nowrap
}
.mt2{
margin-top:2px;
}
`}</style>
<div className="clearfix ds pr contentSection" style={{cursor : this.props.isAdmin ? "pointer" : "default"}} onClick={() => window.$(`.sourceitem${index} input`).click() }>
<h6 onClick={(event)=>this.eventStop(event)}>
@ -248,6 +251,29 @@ class Fileslistitem extends Component{
:""
}
{discussMessage.is_publish===false?<CoursesListType typelist={["未发布"]} typesylename={""}/>:""}
{this.props.isAdmin?
<span className={"fr mr10 mt2"} onClick={(event)=>this.eventStop(event)}>
<WordsBtn style="blue" className="colorblue font-16 mr20 fr">
<a className="btn colorblue"
onClick={()=>this.settingList()}>设置</a>
</WordsBtn>
</span>:""}
{this.props.isStudent===true&&this.props.current_user.login===discussMessage.author.login?
<span className={"fr mr10 mt2"} onClick={(event)=>this.eventStop(event)}>
<WordsBtn style="blue" className="colorblue font-16 mr20 fr">
<a className="btn colorblue"
onClick={()=>this.settingList()}>设置</a>
</WordsBtn>
<WordsBtn style="blue" className="colorblue font-16 mr20 fr">
<a className="btn colorblue"
onClick={()=>this.onDelete(discussMessage.id)}>删除</a>
</WordsBtn>
</span>:""}
</h6>
<style>
{
@ -303,33 +329,14 @@ class Fileslistitem extends Component{
{ discussMessage.publish_time===null?"":discussMessage.is_publish===true?moment(discussMessage.publish_time).fromNow():moment(discussMessage.publish_time).format('YYYY-MM-DD HH:mm')}
</span>
</span>
{this.props.isAdmin?
<span className={"fr mrf2 mr10"} onClick={(event)=>this.eventStop(event)}>
<WordsBtn style="blue" className="colorblue font-16 mr20 fr">
<a className="btn colorblue"
onClick={()=>this.settingList()}>设置</a>
</WordsBtn>
</span>:""}
{this.props.isStudent===true&&this.props.current_user.login===discussMessage.author.login?
<span className={"fr mrf2 mr10"} onClick={(event)=>this.eventStop(event)}>
<WordsBtn style="blue" className="colorblue font-16 mr20 fr">
<a className="btn colorblue"
onClick={()=>this.settingList()}>设置</a>
</WordsBtn>
<WordsBtn style="blue" className="colorblue font-16 mr20 fr">
<a className="btn colorblue"
onClick={()=>this.onDelete(discussMessage.id)}>删除</a>
</WordsBtn>
</span>:""}
{discussMessage&&discussMessage.category_name===null?"":this.props.child===false?<div className="color-grey9 task-hide fr mr60" title={discussMessage&&discussMessage.category_name}
style={{"max-width":"268px"}}>所属目录{discussMessage&&discussMessage.category_name}
</div>:""}
</p>
<p className={this.props.isAdmin===true?"color-grey panel-lightgrey mt8 fl ml30":"color-grey panel-lightgrey mt8 fl ml13"} style={{width:'100%'}}>
<p className={this.props.isAdmin===true?"color-grey panel-lightgrey mt8 fl ml30":"color-grey panel-lightgrey mt8 fl ml13"} style={{width:'94%'}}>
<style>
{
`

@ -784,7 +784,18 @@ class Fileslists extends Component{
has_course_groups={this.state.has_course_groups}
attachmentId={this.state.coursesecondcategoryid}
/>:""}
{child===false?"":<style>
{
`
.filesnameslist{
max-width: 486px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
`
}
</style>}
<Titlesearchsection
title={child===false?"全部资源":name}
searchValue={ searchValue }
@ -926,6 +937,7 @@ class Fileslists extends Component{
<div key={index}>
<Fileslistitem
{...this.props}
{...this.state}
discussMessage={item}
isAdmin={this.props.isAdmin()}
isStudent={this.props.isStudent()}

@ -61,7 +61,7 @@ class Titlesearchsection extends Component{
<p className="clearfix padding30 bor-bottom-greyE">
<p style={{height: '20px'}}>
<span className="font-18 fl color-dark-21">{title}</span>
<span className="font-18 fl color-dark-21 filesnameslist" title={title}>{title}</span>
<li className="fr font-16">
{ firstRowRight }
</li>

@ -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(
<div>
<style>
@ -334,9 +314,9 @@ class Selectsetting extends Component{
.fontlefts{text-align: left; text-align: center;}
`}</style>
<ul className="clearfix greybackHead edu-txt-center">
<li className="fl paddingleft22 fontlefts" style={{width:'220px'}}>资源名称</li>
<li className="fl paddingleft22 fontlefts" style={{width:'330px'}}>资源名称</li>
<li className="fl edu-txt-left" style={{width:'80px'}}>下载</li>
<li className="fl" style={{width:'100px'}}>引用</li>
{/*<li className="fl" style={{width:'100px'}}>引用</li>*/}
<li className="fl" style={{width:'130px'}}>版本号</li>
</ul>
@ -363,7 +343,7 @@ class Selectsetting extends Component{
`}</style>
<div className="pl20 pr20 settingbox">
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE">
<li className="fl" style={{width: '241px'}}>
<li className="fl" style={{width: '350px'}}>
<span className={"isabox"} title={datalist&&datalist.title}> {datalist&&datalist.title} </span>
{datalist&&datalist.attachment_histories.length===0?"":<span className={"newcolor-orange fl"}>当前版本</span>}
</li>
@ -378,13 +358,13 @@ class Selectsetting extends Component{
{datalist&&datalist.attachment_histories.map((item,key)=>{
return(
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl" style={{width: '241px'}}>
<li className="fl" style={{width: '350px'}}>
<span className={"isabox"} title={item.title}> {item.title} </span>
{/*<span className={"newcolor-orange fl"}>当前版本</span>*/}
</li>
<li className="fl edu-txt-left task-hide paddingl5 "
style={{width: '76px'}}> {item.downloads_count} </li>
<li className="fl paddingl10 " style={{width: '100px'}}> {item.quotes} </li>
{/*<li className="fl paddingl10 " style={{width: '100px'}}> {item.quotes} </li>*/}
<li className="fl paddingl10 datastyle">
{moment(item.created_on).format('YYYY-MM-DD HH:mm')==="Invalid date"?"":moment(item.created_on).format('YYYY-MM-DD HH:mm')}
</li>
@ -482,9 +462,9 @@ class Selectsetting extends Component{
</p>
{this.state.newfileListtypes===true?<p className={"color-red"}>请先上传资源</p>:""}
<p className={this.state.fileListtype===true?"mt15":""}>
<p className={this.state.fileListtype===true?"mt15 selecboxfilas":"selecboxfilas"}>
<style>{`
.ant-checkbox-wrapper{
.selecboxfilas .ant-checkbox-wrapper{
margin-left:0px !important;
margin-top:10px;
}

@ -193,7 +193,7 @@ class Sendtofilesmodal extends Component{
<p className="clearfix ModalWrappertitle">
<div className="task-hide fl pagemancenter" style={{"width":'215px'}}>课堂名称</div>
<div className="task-hide fl pagemancenter" style={{"width":'140px'}}>更新时间</div>
<div className="task-hide fl pagemancenter" style={{"width":'140px'}}>创建时间</div>
<div className="task-hide fl pagemancenter" style={{"width":'110px'}}>结束时间</div>
</p>
<div className="edu-back-skyblue padding15" style={{"height":"300px", overflowY: "scroll", overflowAnchor: 'none' }}>
@ -211,8 +211,8 @@ class Sendtofilesmodal extends Component{
return (
<p className="clearfix mb7" key={course.id}>
<Checkbox className="fl" value={course.id} key={course.id} ></Checkbox>
<div className="task-hide fl" style={{"width":'215px'}} title={course.name}>{course.name}</div>
<div className="task-hide fl" style={{"width":'140px'}}>{moment(course.updated_at).format('YYYY-MM-DD HH:mm')}</div>
<div className="task-hide fl" style={{"width":'224px'}} title={course.name}>{course.name}</div>
<div className="task-hide fl" style={{"width":'130px'}}>{moment(course.created_at).format('YYYY-MM-DD')}</div>
<div className="task-hide fl" style={{"width":'110px'}}>{course.end_date}</div>
</p>
)

@ -2666,8 +2666,11 @@ class Studentshavecompletedthelist extends Component {
.ysltableows2 .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
}
mysjysltable1 .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
}
`}</style>
<div className="edu-table edu-back-white">
<div className="edu-table edu-back-white ysltableows2">
{data === undefined ? "" : <Table
dataSource={data}
columns={columnsys}
@ -2773,6 +2776,9 @@ class Studentshavecompletedthelist extends Component {
.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;
}
`}</style>
<div className="edu-table edu-back-white minH-560 ysltableows2">
{datas === undefined ? "" : <Table
@ -2826,6 +2832,9 @@ class Studentshavecompletedthelist extends Component {
.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;
}
`
}
</style>
@ -2917,6 +2926,9 @@ class Studentshavecompletedthelist extends Component {
.ysltableowss .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
}
mysjysltable4 .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px;
}
`}</style>
<div className="edu-table edu-back-white minH-560 ysltableowss">
{datas === undefined ? "" : <Table

@ -6,7 +6,7 @@ import axios from 'axios'
/**
角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生
*/
function ChangeRolePop({ member_roles = [], record, courseId, onChangeRoleSuccess, showNotification, getUserId, fetchUser }) {
function ChangeRolePop({ member_roles = [], record, courseId, onChangeRoleSuccess, showNotification, getUserId, fetchUser, style }) {
const [checkBoxRoles, setCheckBoxRoles] = useState(member_roles)
// useEffect(() => {
// if (checkBoxRoles.length != member_roles.length) { // 死循环
@ -75,7 +75,7 @@ function ChangeRolePop({ member_roles = [], record, courseId, onChangeRoleSucces
</Checkbox.Group>
}
>
<WordsBtn style={'blue'} style2={props.style}>修改角色</WordsBtn>
<WordsBtn style={'blue'} style2={style}>修改角色</WordsBtn>
</Popconfirm>
)
}

@ -200,7 +200,8 @@ function buildColumns(that) {
},
})
}
if(isAdminOrTeacher && hasGraduationModule) {
// 待审批不需要
if(filterKey == '1' && isAdminOrTeacher && hasGraduationModule) {
columns.unshift({
title: '',
dataIndex: 'course_member_id',

@ -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 {
<ul>
<li className="edu-position edu-position-hidebox">
<a className="font-12">
{orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序</a>
{orders === "update_time" ? "时间" :orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 "></i>
<ul className="edu-position-hide undis mt10">
{/*<li> <a onClick={(e) => this.funordert("update_time")} data-remote="true" className=" font-12" style={{textAlign: "center"}}>更新时间</a></li>*/}
<li> <a onClick={(e) => this.funordert("update_time")} data-remote="true" className=" font-12" style={{textAlign: "center"}}>更新时间</a></li>
<li> <a onClick={(e) => this.funordert("work_score")} data-remote="true" className=" font-12" style={{textAlign: "center"}}>最终成绩</a></li>
<li> <a onClick={(e) => this.funordert("student_id")} data-remote="true" className=" font-12" style={{textAlign: "center"}}>学生学号</a></li>
</ul>

@ -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,

@ -1142,11 +1142,38 @@ class ShixunHomework extends Component{
addsave={addsave}
/>
{
datas&&datas.category_name===undefined||datas&&datas.category_name===null?"":
<style>
{
`
.category_namehome{
max-width: 558px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
margin-right: 5px;
}
.category_namehomelist{
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
`
}
</style>
}
<div className="edu-back-white">
<p className="clearfix padding30 bor-bottom-greyE">
<p style={{height: '20px'}}>
<span className="font-18 fl color-dark-21">{datas&&datas.category_name===undefined||datas&&datas.category_name===null?datas&&datas.main_category_name:datas&&datas.category_name+" 作业列表"}</span>
<span className="font-18 fl color-dark-21">
{datas&&datas.category_name===undefined||datas&&datas.category_name===null?datas&&datas.main_category_name:<span>
<span className={"category_namehome"}>{datas&&datas.category_name} </span>
<span className={"category_namehomelist"}> 作业列表</span>
</span>}
</span>
<li className="fr">
{datas===undefined?"":datas.homeworks && datas.homeworks.length>1?this.props.isAdminOrCreator()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?
<span>

@ -103,8 +103,13 @@
}
#closeIcon{
position: absolute;
top: -30px;
right: -27px;
z-index: 100000;
}
#logincloseIcon{
position: absolute;
top: -100px;
right: -27px;

@ -568,7 +568,7 @@ class LoginDialog extends Component {
</style>:""}
{isRender===true?
<div className={dialogBox}>
<div id="closeIcon" onClick={()=>{this.handleDialogClose()}}>
<div id="closeIcon" className={"logincloseIcon"} onClick={()=>{this.handleDialogClose()}}>
<i className="iconfont icon-shanchudiao"></i>
</div>

@ -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')
}

Loading…
Cancel
Save