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

dev_jupyter
杨树林 5 years ago
commit 379ffb0977

@ -30,6 +30,6 @@ class PrivateMessages::CreateService < ApplicationService
def validate!
raise Error, '内容不能为空' if content.blank?
raise Error, '内容太长' if content.size > 255
raise Error, '内容太长' if content.size > 500
end
end

@ -24,6 +24,7 @@ function locationurl(list){
}
// TODO 开发期多个身份切换
let debugType =""
if (isDev) {
@ -44,30 +45,6 @@ if (isDev) {
//debugType="student";
function Return_Reload() {
var isPageHide = false;
window.addEventListener('pageshow', function () {
if (isPageHide) {
window.location.reload();
}
});
window.addEventListener('pagehide', function () {
isPageHide = true;
});
}
Return_Reload();
function railsgettimes(proxy) {
if(timestamp&&checkSubmitFlg===false){
$.ajax({url:proxy,async:false,success:function(data){

@ -116,7 +116,7 @@ class PollDetailTabForth extends Component{
let url=`/polls/${pollId}/poll_setting.json`;
axios.get(url).then((result)=>{
if(result){
this.props.getPollInfo();
this.setState({
polls:result.data.poll,
unitSetting:result.data.poll.unified_setting,
@ -183,6 +183,8 @@ class PollDetailTabForth extends Component{
})
}
}
this.props.getPollInfo();
}).catch((error)=>{
console.log(error);
})

@ -1294,11 +1294,11 @@ class Listofworksstudentone extends Component {
record.submitstate === "未开启" ?
<a style={{textAlign: "center",width: '40px'}} className="color-blue"
onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)}
onClick={() => this.Viewstudenttraininginformationt(record)}>{record.has_comment===false?"评阅":"详情"}</a> :
onClick={() => this.Viewstudenttraininginformationt(record)}>{record.has_comment===true?"详情":"评阅 "}</a> :
<span>
<a style={{textAlign: "center"}} className="color-blue maxnamewidth120"
onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)}
onClick={() => this.Viewstudenttraininginformationt(record)}>{record.has_comment===false?"评阅":"详情"}</a>
onClick={() => this.Viewstudenttraininginformationt(record)}>{record.has_comment===true?"详情":"评阅 "}</a>
</span>
)
},
@ -1656,11 +1656,11 @@ class Listofworksstudentone extends Component {
record.submitstate === "未开启" ?
<a style={{textAlign: "center",width: '40px'}} className="color-blue"
onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)}
onClick={() => this.Viewstudenttraininginformationt(record)}>{record.has_comment===false?"评阅":"详情"}</a> :
onClick={() => this.Viewstudenttraininginformationt(record)}>{record.has_comment===true?"详情":"评阅"}</a> :
<span>
<a style={{textAlign: "center"}} className="color-blue"
onMouseDown={(e) => this.Viewstudenttraininginformationtysl2(e, record)}
onClick={() => this.Viewstudenttraininginformationt(record)}>{record.has_comment===false?"评阅":"详情"}</a>
onClick={() => this.Viewstudenttraininginformationt(record)}>{record.has_comment===true?"详情":"评阅"}</a>
</span>
)
},
@ -1673,35 +1673,13 @@ class Listofworksstudentone extends Component {
}
componentDidCatch(error, info) {
// console.log("-----------------------------905错误信息");
// console.log(error);
// console.log(info);
}
// componentWillReceiveProps(nextProps) {
// console.log("+++++++++916");
// console.log(nextProps);
// console.log(this.props)
// // console.log(this.props.isAdmin());
// if (nextProps.code_review != this.props.code_review) {
// if (nextProps.code_review !== undefined) {
// console.log("diaoyonglwangluo1");
// if(this.props.isAdmin() === true){
// this.tearchar();
// }else{
// this.student();
// }
// }
// }
//
// }
componentDidMount() {
// console.log("componentDidMount ");
// console.log("调用子组件 ");
// console.log(this.props);
// console.log(this.props.isAdmin())
this.student();
}
@ -1886,11 +1864,12 @@ class Listofworksstudentone extends Component {
console.log(error);
})
}
//一键评阅的按钮
AkeyreviewitGetalistofworkstwo=()=>{
this.setState({
loadingstate: true,
})
this.Getalistofworkstwo("", "", "", "", 1, 20);
this.Startsortingt("", "", "", "", 1, 20);
}
// 获取作品列表
Getalistofworkstwo = (ordervlue, checkedValuesine, checkedValuesineinfo, searchtext, page, limit) => {
@ -2097,6 +2076,7 @@ class Listofworksstudentone extends Component {
user_name: teacherdata.user_name,
user_login: teacherdata.user_login,
Curcomlevel: teacherdata.current_complete_count===undefined||teacherdata.current_complete_count===null||teacherdata.current_complete_count===""?0:teacherdata.current_complete_count,
})
// }
@ -2125,7 +2105,7 @@ class Listofworksstudentone extends Component {
stduynumber: student_works[i].student_id,
classroom: student_works[i].group_name,
cost_time: student_works[i].cost_time,
has_comment:teacherdata[i].has_comment,
has_comment:student_works[i].has_comment,
submitstate: student_works[i].work_status === 0 ? "未开启" : student_works[i].work_status === 1 ? "未通关" : student_works[i].work_status === 2 ? "按时通关" : "迟交通关",
// updatetime:this.state.teacherdata.student_works[i].update_time,
// updatetime:"",
@ -2650,7 +2630,7 @@ class Listofworksstudentone extends Component {
stduynumber: student_works[i].student_id,
classroom: student_works[i].group_name,
cost_time: student_works[i].cost_time,
has_comment:teacherdata[i].has_comment,
has_comment:student_works[i].has_comment,
submitstate: student_works[i].work_status === 0 ? "未开启" : student_works[i].work_status === 1 ? "未通关" : student_works[i].work_status === 2 ? "按时通关" : "迟交通关",
// updatetime:this.state.teacherdata.student_works[i].update_time,
// updatetime:"",
@ -2671,11 +2651,7 @@ class Listofworksstudentone extends Component {
}
// var teacherlist = { //分页
// total: student_works.length, //数据总数量
// pageSize: 20, //一页显示几条
// current: page,
// }
if (work_efficiency === false) {
if (JSON.stringify(course_group_info) === "[]" || course_group_info === undefined || course_group_info === null) {
@ -2892,11 +2868,15 @@ class Listofworksstudentone extends Component {
}
} else {
}
//
// console.log(datalist);
// console.log("1712");
// console.log("开始赋值了");
// console.log(datalistjs);
this.setState({
datajs: datalistjs,
columns: columns2js,
@ -3398,27 +3378,7 @@ class Listofworksstudentone extends Component {
});
};
//
// setComputeTime=()=>{
// this.setState({
// computeTimetype:false
// })
// let homeworkid = this.props.match.params.homeworkid;
// let url = "/homework_commons/"+homeworkid+"/update_score.json";
//
// axios.get(url).then((response) => {
// if(response){
// this.props.showNotification(response.data.message);
// this.setState({
// loadingstate: true
// })
// this.Startsortingt(this.state.order, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
// }
// }).catch((error) => {
// console.log(error)
// });
//
// }
daochushixunbaogao = () => {
let url = `/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo === undefined || this.state.course_groupyslstwo === null ? "" : this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo === undefined || this.state.checkedValuesineinfo === null ? "" : this.state.checkedValuesineinfo}&search=${this.state.searchtext === undefined || this.state.searchtext === null ? "" : this.state.searchtext}`

@ -206,7 +206,7 @@ class ShixunHomeworkPage extends Component {
}
SaveAppraiseModal=(comment,hidden_comment)=>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/batch_comment.jsonr`
let url = `/homework_commons/${this.props.match.params.homeworkid}/batch_comment.json`
axios.post(url,{
comment: comment,
hidden_comment: hidden_comment,

Loading…
Cancel
Save